Advertisement
Uzzi_25

Job Miner by Uzzi25 | 2017

Jun 29th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.69 KB | None | 0 0
  1. Job Miner By Uzzi25 #PAWNO.RO
  2.  
  3. Un job Simplu si Eficient !
  4.  
  5. Actorii:
  6. new MinerActor;
  7.  
  8. MinerActor = CreateActor(27, -397.0946,2265.6475,41.8199,287.1107);
  9. SetActorInvulnerable(MinerActor, true);
  10. ApplyActorAnimation(MinerActor, "PED","IDLE_CHAT",4.0,1,0,0,1,1);
  11.  
  12. Materiale si Marfa:
  13. new marfap[MAX_PLAYERS];
  14. new materialmine[MAX_PLAYERS];
  15.  
  16. Dupa ce Livrezi Incarcatura comanda [/descarca]
  17.  
  18. if(IsPlayerInRangeOfPoint(playerid, 5.0, -388.3176,2228.2351,42.4297))
  19. {
  20. if(marfap[playerid] == 1)
  21. {
  22. if(materialmine[playerid] == 1)
  23. {
  24. marfap[playerid] = 0; GivePlayerMoney(playerid, 3500);
  25. SetTimerEx("miner1",100, false, "i", playerid);
  26. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 3500$ pentru 6kg {F1F50A}aur");
  27. SendClientMessage(playerid, COLOR_LIGHTGREEN, "MINER:Intoarcete in mina pentur a aduce {F1F50A}alta incarcatura");
  28. SetPlayerCheckpoint(playerid,-446.7098,1444.1129,21.2195,8.0);
  29. ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
  30. }
  31. else if(materialmine[playerid] == 2)
  32. {
  33. marfap[playerid] = 0; GivePlayerMoney(playerid, 3350);
  34. SetTimerEx("miner1",100, false, "i", playerid);
  35. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 3350$ pentru 7kg {98F10A}uraniu");
  36. SendClientMessage(playerid, COLOR_LIGHTGREEN, "MINER:Intoarcete in mina pentur a aduce {98F10A}alta incarcatura");
  37. SetPlayerCheckpoint(playerid,-446.7098,1444.1129,21.2195,8.0);
  38. ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
  39. }
  40. else if(materialmine[playerid] == 3)
  41. {
  42. marfap[playerid] = 0; GivePlayerMoney(playerid, 3400);
  43. SetTimerEx("miner1",100, false, "i", playerid);
  44. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 3400$ pentru 8kg {F2F6EB}argint");
  45. SendClientMessage(playerid, COLOR_LIGHTGREEN, "MINER:Intoarcete in mina pentur a aduce {F2F6EB}alta incarcatura");
  46. SetPlayerCheckpoint(playerid,-446.7098,1444.1129,21.2195,8.0);
  47. ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
  48. }
  49. else if(materialmine[playerid] == 4)
  50. {
  51. marfap[playerid] = 0; GivePlayerMoney(playerid, 3350);
  52. SetTimerEx("miner1",100, false, "i", playerid);
  53. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 3350$ pentru 10kg {5B4A2F}cupru");
  54. SendClientMessage(playerid, COLOR_LIGHTGREEN, "MINER:Intoarcete in mina pentur a aduce {5B4A2F}alta incarcatura");
  55. SetPlayerCheckpoint(playerid,-446.7098,1444.1129,21.2195,8.0);
  56. ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
  57. }
  58. }
  59. else
  60. {
  61. SendClientMessage(playerid, COLOR_GRAD1, "MINER:: Dute si fa rost de marfa!");
  62. }
  63. }
  64. }
  65. Functi pentru comanda [/sapa sau /foreaza]
  66. function miner1(playerid)
  67. {
  68. ClearAnimations(playerid);
  69. return 1;
  70. }
  71. function miner(playerid)
  72. {
  73. new RandomMaterial = random(4);
  74. switch(RandomMaterial)
  75. {
  76. case 0:
  77. {
  78. ClearAnimations(playerid);
  79. marfap[playerid] = 1;
  80. SendClientMessage(playerid, 0xFFFFFFFF, "Transporta aurul la depozit!");
  81. SendClientMessage(playerid, 0xFFFFFFFF, "Dute afara si urcate intr-o masian pentru a livra incarcatura");
  82. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  83. SetPlayerAttachedObject(playerid,0,2060,14,0.247998,-0.191998,0.132000,100.499984,10.199997,-102.599983,0.518998,0.708000,1.068999, 0xFFFFFF00);
  84. materialmine[playerid] = 1;//Aur
  85. }
  86. case 1:
  87. {
  88. ClearAnimations(playerid);
  89. marfap[playerid] = 1;
  90. SendClientMessage(playerid, 0xFFFFFFFF, "Transporta uraniul la depozit!");
  91. SendClientMessage(playerid, 0xFFFFFFFF, "Dute afara si urcate intr-o masian pentru a livra incarcatura");
  92. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  93. SetPlayerAttachedObject(playerid,0,2060,14,0.247998,-0.191998,0.132000,100.499984,10.199997,-102.599983,0.518998,0.708000,1.068999, 0xFF09FF00);
  94. materialmine[playerid] = 2;//Uraniu
  95. }
  96. case 2:
  97. {
  98. ClearAnimations(playerid);
  99. marfap[playerid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Transporta argint-ul la depozit!");
  100. SendClientMessage(playerid, 0xFFFFFFFF, "Dute afara si urcate intr-o masian pentru a livra incarcatura");
  101. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  102. SetPlayerAttachedObject(playerid,0,2060,14,0.247998,-0.191998,0.132000,100.499984,10.199997,-102.599983,0.518998,0.708000,1.068999, 0xFFB7B9B7);
  103. materialmine[playerid] = 3;//Argint
  104. }
  105. case 3:
  106. {
  107. ClearAnimations(playerid);
  108. marfap[playerid] = 1; SendClientMessage(playerid, 0xFFFFFFFF, "Transporta cuprul la depozit!");
  109. SendClientMessage(playerid, 0xFFFFFFFF, "Dute afara si urcate intr-o masian pentru a livra incarcatura");
  110. ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
  111. SetPlayerAttachedObject(playerid,0,2060,14,0.247998,-0.191998,0.132000,100.499984,10.199997,-102.599983,0.518998,0.708000,1.068999, 0xFFAB4444);
  112. materialmine[playerid] = 4;//Cupru
  113. }
  114. }
  115. return 1;
  116. }
  117.  
  118. Masini Miner & Deposit
  119.  
  120. //==================MASINIMINER==========================================================
  121. AddStaticVehicle(422,-467.3516,1494.5081,24.0462,89.9865,1,0); //
  122. AddStaticVehicle(422,-467.0938,1500.6605,25.1556,83.6650,1,0); //
  123. AddStaticVehicle(422,-466.7456,1505.5255,26.0492,87.0208,1,0); //
  124. AddStaticVehicle(422,-466.6813,1512.5221,27.3436,86.2412,1,0); //
  125. AddStaticVehicle(422,-453.8950,1444.4829,20.9529,29.1239,1,0); //
  126. //=======================MASINIMINERDEPOSIT=============================================
  127. AddStaticVehicle(578, -380.3171, 2275.2781, 42.5698, -167.0000, -1, -1, 100);
  128. AddStaticVehicle(578, -387.7323, 2273.4001, 42.5698, -167.0000, -1, -1, 100);
  129. AddStaticVehicle(578, -384.2461, 2274.2292, 42.5698, -167.0000, -1, -1, 100);
  130.  
  131. Text de Unde poti Lua jobul Miner
  132. Create3DTextLabel ("{5EFB6E}Miner\n{ffffff}/jobs pentru a lua jobul", 0xFFFFFFFF, -468.0940,1471.4681,22.3786, 20, 0);
  133.  
  134. AddStaticPickup(1275, 23, -468.0940,1471.4681,22.3786); // miner
  135.  
  136.  
  137. Comenzii Job Miner
  138.  
  139. if(strcmp(cmd, "/foreaza", true) == 0 || strcmp(cmd, "/sapa", true) == 0)
  140. {
  141. if(IsPlayerInRangeOfPoint(playerid, 5.0,-412.8420,1343.8107,13.1168))
  142. {
  143. if(PlayerOnMission[playerid] > 0)
  144. {
  145. SendClientMessage(playerid, COLOR_GREY, " On a mission right now, can't use this command !");
  146. return 1;
  147. }
  148. if(PlayerInfo[playerid][pJob] == 20)
  149. {
  150. if(marfap[playerid] == 0)
  151. {
  152.  
  153. ApplyAnimation(playerid,"CHAINSAW","WEAPON_csawlo",4.0,0,0,0,1,3000,0);
  154. SetTimerEx("miner",3000, false, "i", playerid);
  155. CP[playerid] = 546;
  156. SetPlayerCheckpoint(playerid,-396.4109,2265.7976,41.7995,3.0);
  157.  
  158. }
  159. else
  160. {
  161. SendClientMessage(playerid, 0xFFFFFFFF, "Mineri: Rezolva acest transport!");
  162. }
  163. }
  164. else
  165. {
  166. SendClientMessage(playerid, 0xFFFFFFFF, "Mineri: Nu esti miner!");
  167. }
  168. }
  169. else
  170. {
  171. SendClientMessage(playerid, 0xFFFFFFFF, "Mineri: Nu te aflii la mina!");
  172. }
  173. return 1;
  174. }
  175.  
  176. if(strcmp(cmd, "/descarca", true) == 0)
  177. {
  178. if(PlayerInfo[playerid][pJob] == 20)
  179. {
  180. if(IsPlayerInRangeOfPoint(playerid, 5.0, -397.0946,2265.6475,41.8199))
  181. {
  182. if(marfap[playerid] == 1)
  183. {
  184. if(materialmine[playerid] == 1)
  185. {
  186. marfap[playerid] = 0; GivePlayerMoney(playerid, 1000);
  187. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 1000$ pentru 6kg {F1F50A}aur");
  188. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Intoarcete in mina pentur a aduce {F1F50A}alta incarcatura");
  189. SetPlayerCheckpoint(playerid,-412.8420,1343.8107,13.1168,3.0);
  190. ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
  191. }
  192. else if(materialmine[playerid] == 2)
  193. {
  194. marfap[playerid] = 0; GivePlayerMoney(playerid, 850);
  195. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 850$ pentru 7kg {98F10A}uraniu");
  196. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Intoarcete in mina pentur a aduce {F1F50A}alta incarcatura");
  197. SetPlayerCheckpoint(playerid,-412.8420,1343.8107,13.1168,3.0);
  198. ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
  199. }
  200. else if(materialmine[playerid] == 3)
  201. {
  202. marfap[playerid] = 0; GivePlayerMoney(playerid, 800);
  203. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 800$ pentru 8kg {F2F6EB}argint");
  204. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Intoarcete in mina pentur a aduce {F1F50A}alta incarcatura");
  205. SetPlayerCheckpoint(playerid,-412.8420,1343.8107,13.1168,3.0);
  206. ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
  207. }
  208. else if(materialmine[playerid] == 4)
  209. {
  210. marfap[playerid] = 0; GivePlayerMoney(playerid, 750);
  211. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Ai primit 750$ pentru 10kg {5B4A2F}cupru");
  212. SendClientMessage(playerid, COLOR_LIGHTGREEN, "Intoarcete in mina pentur a aduce {F1F50A}alta incarcatura");
  213. SetPlayerCheckpoint(playerid,-412.8420,1343.8107,13.1168,3.0);
  214. ApplyAnimation(playerid,"CARRY","liftup05",4.0,0,0,0,1,1,1); RemovePlayerAttachedObject(playerid, 0); ClearAnimations(playerid);
  215. }
  216. }
  217. else
  218. {
  219. SendClientMessage(playerid, COLOR_GRAD1, "Mina: Dute si fa rost de marfa!");
  220. }
  221. }
  222. else
  223. {
  224. SendClientMessage(playerid, COLOR_GRAD1, "Mina: Nu te aflii la zona de descarcare!");
  225. }
  226. }
  227. else
  228. {
  229. SendClientMessage(playerid, 0xFFFFFFFF, "Nu ai un job care sa necesite aceasta comanda!");
  230. }
  231. return 1;
  232. }
  233.  
  234. Comanda Pentru Teleportare la Job
  235.  
  236. if(strcmp(cmd, "/gotojobminer", true) == 0)
  237. {
  238. if(IsPlayerConnected(playerid))
  239. {
  240. if(PlayerInfo[playerid][pAdmin] >= 1 && AdminDuty[playerid] == 1 || PlayerInfo[playerid][pHelper] >= 1 && HelperDuty[playerid] == 1)
  241. {
  242. if (GetPlayerState(playerid) == 2)
  243. {
  244. new tmpcar = GetPlayerVehicleID(playerid);
  245. SetVehiclePos(tmpcar, 471.1079,-744.7759,25.7988);
  246. TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
  247. LinkVehicleToInterior(tmpcar, 0);
  248. SetPlayerVirtualWorld(playerid, 0);
  249. }
  250. else
  251. {
  252. SetPlayerPos(playerid, 471.1079,-744.7759,25.7988);
  253. SetPlayerVirtualWorld(playerid, 0);
  254. }
  255. SendClientMessage(playerid, COLOR_GRAD1, "You have been teleported");
  256. SendClientMessage(playerid, COLOR_NICERED, "Welcome to Miner.");
  257. SetPlayerInterior(playerid,0);
  258. DisablePlayerCheckpoint(playerid);
  259. }
  260. else
  261. {
  262. SendClientMessage(playerid, COLOR_GRAD1, "{CCCCCC} * Nu esti autorizat sa folosesti aceasta comanda.");
  263. return 1;
  264. }
  265. }
  266. return 1;
  267. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement