Advertisement
Guest User

trucker

a guest
May 8th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.69 KB | None | 0 0
  1. case DIALOG_TRUCKER: {
  2. if(!response) {
  3. JobWorking[playerid] = 0;
  4. PlayerTextDrawHide(playerid, JobTD);
  5. if(JobVehicle[playerid] != 0) { DestroyVehicle(JobVehicle[playerid]); JobVehicle[playerid] = 0; }
  6. if(Trailer[playerid] != 0) { DestroyVehicle(Trailer[playerid]); Trailer[playerid] = 0; }
  7. PlayerTextDrawHide(playerid, InfosTD);
  8. PlayerTextDrawHide(playerid, TruckerTD);
  9. DisablePlayerCheckpointEx(playerid);
  10. CP[playerid] = 0;
  11. JobVehicle[playerid] = 0;
  12. SendClientMessage(playerid, COLOR_RED, "Job esuat!");
  13. return 1;
  14. }
  15. if(JobWorking[playerid] == 0) return 1;
  16.  
  17. if(listitem >= 3) {
  18. new szDialog2[1024];
  19. strcat(szDialog2, "Destination\tSkill\n");
  20. strcat(szDialog2, "Dillimore\t1\nz");
  21. strcat(szDialog2, "Palomino creek\t1\n");
  22. strcat(szDialog2, "Montgomery\t2\n");
  23. strcat(szDialog2, "Fort carson\t2\n");
  24. strcat(szDialog2, "Fallen tree\t3\n");
  25. strcat(szDialog2, "Red county\t3\n");
  26. strcat(szDialog2, "Flint county\t4\n");
  27. strcat(szDialog2, "Back o beyond\t4\n");
  28. strcat(szDialog2, "The farm\t5\n");
  29. strcat(szDialog2, "Whetstone\t5\n");
  30. strcat(szDialog2, "Bone county\t6\n");
  31. strcat(szDialog2, "The panopticon\t6\n");
  32. if(listitem == 2 && GetPlayerSkill(playerid) < 2) return SCM(playerid, COLOR_LGREEN, "Ai nevoie de skill 2 pentru aceasta cursa."), ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination", szDialog2, "Select", "Cancel");
  33. if(listitem == 3 && GetPlayerSkill(playerid) < 2) return SCM(playerid, COLOR_LGREEN, "Ai nevoie de skill 2 pentru aceasta cursa."), ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination", szDialog2, "Select", "Cancel");
  34. if(listitem == 4 && GetPlayerSkill(playerid) < 3) return SCM(playerid, COLOR_LGREEN, "Ai nevoie de skill 3 pentru aceasta cursa."), ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination", szDialog2, "Select", "Cancel");
  35. if(listitem == 5 && GetPlayerSkill(playerid) < 3) return SCM(playerid, COLOR_LGREEN, "Ai nevoie de skill 3 pentru aceasta cursa."), ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination", szDialog2, "Select", "Cancel");
  36. if(listitem == 6 && GetPlayerSkill(playerid) < 4) return SCM(playerid, COLOR_LGREEN, "Ai nevoie de skill 4 pentru aceasta cursa."), ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination", szDialog2, "Select", "Cancel");
  37. if(listitem == 7 && GetPlayerSkill(playerid) < 4) return SCM(playerid, COLOR_LGREEN, "Ai nevoie de skill 4 pentru aceasta cursa."), ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination", szDialog2, "Select", "Cancel");
  38. if(listitem == 8 && GetPlayerSkill(playerid) < 5) return SCM(playerid, COLOR_LGREEN, "Ai nevoie de skill 5 pentru aceasta cursa."), ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination", szDialog2, "Select", "Cancel");
  39. if(listitem == 9 && GetPlayerSkill(playerid) < 5) return SCM(playerid, COLOR_LGREEN, "Ai nevoie de skill 5 pentru aceasta cursa."), ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination", szDialog2, "Select", "Cancel");
  40. if(listitem == 10 && GetPlayerSkill(playerid) < 6) return SCM(playerid, COLOR_LGREEN, "Ai nevoie de skill 6 pentru aceasta cursa."), ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination", szDialog2, "Select", "Cancel");
  41. if(listitem == 11 && GetPlayerSkill(playerid) < 6) return SCM(playerid, COLOR_LGREEN, "Ai nevoie de skill 6 pentru aceasta cursa."), ShowPlayerDialog(playerid, DIALOG_TRUCKER, DIALOG_STYLE_TABLIST_HEADERS, "Choose destination", szDialog2, "Select", "Cancel");
  42. }
  43.  
  44. CP[playerid] = 52;
  45.  
  46. new Float:pX,Float:pY,Float:pZ,Float:vA;
  47. GetPlayerPos(playerid,pX,pY,pZ);
  48. GetVehicleZAngle(GetPlayerVehicleID(playerid),vA);
  49.  
  50. if(listitem == 0) Trailer[playerid] = CreateVehicleEx(435, pX+6, pY+6, pZ+6, vA, -1, -1, -1);
  51. else if(listitem == 2) Trailer[playerid] = CreateVehicleEx(591, pX+6, pY+6, pZ+6, vA, -1, -1, -1);
  52. else if(listitem == 3) {
  53. Trailer[playerid] = CreateVehicleEx(584, pX+6, pY+6, pZ+6, vA, -1, -1, -1);
  54. SetVehicleHealth(Trailer[playerid], 500);
  55. }
  56. else Trailer[playerid] = CreateVehicleEx(450, pX+6, pY+6, pZ+6, vA, -1, -1, -1);
  57. SetPVarInt(playerid, "Destination", listitem);
  58. if(listitem == 0) {
  59. DisablePlayerCheckpoint(playerid);
  60. SetPlayerCheckpointEx(playerid, 659.6572,-454.3049,16.3359, 5.0);
  61. }
  62. if(listitem == 1) {
  63. DisablePlayerCheckpoint(playerid);
  64. SetPlayerCheckpointEx(playerid, 2269.0261,26.6491,26.4370, 5.0);
  65. }
  66. if(listitem == 2) {
  67. DisablePlayerCheckpoint(playerid);
  68. SetPlayerCheckpointEx(playerid, 1293.1984,180.5914,20.4609, 5.0);
  69. }
  70. if(listitem == 3) {
  71. DisablePlayerCheckpoint(playerid);
  72. SetPlayerCheckpointEx(playerid, 142.4525,896.5239,18.9232, 5.0);
  73. }
  74. if(listitem == 4) {
  75. DisablePlayerCheckpoint(playerid);
  76. SetPlayerCheckpointEx(playerid, -478.9268,-490.8559,25.5178, 5.0);
  77. }
  78. if(listitem == 5) {
  79. DisablePlayerCheckpoint(playerid);
  80. SetPlayerCheckpointEx(playerid, -929.4560,-516.5926,25.9609, 5.0);
  81. }
  82. if(listitem == 6) {
  83. DisablePlayerCheckpoint(playerid);
  84. SetPlayerCheckpointEx(playerid, -117.7592,-1256.5315,2.9972, 5.0);
  85. }
  86. if(listitem == 7) {
  87. DisablePlayerCheckpoint(playerid);
  88. SetPlayerCheckpointEx(playerid, -386.0052,-1985.4104,27.5522, 5.0);
  89. }
  90. if(listitem == 8) {
  91. DisablePlayerCheckpoint(playerid);
  92. SetPlayerCheckpointEx(playerid, -1050.1797,-1318.1493,128.7246, 5.0);
  93. }
  94. if(listitem == 9) {
  95. DisablePlayerCheckpoint(playerid);
  96. SetPlayerCheckpointEx(playerid, -1419.3661,-1436.6571,101.9848, 5.0);
  97. }
  98. if(listitem == 10) {
  99. DisablePlayerCheckpoint(playerid);
  100. SetPlayerCheckpointEx(playerid, 177.9733,1163.8483,14.7578, 5.0);
  101. }
  102. if(listitem == 11) {
  103. DisablePlayerCheckpoint(playerid);
  104. SetPlayerCheckpointEx(playerid, -856.8356,-105.6511,62.1667, 5.0);
  105. }
  106. PlayerTextDrawShow(playerid, TruckerTD);
  107. format(string, sizeof(string), "%0.2fm pana la destinatie", GetPlayerDistanceFromPoint(playerid, CheckpointPos[playerid][0], CheckpointPos[playerid][1], CheckpointPos[playerid][2]));
  108. PlayerTextDrawSetString(playerid, TruckerTD, string);
  109. SetTimerEx("AttachTrailer", 1000, 0, "i", playerid);
  110. if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) SetTimerEx("AttachTrailer", 1000, 1, "i", playerid);
  111. UpdateJobStats(playerid);
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement