Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case DIALOG_TRUCKER: {
- if(!response) {
- JobWorking[playerid] = 0;
- PlayerTextDrawHide(playerid, JobTD);
- if(JobVehicle[playerid] != 0) { DestroyVehicle(JobVehicle[playerid]); JobVehicle[playerid] = 0; }
- if(Trailer[playerid] != 0) { DestroyVehicle(Trailer[playerid]); Trailer[playerid] = 0; }
- PlayerTextDrawHide(playerid, InfosTD);
- PlayerTextDrawHide(playerid, TruckerTD);
- DisablePlayerCheckpointEx(playerid);
- CP[playerid] = 0;
- JobVehicle[playerid] = 0;
- SendClientMessage(playerid, COLOR_RED, "Job esuat!");
- return 1;
- }
- if(JobWorking[playerid] == 0) return 1;
- if(listitem >= 3) {
- new szDialog2[1024];
- strcat(szDialog2, "Destination\tSkill\n");
- strcat(szDialog2, "Dillimore\t1\nz");
- strcat(szDialog2, "Palomino creek\t1\n");
- strcat(szDialog2, "Montgomery\t2\n");
- strcat(szDialog2, "Fort carson\t2\n");
- strcat(szDialog2, "Fallen tree\t3\n");
- strcat(szDialog2, "Red county\t3\n");
- strcat(szDialog2, "Flint county\t4\n");
- strcat(szDialog2, "Back o beyond\t4\n");
- strcat(szDialog2, "The farm\t5\n");
- strcat(szDialog2, "Whetstone\t5\n");
- strcat(szDialog2, "Bone county\t6\n");
- strcat(szDialog2, "The panopticon\t6\n");
- 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");
- 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");
- 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");
- 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");
- 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");
- 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");
- 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");
- 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");
- 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");
- 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");
- }
- CP[playerid] = 52;
- new Float:pX,Float:pY,Float:pZ,Float:vA;
- GetPlayerPos(playerid,pX,pY,pZ);
- GetVehicleZAngle(GetPlayerVehicleID(playerid),vA);
- if(listitem == 0) Trailer[playerid] = CreateVehicleEx(435, pX+6, pY+6, pZ+6, vA, -1, -1, -1);
- else if(listitem == 2) Trailer[playerid] = CreateVehicleEx(591, pX+6, pY+6, pZ+6, vA, -1, -1, -1);
- else if(listitem == 3) {
- Trailer[playerid] = CreateVehicleEx(584, pX+6, pY+6, pZ+6, vA, -1, -1, -1);
- SetVehicleHealth(Trailer[playerid], 500);
- }
- else Trailer[playerid] = CreateVehicleEx(450, pX+6, pY+6, pZ+6, vA, -1, -1, -1);
- SetPVarInt(playerid, "Destination", listitem);
- if(listitem == 0) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, 659.6572,-454.3049,16.3359, 5.0);
- }
- if(listitem == 1) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, 2269.0261,26.6491,26.4370, 5.0);
- }
- if(listitem == 2) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, 1293.1984,180.5914,20.4609, 5.0);
- }
- if(listitem == 3) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, 142.4525,896.5239,18.9232, 5.0);
- }
- if(listitem == 4) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, -478.9268,-490.8559,25.5178, 5.0);
- }
- if(listitem == 5) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, -929.4560,-516.5926,25.9609, 5.0);
- }
- if(listitem == 6) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, -117.7592,-1256.5315,2.9972, 5.0);
- }
- if(listitem == 7) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, -386.0052,-1985.4104,27.5522, 5.0);
- }
- if(listitem == 8) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, -1050.1797,-1318.1493,128.7246, 5.0);
- }
- if(listitem == 9) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, -1419.3661,-1436.6571,101.9848, 5.0);
- }
- if(listitem == 10) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, 177.9733,1163.8483,14.7578, 5.0);
- }
- if(listitem == 11) {
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpointEx(playerid, -856.8356,-105.6511,62.1667, 5.0);
- }
- PlayerTextDrawShow(playerid, TruckerTD);
- format(string, sizeof(string), "%0.2fm pana la destinatie", GetPlayerDistanceFromPoint(playerid, CheckpointPos[playerid][0], CheckpointPos[playerid][1], CheckpointPos[playerid][2]));
- PlayerTextDrawSetString(playerid, TruckerTD, string);
- SetTimerEx("AttachTrailer", 1000, 0, "i", playerid);
- if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) SetTimerEx("AttachTrailer", 1000, 1, "i", playerid);
- UpdateJobStats(playerid);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement