Guest User

Untitled

a guest
Feb 19th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. local CooldownTimer = 10
  2. local str = {};
  3. local ChatPrefix = "#tele"
  4. function Command(event, pPlayer, msg, _, _)
  5.     if (msg:find(ChatPrefix.." ") == 1) then
  6.         if str[plr:GetName()] ~= nil and ((os.clock()-str[plr:GetName()])) <= CooldownTimer then
  7.             pPlayer:SendAreaTriggerMessage("|cFFFF0000You must wait "..CooldownTimer.." Seconds before teleporting again!")
  8.         else
  9.             str[plr:GetName()] = os.clock()
  10.             for _, v in pairs(GetPlayersInWorld()) do
  11.                 pPlayer:Teleport(map, x, y, z)
  12.             end
  13.         end
  14.         return false
  15.     end
  16.     return true
  17. end
  18.  
  19. RegisterServerHook(16, Command)
Advertisement
Add Comment
Please, Sign In to add comment