Advertisement
Guest User

Untitled

a guest
Aug 26th, 2011
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. local theMarker = createMarker ( -1572, 662, 6, "cylinder", 10, 0, 0, 255, 0 )
  2. local gate = createObject ( 969, -1571.7370605469, 665.71630859375, 6.1875, 0, 0, 270.27026367188 )
  3.  
  4. function openGate ( hitElement )
  5. if (getElementType(hitElement) == "player" ) then
  6. if hasObjectPermissionTo( hitElement, "function.kickPlayer" ) then
  7. moveObject ( gate, 1500, -1571.5941162109, 656.59051513672, 6.1875, 0, 0, 0 )
  8. else
  9. outputChatBox ( "** You have entered a restricted area, you will now be taken away. **", hitElement, 255, 0, 0 )
  10. setElementPosition ( hitElement, -1536, 651, 8 )
  11. end
  12. end
  13. end
  14.  
  15. function closeGate ( leftElement )
  16. if (getElementType(leftElement) == "player" ) then
  17. moveObject ( gate, 1500, -1571.5941162109, 656.59051513672 + 9, 6.1875, 0, 0, 0 )
  18. end
  19. end
  20. addEventHandler( "onMarkerLeave", theMarker, closeGate )
  21.  
  22.  
  23. addEventHandler( "onMarkerHit", theMarker, openGate )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement