Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local nofly1 = createMarker( 1722.8520507813, -3341.5732421875, 12.17505645752, "cylinder", 500, 0, 255, 0, 0 )
- -- Define Marker
- function noFlyZone(hitElement, matchingDimension)
- if (getElementType(hitElement) == "plane") or (getElementType(hitElement) == "helicopter")
- if hasObjectPermissionTo( hitElement, "function.kickPlayer" ) then
- outputChatBox ("*** Welcome to the admin airport!" ***", hitElement, 0, 255, 0, true)
- end
- else
- destroyElement(hitElement)
- outputChatBox ("*** You have entered a no-fly zone! ***", hitElement, 255, 0, 0, true)
- end
- end
- -- Destroy the plane and output a message to chatbox
- addEventHandler("onMarkerHit", root,
- function(...)
- if (source == nofly1) then setTimer(noFlyZone, 1500, 1, ...) end
- end
- )
- -- Do so 1 second after entering the nofly zone
Add Comment
Please, Sign In to add comment