Advertisement
Guest User

Untitled

a guest
May 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.25 KB | None | 0 0
  1. lstrColShape = createColSphere(256.9345703125, 115.6005859375, 1008.8130493164, 2.9)
  2. exports.pool:allocateElement(lstrColShape)
  3. setElementDimension(lstrColShape, 9001)
  4. setElementInterior(lstrColShape, 10)
  5.  
  6. function sphere_enter(thePlayer, matchingDimension)
  7.         if getElementType(thePlayer) == "player" then
  8.             local nameOfThePlayer = getPlayerName ( thePlayer )
  9.             outputChatBox ( nameOfThePlayer.." entered the zone!", getRootElement(), 255, 255, 109 )
  10.         end
  11. end
  12. addEventHandler("onColShapeHit", lstrColShape, sphere_enter)
  13.  
  14. function sphere_leave(thePlayer, matchingDimension)
  15.         if getElementType(thePlayer) == "player" then
  16.             local nameOfThePlayer = getPlayerName ( thePlayer )
  17.             outputChatBox ( nameOfThePlayer.." left the zone!", getRootElement(), 255, 255, 109 )
  18.         end
  19. end
  20. addEventHandler("onColShapeLeave", lstrColShape, sphere_leave)
  21.  
  22. function lstrduty(thePlayer, command)
  23.     local logged = getElementData(thePlayer, "loggedin")
  24.    
  25.     if (logged==1) then
  26.         if (isElementWithinColShape(thePlayer, lstrColShape)) then
  27.                
  28.             local duty = tonumber(getElementData(thePlayer, "duty"))
  29.             local faction = getElementData(thePlayer, "faction")
  30.            
  31.             if (faction==30) then
  32.                 if (duty==0) then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement