Advertisement
Rochet2

Level up command

Dec 30th, 2011
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. local MSG_REVIVE = "#grow"
  2.  
  3. local Rank =
  4. {
  5.     ["vb"] = true,
  6.     ["vs"] = true,
  7.     ["vg"] = true,
  8.     ["0"] = true,
  9.     ["a"] = true,
  10.     ["az"] = true,
  11. }
  12.  
  13. local function OnChat_Level90(event, player, message, pType, pLanguage, pMisc)
  14.     if(message:lower() == MSG_REVIVE) then
  15.         if (player:GetPlayerLevel() >= 90) then
  16.             player:SendBroadcastMessage("|cFF00FFFF[VIP System]|cFFFFA500|cFFFFA500You cant use this command, your already level 90!")
  17.             player:SendBroadcastMessage("|cFF00FFFF[VIP System]|cFFFFA500|cFFFFA500You must be VIP to use this command, go donate on www.extremisgaming.com for VIP rank!!")
  18.         else
  19.             if Rank[player:GetGmRank()] then -- You could also use :CanUseCommand("a") for example
  20.                 player:SetLevel(90)
  21.                 player:SendBroadcastMessage("|cFF00FFFF[Vip System]|cFFFFA500|cFFFFA500Congratulations your now level 90!")
  22.             else
  23.                 player:SendBroadcastMessage("|cFF00FFFF[Vip System]|cFFFFA500|cFFFFA500You must be at least a Bronze-VIP to use this command, go donate on www.extremisgaming.com for VIP rank!!")
  24.                 player:SendAreaTriggerMessage("|cFF00FFFF[Vip System]|cFFFFA500|cFFFFA500You must be at least a Bronze-VIP to use this command!")
  25.             end
  26.         end
  27.     end
  28. end
  29.  
  30. RegisterServerHook(16, OnChat_Level90)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement