Advertisement
Guest User

Untitled

a guest
May 6th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.38 KB | None | 0 0
  1. CMD:work(playerid, params[]) {
  2. new Float: Pos[3], string[500];
  3. if(PlayerInfo[playerid][pJob] == 0) return SCM(playerid, COLOR_GREY, "Nu ai un job!");
  4. if(JobWorking[playerid] == 1) return SCM(playerid, COLOR_GREY, "Muncesti deja.");
  5. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  6. switch (PlayerInfo[playerid][pJob]) {
  7. case 1: {
  8. return 1;
  9. }
  10. case 2: {
  11. if(PlayerToPoint(15.00, playerid, -209.6895, -228.4223, 0.9004)) {
  12. CP[playerid] = 150;
  13. DisablePlayerCheckpoint(playerid);
  14. new szDialog2[1024];
  15. strcat(szDialog2, "Destination\tSkill");
  16. strcat(szDialog2, "Dillimore\t1\n");
  17. strcat(szDialog2, "Palomino creek\t1\n");
  18. strcat(szDialog2, "Montgomery\t2\n");
  19. strcat(szDialog2, "Fort carson\t2\n");
  20. strcat(szDialog2, "Fallen tree\t3\n");
  21. strcat(szDialog2, "Red county\t3\n");
  22. strcat(szDialog2, "Flint county\t4\n");
  23. strcat(szDialog2, "Back o beyond\t4\n");
  24. strcat(szDialog2, "The farm\t5\n");
  25. strcat(szDialog2, "Whetstone\t5\n");
  26. strcat(szDialog2, "Bone county\t6\n");
  27. strcat(szDialog2, "The panopticon\t6\n");
  28. ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Trucker", szDialog2, "Select", "Cancel");
  29. }
  30. }
  31. case 3: {
  32. if(!PlayerToPoint(5.0, playerid, 2173.1504,-2267.9075,13.3782)) {
  33. SendClientMessage(playerid, COLOR_GREY, "Nu esti la locul de unde se incep misiunile. Urmeaza punctul rosu de pe harta.");
  34. SetPlayerCheckpointEx(playerid,2173.1504,-2267.9075,13.3782, 6.0);
  35. CP[playerid] = 43;
  36. return 1;
  37. }
  38. JobVehicle[playerid] = CreateVehicleEx(482, Pos[0], Pos[1], Pos[2], 90.0000, 1, 1, -1);
  39. SendClientMessage(playerid, -1, "{008080}(Job){FFFFFF} Du-te in checkpoint pentru a incarca coletele.");
  40. SetPlayerRaceCheckpointEx(playerid,1,2209.4661,-2218.4280,13.5469,0.0,0.0,0.0,4.0);
  41. CP[playerid] = CP_CURIER;
  42. MoneyEarned[playerid] = 0;
  43. CurseFacute[playerid] = 0;
  44. }
  45. case 4: {
  46. return 1;
  47. }
  48. case 5:{
  49. if(!PlayerToPoint(5.0, playerid, -2666.4829,271.0853,4.3359)){
  50. SendClientMessage(playerid, COLOR_GREY, "Nu esti la locul de unde se incep misiunile. Urmeaza punctul rosu de pe harta.");
  51. SetPlayerCheckpointEx(playerid,-2666.4829,271.0853,4.3359, 6.0);
  52. CP[playerid] = 43;
  53. return 1;
  54. }
  55. MoneyEarned[playerid] = 0;
  56. CurseFacute[playerid] = 0;
  57. JobVehicle[playerid] = CreateVehicleEx(448, Pos[0], Pos[1], Pos[2], 90.0000, 1, 1, -1);
  58. SCM(playerid, COLOR_NEWS, "Tasteaza comanda [/pizza].");
  59. }
  60. case 6: {
  61. if(PlayerToPoint(7.0, playerid, -516.0576,-1508.7822,10.6103))
  62. {
  63. MoneyEarned[playerid] = 0;
  64. CurseFacute[playerid] = 0;
  65. PlayerTextDrawSetString(playerid, InfoTD, "Urca viteza la 30 KM/H, conduci prea incet.");
  66. PlayerTextDrawShow(playerid, InfoTD);
  67. timerfarm[playerid] = 60;
  68. JobVehicle[playerid] = CreateVehicleEx(531, Pos[0], Pos[1], Pos[2], 90.0000, 1, 1, -1);
  69. }
  70. else
  71. {
  72. if(CP[playerid] != 0) return SendClientMessage(playerid, COLOR_YELLOW2, "Ai deja un punct rosu activ. Foloseste comanda '/cancel checkpoint' pentru a renunta la el.");
  73. CP[playerid] = 43;
  74. SendClientMessage(playerid, COLOR_YELLOW2, "Eroare: Nu esti la locul de unde se incep misiunile. Urmeaza punctul rosu de pe harta.");
  75. SetPlayerCheckpoint(playerid, -516.0576,-1508.7822,10.6103, 7.0);
  76. return 1;
  77. }
  78. }
  79. case 7: {
  80. return 1;
  81. }
  82. case 9: {
  83. return 1;
  84. }
  85. case 10: {
  86. if(!PlayerToPoint(5.0, playerid, 2524.9690,2779.6057,11.3776)){
  87. SendClientMessage(playerid, COLOR_GREY, "Nu esti la locul de unde se incep misiunile. Urmeaza punctul rosu de pe harta.");
  88. SetPlayerCheckpointEx(playerid,2524.9690,2779.6057,11.3776, 6.0);
  89. CP[playerid] = 43;
  90. return 1;
  91. }
  92. new find,Float:distance,Float:x,Float:y,Float:z;
  93. if(TrashID[playerid] == -1)
  94. {
  95. for(new t; t < 1000; t++)
  96. {
  97. new rand = random(sizeof(CHKGarbage));
  98. if(!IsPlayerInRangeOfPoint(playerid,1000.0, CHKGarbage[rand][0], CHKGarbage[rand][1], CHKGarbage[rand][2])) find = 1;
  99. if(find == 1)
  100. {
  101. GetPlayerPos(playerid, x, y, z);
  102. distance = GetDistanceBetweenPoints(x, y, z, CHKGarbage[rand][0], CHKGarbage[rand][1], CHKGarbage[rand][2]);
  103. format(string,sizeof(string),"Mergi la checkpoint pentru a incepe colectarea gunoiului. Distanta: %.0fm.",distance);
  104. if(floatround(distance, floatround_round) >= 1000 && floatround(distance, floatround_round) <= 1500) GarbageCollected[playerid] = 5 + random(5);
  105. else if(floatround(distance, floatround_round) >= 1501 && floatround(distance, floatround_round) <= 2000) GarbageCollected[playerid] = 7 + random(5);
  106. else if(floatround(distance, floatround_round) >= 2001 && floatround(distance, floatround_round) <= 2500) GarbageCollected[playerid] = 9 + random(5);
  107. else if(floatround(distance, floatround_round) >= 2501 && floatround(distance, floatround_round) <= 3000) GarbageCollected[playerid] = 11 + random(5);
  108. else if(floatround(distance, floatround_round) >= 3001) GarbageCollected[playerid] = 14 + random(5);
  109. SendClientMessage(playerid, COLOR_YELLOW, string);
  110. SetPlayerCheckpointEx(playerid, CHKGarbage[rand][0],CHKGarbage[rand][1],CHKGarbage[rand][2], 2.0);
  111. CP[playerid] = 10972;
  112. TrashID[playerid] = rand;
  113. break;
  114. }
  115. }
  116. }
  117. else
  118. {
  119. new r = TrashID[playerid];
  120. GetPlayerPos(playerid, x, y, z);
  121. distance = GetDistanceBetweenPoints(x, y, z, CHKGarbage[r][0], CHKGarbage[r][1], CHKGarbage[r][2]);
  122. format(string,sizeof(string),"Mergi la checkpoint pentru a incepe colectarea gunoiului. Distanta: %.0fm.",distance);
  123. SendClientMessage(playerid, COLOR_YELLOW, string);
  124. SetPlayerCheckpointEx(playerid, CHKGarbage[r][0],CHKGarbage[r][1],CHKGarbage[r][2], 2.0);
  125. CP[playerid] = 10972;
  126. }
  127. JobVehicle[playerid] = CreateVehicleEx(408, Pos[0], Pos[1], Pos[2], 90.0000, 1, 1, -1);
  128. }
  129. case 11: {
  130. return 1;
  131. }
  132. case 12: {
  133. return 1;
  134. }
  135. case 13: {
  136. return 1;
  137. }
  138. }
  139. if(PlayerInfo[playerid][pJob] == 10) {
  140. JobVehicle[playerid] = CreateVehicleEx(411, -209.6895, -228.4223, 0.9004, 90, -1, -1, -1);
  141. }
  142. PutPlayerInVehicle(playerid, JobVehicle[playerid], 0);
  143. DisableRemoteVehicleCollisions(playerid, 1);
  144. JobWorking[playerid] = 1;
  145. Gas[JobVehicle[playerid]] = 200;
  146. return 1;
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement