Guest User

Untitled

a guest
Feb 8th, 2014
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. terrorgate = createObject(980, -2654.8000488281,-223.89999389648,6.1999998092651,0,0,180)
  2.  
  3. local function terrorgate_func(player, command)
  4. tx,ty,tz = getElementPosition(terrorgate)
  5. px, py, pz = getElementPosition(player)
  6. if isTerror (player) or isGatePermitted(player) then
  7. if (tonumber(px) <= tonumber(tx)+15) and (tonumber(px) >= tonumber(tx)-15) and (tonumber(py) <= tonumber(ty)+15) and (tonumber(py) >= tonumber(ty)-15) and (tonumber(pz) <= tonumber(tz)+20) and (tonumber(pz) >= tonumber(tz)-20) then
  8. if tonumber(tz) == 110 then
  9. moveObject( terrorgate, 1500, -2654.8000488281,-223.89999389648, 0.1999998092651)
  10. elseif tonumber(tz) == 100 then
  11. moveObject( terrorgate, 1500, -2654.8000488281,-223.89999389648, 6.1999998092651)
  12. end
  13. end
  14. end
  15. end
  16. addCommandHandler("move", terrorgate_func)
  17.  
  18. ( terrorgate, 1500, -2654.8000488281,-223.89999389648, 0.1999998092651)
Advertisement
Add Comment
Please, Sign In to add comment