Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local players = {}
- local x, y, z = 0, 0, 0
- local warping = false
- local warpLimit = 0
- local warps = 0
- function setWarp(plr, _, lim)
- players = {}
- local px, py, pz = getElementPosition(plr)
- warpLimit = tonumber(lim)
- x = px
- y = py
- z = pz
- warping = true
- warps = 0
- outputChatBox("An event has been started use /warp to join , Event hosted by : " .. getPlayerName(plr), root, 0, 255, 0)
- end
- addCommandHandler("setwarp", setWarp)
- function warpToEvent(plr)
- if (warping and not players[plr] and warps < warpLimit) then
- setElementPosition(plr, x, y, z)
- setElementFrozen(plr, true)
- players[plr] = true
- warps = warps + 1
- end
- end
- addCommandHandler("warp", warpToEvent)
- function unFreezeAll(plr)
- for a,b in pairs(players) do
- setElementFrozen(plr, false)
- end
- end
- addCommandHandler("unfree", unFreezeAll)
Add Comment
Please, Sign In to add comment