Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CooldownTimer = 10
- local str = {};
- local ChatPrefix = "#tele"
- function Command(event, pPlayer, msg, _, _)
- if (msg:find(ChatPrefix.." ") == 1) then
- if str[plr:GetName()] ~= nil and ((os.clock()-str[plr:GetName()])) <= CooldownTimer then
- pPlayer:SendAreaTriggerMessage("|cFFFF0000You must wait "..CooldownTimer.." Seconds before teleporting again!")
- else
- str[plr:GetName()] = os.clock()
- for _, v in pairs(GetPlayersInWorld()) do
- pPlayer:Teleport(map, x, y, z)
- end
- end
- return false
- end
- return true
- end
- RegisterServerHook(16, Command)
Advertisement
Add Comment
Please, Sign In to add comment