Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.75 KB | None | 0 0
  1. --BETA, 1.19, no auto functions, running on commands.
  2. --Automatization
  3. --Oil deliviring
  4. --Pretty
  5. --Markers for deliviring
  6. --Cars spawned,done
  7. oiltruck1 = createVehicle(524,2563,-2241,14,_,_,_,"OILTRUCKZ")
  8. oiltruck2 = createVehicle(524,2570,-2241,14,_,_,_,"OILTRUCKZ")
  9. oiltruck3 = createVehicle(524,2577,-2241,14,_,_,_,"OILTRUCKZ")
  10. oilmarker = createMarker(1059,-2591,0,"checkpoint",1,0,0,0,255)
  11. function clooil2(thePlayer,matchingDimension)
  12.  if isElementWithinMarker(thePlayer, oilmarker) then
  13.  ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  14.  outputChatBox("Oil is loading onto ship, please wait", thePlayer, 255, 0, 0)
  15.  end
  16.  setTimer(oilloaded,10000,1)
  17.  else
  18.  ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  19. outputChatBox("the oil flooded and there has been a huge spill!, better luck next time.", thePlayer, 0, 0, 0)
  20. end
  21.     end
  22.         end
  23. addCommandHandler("clooil2", clooil2)
  24.  
  25. function oilloaded(thePlayer, matchingDimension)
  26.  ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  27. outputChatBox("U got the oil, get to the refinery!(2 minutes to get the ship there and man the pipe)",thePlayer,255,255,255)
  28. refineryblip = createBlip(2738,-2242,14,16,2,_,_,_,255,0,999999.0)
  29. setElementVisibleTo(refineryblip,root,false)
  30. for k, v in ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  31. setElementVisibleTo(refineryblip,v,true)
  32. destroyElement(oilblip)
  33. destroyElement(oilmarker)
  34. refinerymarker1 = createMarker(2738,-2271,0,"checkpoint",1,0,0,0,255)
  35. setElementVisibleTo(refinerymarker1,root,false)
  36. for k, v in ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  37. setElementVisibleTo(refinerymarker1,v,true)
  38. refinerymarker1 = createMarker(2738,-2271,0,"checkpoint",1,0,0,0,255)
  39. setTimer(oilrefinery,240000,1)
  40. end
  41.     end
  42.         end
  43.             end
  44. addCommandHandler("oilloaded",oilloaded)
  45.    
  46. function oilrefinery(thePlayer, matchingDimension)
  47. refinerymarker1 = createMarker(2738,-2271,0,"checkpoint",1,0,0,0,255)
  48. if isElementWithinMarker(thePlayer, refinerymarker1) then
  49.  ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  50. outputChatBox("oil is being refined,u will have to wait 10 minutes for the oil to refine.",thePlayer,0,0,255)
  51. setTimer(oilrefined,6000,1)
  52. end
  53.     end
  54.         end
  55.    
  56. addCommandHandler("oilrefinery",oilrefinery)
  57.  
  58. function oilready1(thePlayer, matchingDimension)
  59. oilblip = createBlip(1059,-2591,0,16,2,_,_,_,255,0,99999.0)
  60. setElementVisibleTo(oilblip,root,false)
  61. for k, v in ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  62. setElementVisibleTo(oilblip,v,true)
  63.  ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  64. outputChatBox("4 minutes till the oil is ready, head for the blip now!",thePlayer,255,0,0)
  65. end
  66.     end
  67.         end
  68. addCommandHandler("oilready1",oilready1)
  69.  
  70. function oilready2(thePlayer,matchingDimension)
  71. if isElementWithinMarker(thePlayer, oilmarker) then
  72.  ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  73. outputChatBox("hold thight, still 3 minutes till the oil",thePlayer,255,0,0)
  74. end
  75. else
  76.  ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  77. outputChatBox("3 minutes till the oil is ready, head for the blip now!",thePlayer,255,0,0)
  78. end
  79.     end
  80.         end
  81. addCommandHandler("oilready2",oilready2)
  82.    
  83. function oilready3(thePlayer,matchingDimension)
  84. if isElementWithinMarker(thePlayer, oilmarker) then
  85. outputChatBox("hold thight, still 2 minutes till the oil",thePlayer,255,0,0)
  86. else
  87. ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  88. outputChatBox("2 minutes till the oil is ready, head for the blip now!",thePlayer,255,0,0)
  89.     end
  90.         end
  91.             end
  92. addCommandHandler("oilready3",oilready3)
  93.  
  94. function oilready4(thePlayer,matchingDimension)
  95. if isElementWithinMarker(thePlayer, oilmarker) then
  96.  ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  97. outputChatBox("hold thight, still 1 minute till the oil",thePlayer,255,0,0)
  98. end
  99. else
  100.  ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  101. outputChatBox("1 minute till the oil is ready, head for the blip now!, remember, the player should be in the marker!",thePlayer,255,0,0)
  102. end
  103.     end
  104.         end
  105. addCommandHandler("oilready4",oilready4)
  106.  
  107. function oilrefined(thePlayer,matchingDimension)
  108. refinedoilmarker1 = createmarker(2610,-2225,13,"cylinder",10,0,0,0,255,_)
  109. setElementVisibleTo(refinedoilmarker1,root,false)
  110. for k, v in ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  111. setElementVisibleTo(refinedoilmarker1,v,true)
  112.  ipairs(getPlayersInTeam(getTeamFromName("CLO"))) do
  113.  outputChatBox("Oil has been refined, collect it at the refinery",thePlayer,255,0,0)
  114.  destroyElement(refinerymarker1)
  115. end
  116.     end
  117.         end
  118. addCommandHandler("oilrefined",oilrefined)
  119.  
  120. function unleashthebeast(thePlayer,matchingDimension)
  121. setTimer(oilready1,156000,1)
  122. setTimer(oilready2,162000,1)
  123. setTimer(oilready3,168000,1)
  124. setTimer(oilready4,174000,1)
  125. setTimer(clooil2,180000,1) 
  126. end
  127. addCommandHandler("unleash",unleashthebeast)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement