Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. local Gate1 = createObject (980,-2274.9,1668.6,7,0,0,0)
  2.  
  3. function Gate1_func(player)
  4. local x1, y1, z1 = getElementPosition(player)
  5. local x2, y2, z2 = getElementPosition(Gate1)
  6.  
  7. if vioGetElementData(player, "adminlvl") >= 2 then
  8. if getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2) <= 10 then
  9. moveObject (Gate1, 1500, 2274.9, 1668.6, 1)
  10. outputChatBox("Das Tor fährt für 8sek in den Boden", player)
  11. setTimer(function()
  12. moveObject(Gate1, 1500, -2274.9, 1668.6, 7)
  13. outputChatBox("Dein Tor schließt sich.", player)
  14. end, 8000, 1)
  15. else
  16. outputChatBox("Du bist zu weit weg von den AdminBase-Tor.", player)
  17. end
  18. end
  19. end
  20.  
  21. addCommandHandler("adminbase", Gate1_func)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement