Guest User

Untitled

a guest
Jan 31st, 2020
107
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function JobTimeDeelay(playerid) {
  2. gString[0] = EOS;
  3. format(gString, sizeof(gString), "Please wait %d seconds!", JobDeelay[playerid][PlayerInfo[playerid][pJob]]);
  4. SCM(playerid, COLOR_LGREEN, gString);
  5. return true;
  6. }
  7. YCMD:startwork(playerid, params[], help) {
  8. if(PlayerInfo[playerid][pJob] == 11)
  9. return SCM(playerid, -1, "Foloseste /fish pentru a incepe munca la acest job!");
  10.  
  11. if(IsPlayerInAnyVehicle(playerid))
  12. return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti aceasta comanda dintr-un vehicul!");
  13.  
  14. if(PlayerInfo[playerid][pJob] == 0)
  15. return SCM(playerid, COLOR_LGREEN, "Eroare: Nu ai un job.");
  16.  
  17. if(JobWorking[playerid] == 1)
  18. return SCM(playerid, COLOR_GREY, "Muncesti deja.");
  19.  
  20. if(targetfind[playerid] != -1)
  21. return ShowPlayerDialog(playerid, DIALOG_CHECKPOINT, DIALOG_STYLE_MSGBOX, "Checkpoint", "Ai deja un checkpoint activ.\nDoresti sa-l anulezi? Daca da, apasa pe 'Ok'.", "Ok", "Exit");
  22.  
  23. if(GetPlayerVirtualWorld(playerid) != 0)
  24. return true;
  25.  
  26. if(JobDeelay[playerid][PlayerInfo[playerid][pJob]] != 0 && PlayerInfo[playerid][pAdmin] < 6)
  27. return JobTimeDeelay(playerid);
  28.  
  29. new Float: Pos[3], Float: CarAngle, string[128];
  30. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  31. switch(PlayerInfo[playerid][pJob]) {
  32. case 1: {
  33. if(PlayerToPoint(7, playerid, -372.3956,-1458.6648,25.7209)) {
  34. if(KG[playerid] > 0)
  35. return SCM(playerid, COLOR_GREY, "Ai deja un sac de faina.");
  36.  
  37. if(PlayerInfo[playerid][pCarLic] == 0)
  38. return SCM(playerid, COLOR_LGREEN, "Eroare: Ai nevoie de o licenta de condus!");
  39.  
  40. JobSeconds[playerid] = 60;
  41. CarAngle = 153.1984;
  42. DisablePlayerCheckpointEx(playerid);
  43. } else {
  44. if(CP[playerid] != 0)
  45. return ShowPlayerDialog(playerid, DIALOG_CHECKPOINT, DIALOG_STYLE_MSGBOX, "Checkpoint", "Ai deja un checkpoint activ.\nDoresti sa-l anulezi? Daca da, apasa pe 'Ok'.", "Ok", "Exit");
  46.  
  47. CP[playerid] = 53;
  48. SCM(playerid, COLOR_GREY, "Nu esti in zona unde poti incepe munca, dute la checkpoint setat de noi.");
  49. SetPlayerCheckpointEx(playerid, -372.3956,-1458.6648,25.7209, 7.0);
  50. return true;
  51. }
  52. }
  53. case 2: {
  54. if(PlayerToPoint(7, playerid, 1636.2758,698.3583,10.8203)) {
  55. if(PlayerInfo[playerid][pCarLic] == 0)
  56. return SCM(playerid, COLOR_LGREEN, "Eroare: Ai nevoie de o licenta de condus!");
  57.  
  58. CarAngle = 2.3953;
  59. CP[playerid] = 52;
  60. DisablePlayerCheckpointEx(playerid);
  61.  
  62. new szDialog2[400];
  63. strcat(szDialog2, "Category\tType\tSkill\n");
  64. strcat(szDialog2, "Clothes\t{35DE1F}Legal\t1+\n");
  65. strcat(szDialog2, "Food\t{35DE1F}Legal\t1+\n");
  66. strcat(szDialog2, "Furniture\t{35DE1F}Legal\t1+\n");
  67. strcat(szDialog2, "Explosible\t{35DE1F}Legal\t2+\n");
  68. strcat(szDialog2, "Guns\t{F21313}Illegal\t3+\n");
  69. strcat(szDialog2, "Stolen cars\t{F21313}Illegal\t3+\n");
  70. ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination:", szDialog2, "Select", "Cancel");
  71. }
  72. else {
  73. if(CP[playerid] != 0)
  74. return ShowPlayerDialog(playerid, DIALOG_CHECKPOINT, DIALOG_STYLE_MSGBOX, "Checkpoint", "Ai deja un checkpoint activ.\nDoresti sa-l anulezi? Daca da, apasa pe 'Ok'.", "Ok", "Exit");
  75.  
  76. CP[playerid] = 53;
  77. SCM(playerid, COLOR_GREY, "Nu esti in zona unde poti incepe munca, dute la checkpoint setat de noi.");
  78. SetPlayerCheckpointEx(playerid, 1636.2758,698.3583,10.8203, 7.0);
  79. return true;
  80. }
  81. }
  82. case 3: {
  83. if(GetPlayerSkill(playerid) == 1)
  84. PlayerTextDrawSetString(playerid, InfosTD, "~y~Car Jacker~w~~h~~n~Fura un vehicul public!");
  85.  
  86. else if(GetPlayerSkill(playerid) == 2)
  87. PlayerTextDrawSetString(playerid, InfosTD, "~y~Car Jacker~w~~h~~n~Fura un vehicul personal descuiat!");
  88.  
  89. else if(GetPlayerSkill(playerid) == 3)
  90. PlayerTextDrawSetString(playerid, InfosTD, "~y~Car Jacker~w~~h~~n~Fura un vehicul ce apartine unei mafii!");
  91.  
  92. else if(GetPlayerSkill(playerid) == 4)
  93. PlayerTextDrawSetString(playerid, InfosTD, "~y~Car Jacker~w~~h~~n~Fura un vehicul personal incuiat!");
  94.  
  95. else if(GetPlayerSkill(playerid) == 5)
  96. PlayerTextDrawSetString(playerid, InfosTD, "~y~Car Jacker~w~~h~~n~Fura un vehicul ce apartine unui departament de politie!");
  97.  
  98. PlayerTextDrawShow(playerid, InfosTD);
  99.  
  100. JobWorking[playerid] = 1;
  101. defer HideTextdraw(playerid);
  102. return true;
  103. }
  104. case 4: {
  105. if(PlayerInfo[playerid][pWantedLevel] != 0)
  106. return SCM(playerid, COLOR_LGREEN, "Eroare: Nu poti munci deoarece ai wanted!");
  107.  
  108. if(!PlayerToPoint(10, playerid, 2770.2822,-1610.9043,11.0418)) {
  109. SCM(playerid, COLOR_GREY, "Nu esti la locul unde poti incepe munca. Ti-am pus un checkpoint, du-te la el!");
  110. SetPlayerCheckpointEx(playerid, 2770.2822,-1610.9043,11.0418, 10.0);
  111. CP[playerid] = 53;
  112. return true;
  113. }
  114. if(PlayerInfo[playerid][pCarLic] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai nevoie de o licenta de condus pentru a putea munci la acest job!");
  115. CP[playerid] = 156;
  116. new rand = random(3);
  117. switch(rand) {
  118. case 0: SetPlayerCheckpointEx(playerid, 2790.6213,-2523.6418,13.6704, 5.0);
  119. case 1: SetPlayerCheckpointEx(playerid, 2529.4214,-2009.4240,13.5798, 5.0);
  120. case 2: SetPlayerCheckpointEx(playerid, 2180.0774,-2317.1672,13.5703, 5.0);
  121. case 3: SetPlayerCheckpointEx(playerid, 681.2267,-442.6591,16.3633, 5.0);
  122. }
  123.  
  124. format(string, sizeof(string), "Du-te la checkpoint-ul de pe mapa pentru a livra materialele!");
  125. PlayerTextDrawSetString(playerid, InfosTD, string);
  126. defer HideTextdraw(playerid);
  127. PlayerTextDrawShow(playerid, InfosTD);
  128.  
  129. CarAngle = 277.2561;
  130. StartingWork[playerid] = 0;
  131. CurseFacute[playerid] = 0;
  132. MoneyEarned[playerid] = 0;
  133. }
  134. case 5..6: return true;
  135. case 7: {
  136. if(PlayerToPoint(7, playerid, -2667.0920,270.6440,3.9366)) {
  137. if(PlayerInfo[playerid][pCarLic] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai nevoie de o licenta de condus pentru a putea munci la acest job!");
  138. CarAngle = 0;
  139. CP[playerid] = 155;
  140. new j = random(housess)+1;
  141. if(j == 0) j = 1;
  142. SetPlayerCheckpointEx(playerid, HouseInfo[j][hEntrancex],HouseInfo[j][hEntrancey],HouseInfo[j][hEntrancez], 7.0);
  143. format(string, sizeof(string), "Du-te la punctul ~r~~h~rosu~w~~h~ de pe mapa pentru a livra pizza.~n~Distanta: ~y~%0.1fm.", GetPlayerDistanceFromPoint(playerid, HouseInfo[j][hEntrancex],HouseInfo[j][hEntrancey],HouseInfo[j][hEntrancez]));
  144. PlayerTextDrawSetString(playerid, InfosTD, string);
  145. defer HideTextdraw(playerid);
  146. PlayerTextDrawShow(playerid, InfosTD);
  147. }
  148. else {
  149. if(CP[playerid] != 0) return ShowPlayerDialog(playerid, DIALOG_CHECKPOINT, DIALOG_STYLE_MSGBOX, "Checkpoint", "Ai deja un checkpoint activ.\nDoresti sa-l anulezi? Daca da, apasa pe 'Ok'.", "Ok", "Exit");
  150. CP[playerid] = 53;
  151. SCM(playerid, COLOR_GREY, "Nu esti la locul unde poti incepe munca. Ti-am pus un checkpoint, du-te la el!");
  152. SetPlayerCheckpointEx(playerid,-2667.0920,270.6440,3.9366, 7.0);
  153. return true;
  154. }
  155. }
  156. case 8: {
  157. if(!PlayerToPoint(6, playerid, 2198.6216,929.7672,10.8876)) {
  158. SCM(playerid, COLOR_GREY, "Nu esti la locul unde poti incepe munca. Ti-am pus un checkpoint, du-te la el!");
  159. SetPlayerCheckpointEx(playerid, 2198.6216,929.7672,10.8876, 6.0);
  160. CP[playerid] = 53;
  161. return true;
  162. }
  163. if(PlayerInfo[playerid][pCarLic] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai nevoie de o licenta de condus pentru a putea munci la acest job!");
  164. CP[playerid] = 57;
  165.  
  166. new rand = random(3);
  167. switch(rand) {
  168. case 1: SetPlayerCheckpointEx(playerid, 2118.1729,955.7316,10.5437, 5.0);
  169. case 2: SetPlayerCheckpointEx(playerid, 2117.4365,950.1517,10.5437, 5.0);
  170. case 3: SetPlayerCheckpointEx(playerid, 2118.1729,955.7316,10.5437, 5.0);
  171. default: SetPlayerCheckpointEx(playerid, 2117.4365,950.1517,10.5437, 5.0);
  172. }
  173.  
  174. Pos[0] = 2198.6753;
  175. Pos[1] = 930.3242;
  176. Pos[2] = 10.8888;
  177. CarAngle = 180.7365;
  178.  
  179. PlayerTextDrawSetString(playerid, InfosTD, "Du-te la punctul ~r~rosu~w~~h~ pentru a incarca coletele!");
  180. defer HideTextdraw(playerid);
  181. PlayerTextDrawShow(playerid, InfosTD);
  182. }
  183. case 9: return true;
  184. case 10: {
  185. if(!PlayerToPoint(7, playerid, 981.3931,2162.7891,10.5850)) {
  186. SCM(playerid, COLOR_GREY, "Nu esti la locul unde poti incepe munca. Ti-am pus un checkpoint, du-te la el!");
  187. SetPlayerCheckpointEx(playerid, 981.3931,2162.7891,10.5850, 7.0);
  188. CP[playerid] = 53;
  189. return true;
  190. }
  191. if(PlayerInfo[playerid][pCarLic] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai nevoie de o licenta de condus pentru a putea munci la acest job!");
  192. PlayerTextDrawSetString(playerid, InfosTD, "Du-te la ~r~~h~checkpoint-ul~w~~h~ de pe mapa pentru a lua marfa!");
  193. defer HideTextdraw(playerid);
  194. PlayerTextDrawShow(playerid, InfosTD);
  195. DisablePlayerCheckpointEx(playerid);
  196. playerObject[playerid] = CreatePlayerObject(playerid, 1271, 925.8871,2069.3081,10.8203, 0.00000, 0.00000, 45.00000);
  197. SetPlayerCheckpointEx(playerid, 925.8871,2069.3081,10.8203, 2.0);
  198. CP[playerid] = 170;
  199. UpdateJobStats(playerid);
  200. }
  201. }
  202. SetPVarInt(playerid, "InHand", 0);
  203.  
  204. MoneyEarned[playerid] = 0;
  205. CurseFacute[playerid] = 0;
  206. if(PlayerInfo[playerid][pShowJob] == 0 && PlayerInfo[playerid][pJob] != 5 && PlayerInfo[playerid][pLevel] < 3) SCM(playerid, COLOR_YELLOW, "Daca doresti sa vezi mai multe informatii folositoare de la job, o poti face prin comanda (/hud > Informatii job).");
  207. new skill = GetPlayerSkill(playerid);
  208. switch(skill) {
  209. case 1: JobVehicle[playerid] = CreateVehicleEx(JobInfo[PlayerInfo[playerid][pJob]][jSkill1Veh], Pos[0], Pos[1], Pos[2], CarAngle, -1, -1, -1, 0);
  210. case 2: JobVehicle[playerid] = CreateVehicleEx(JobInfo[PlayerInfo[playerid][pJob]][jSkill2Veh], Pos[0], Pos[1], Pos[2], CarAngle, -1, -1, -1, 0);
  211. case 3: JobVehicle[playerid] = CreateVehicleEx(JobInfo[PlayerInfo[playerid][pJob]][jSkill3Veh], Pos[0], Pos[1], Pos[2], CarAngle, -1, -1, -1, 0);
  212. case 4: JobVehicle[playerid] = CreateVehicleEx(JobInfo[PlayerInfo[playerid][pJob]][jSkill4Veh], Pos[0], Pos[1], Pos[2], CarAngle, -1, -1, -1, 0);
  213. case 5: JobVehicle[playerid] = CreateVehicleEx(JobInfo[PlayerInfo[playerid][pJob]][jSkill5Veh], Pos[0], Pos[1], Pos[2], CarAngle, -1, -1, -1, 0);
  214. }
  215. PutPlayerInVehicleEx(playerid, JobVehicle[playerid], 0);
  216. JobWorking[playerid] = 1;
  217.  
  218. if(PlayerInfo[playerid][pJob] != 2)
  219. UpdateJobStats(playerid);
  220.  
  221. Gas[JobVehicle[playerid]] = 100;
  222. WorkingTime[playerid] = 0;
  223.  
  224. SetPlayerVirtualWorld(playerid, 0);
  225.  
  226. new engine,lights,alarm,doors,bonnet,boot,objective;
  227. vehEngine[JobVehicle[playerid]] = 1;
  228. GetVehicleParamsEx(JobVehicle[playerid],engine,lights,alarm,doors,bonnet,boot,objective);
  229. SetVehicleParamsEx(JobVehicle[playerid],VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
  230. return true;
  231. }
  232.  
  233. function CheckSeconds(playerid) {
  234. if(GetTickCount() - JobTime[playerid] < 3500) {
  235. if(InDealer[playerid] == 1) return true;
  236. if(UsedFind[playerid] == 1) return true;
  237. if(CP[playerid] == 57 && JobWorking[playerid] == 1) return true;
  238. if(PlayerToPoint(20, playerid, CheckpointPos[playerid][0], CheckpointPos[playerid][1], CheckpointPos[playerid][2]) && JobWorking[playerid] == 1) return true;
  239. if(PlayerToPoint(100, playerid, LastPos[playerid][0], LastPos[playerid][1], LastPos[playerid][2]) && JobWorking[playerid] == 0) return true;
  240. if(ServerSystem[4] == 0) NightBot(playerid, "Cheats (teleport-hack)");
  241. WTimes[playerid] += 2;
  242. }
  243. return true;
  244. }
RAW Paste Data