SA-MP Forums Archive
Cant join job - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Cant join job (/showthread.php?tid=566568)



Cant join job - DavidSparks - 06.03.2015

Hey.

So from nowhere one of my job's stopped working. You can't become a trucker anymore, and I don't understand why because the code is exactly like the others and the others are working just fine..

So for example, here's the taxi job.

pawn Код:
//////////////////////////////////////TAXI JOB/////////////////////////////////////////////////////////////////

    if (PlayerInfo[playerid][pJob] == 0 && GetPlayerState(playerid) == 1 && IsPlayerInRangeOfPoint(playerid,3.0, -1981.144775, 133.063293, 27.687500)) {
    format(string, sizeof(string), "Would you like to become a Taxi Driver?");
    ShowPlayerDialog(playerid, DIALOG_ACCEPTDIALOG, DIALOG_STYLE_MSGBOX, "{FFFFFF}Taxi Driver Job", string, "Yes", "No");
    GettingJob[playerid] = 17;
    PlayerInfo[playerid][pAcceptID] = 14;
    return 1;
        }
    else if (PlayerInfo[playerid][pJob2] == 0 && GetPlayerState(playerid) == 1 && IsPlayerInRangeOfPoint(playerid, 3.0, -1981.144775, 133.063293, 27.687500)) {
    format(string, sizeof(string), "Would you like to become a Taxi Driver?");
    ShowPlayerDialog(playerid, DIALOG_ACCEPTDIALOG, DIALOG_STYLE_MSGBOX, "{FFFFFF}Taxi Driver Job", string, "Yes", "No");
    SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You are getting a secondary job. Only VIPs can do this.");
    GettingJob2[playerid] = 17;
    PlayerInfo[playerid][pAcceptID] = 14;
    return 1;
        }
And here's the trucker job

pawn Код:
//////////////////////////////////////TRUCKER JOB/////////////////////////////////////////////////////////////////

    if (PlayerInfo[playerid][pJob] == 0 && GetPlayerState(playerid) == 1 && IsPlayerInRangeOfPoint(playerid,3.0, -1261.1012,457.8160,7.1875)) {
    format(string, sizeof(string), "Would you like to become a Truck Driver?");
    ShowPlayerDialog(playerid, DIALOG_ACCEPTDIALOG, DIALOG_STYLE_MSGBOX, "{FFFFFF}Trucking Job", string, "Yes", "No");
    GettingJob[playerid] = 20;
    PlayerInfo[playerid][pAcceptID] = 14;
    return 1;
         }
    else if (PlayerInfo[playerid][pJob2] == 0 && GetPlayerState(playerid) == 1 && IsPlayerInRangeOfPoint(playerid, 3.0, -1261.1012,457.8160,7.1875)) {
    format(string, sizeof(string), "Would you like to become a Truck Driver?");
    ShowPlayerDialog(playerid, DIALOG_ACCEPTDIALOG, DIALOG_STYLE_MSGBOX, "{FFFFFF}Trucking Job", string, "Yes", "No");
    SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You are getting a secondary job. Only VIPs can do this.");
    GettingJob2[playerid] = 20;
    PlayerInfo[playerid][pAcceptID] = 14;
    return 1;
        }
Personally I see no problem with this, and if anyone does please tell me..