daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local players = {}
  2. local x, y, z = 0, 0, 0
  3. local warping = false
  4. local warpLimit = 0
  5. local warps = 0
  6. function setWarp(plr, _, lim)
  7.         players = {}
  8.         local px, py, pz = getElementPosition(plr)
  9.         warpLimit = tonumber(lim)
  10.         x = px
  11.         y = py
  12.         z = pz
  13.         warping = true
  14.         warps = 0
  15.         outputChatBox("An event has been started use /warp to join , Event hosted by : " .. getPlayerName(plr), root, 0, 255, 0)
  16. end
  17. addCommandHandler("setwarp", setWarp)
  18.  
  19. function warpToEvent(plr)
  20.         if (warping and not players[plr] and warps < warpLimit) then
  21.                 setElementPosition(plr, x, y, z)
  22.                 setElementFrozen(plr, true)
  23.                 players[plr] = true
  24.                 warps = warps + 1
  25.         end
  26. end
  27. addCommandHandler("warp", warpToEvent)
  28.  
  29. function unFreezeAll(plr)
  30.         for a,b in pairs(players) do
  31.                 setElementFrozen(plr, false)
  32.         end
  33. end
  34. addCommandHandler("unfree", unFreezeAll)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top