Guest User

Untitled

a guest
Oct 21st, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. local nofly1 = createMarker( 1722.8520507813, -3341.5732421875, 12.17505645752, "cylinder", 500, 0, 255, 0, 0 )
  2. -- Define Marker
  3.  
  4.  
  5. function noFlyZone(hitElement, matchingDimension)
  6. if (getElementType(hitElement) == "plane") or (getElementType(hitElement) == "helicopter")
  7. if hasObjectPermissionTo( hitElement, "function.kickPlayer" ) then
  8. outputChatBox ("*** Welcome to the admin airport!" ***", hitElement, 0, 255, 0, true)
  9. end
  10. else
  11. destroyElement(hitElement)
  12. outputChatBox ("*** You have entered a no-fly zone! ***", hitElement, 255, 0, 0, true)
  13. end
  14. end
  15. -- Destroy the plane and output a message to chatbox
  16.  
  17. addEventHandler("onMarkerHit", root,
  18. function(...)
  19. if (source == nofly1) then setTimer(noFlyZone, 1500, 1, ...) end
  20. end
  21. )
  22. -- Do so 1 second after entering the nofly zone
Add Comment
Please, Sign In to add comment