SA-MP Forums Archive
Checkpoint Bug - 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: Checkpoint Bug (/showthread.php?tid=421105)



Checkpoint Bug - Scott Zulkifli - 08.03.2013

pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519 && flyjob[playerid] == 1 && IsPlayerInRangeOfPoint(playerid, 10.0, 1980.8196,-2493.8984,13.5391))
    {
        SetPlayerCheckpoint(playerid, -1541.5569,-159.0307,14.1484, 10);
        GameTextForPlayer(playerid, "~g~Goto San Fierro!", 3000, 3);
    }
    else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519 && flyjob[playerid] == 1 && IsPlayerInRangeOfPoint(playerid, 10.0, -1541.5569,-159.0307,14.1484))
    {
        SetPlayerCheckpoint(playerid, -1657.4930,-164.7600,14.1484, 10);
        GameTextForPlayer(playerid, "~g~Goto Landing!", 3000, 3);
    }
    else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519 && flyjob[playerid] == 1 && IsPlayerInRangeOfPoint(playerid, 10.0, -1657.4930,-164.7600,14.1484))
    {
        SetPlayerCheckpoint(playerid, 1571.4313,1556.9706,10.8203, 10);
        GameTextForPlayer(playerid, "~g~Goto Las Venturas!", 3000, 3);
    }
    else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519 && flyjob[playerid] == 1 && IsPlayerInRangeOfPoint(playerid, 10.0, 1571.4313,1556.9706,10.8203))
    {
        SetPlayerCheckpoint(playerid, 1477.3678,1697.1982,10.8125, 10);
        GameTextForPlayer(playerid, "~g~Goto Landing!", 3000, 3);
    }
    else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519 && flyjob[playerid] == 1 && IsPlayerInRangeOfPoint(playerid, 10.0, 1477.3678,1697.1982,10.8125))
    {
        SetPlayerCheckpoint(playerid, 1904.6438,-2462.9121,13.5391, 10);
        GameTextForPlayer(playerid, "~g~Goto Los Santos!", 3000, 3);
    }
    else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519 && flyjob[playerid] == 1 && IsPlayerInRangeOfPoint(playerid, 10.0, 1904.6438,-2462.9121,13.5391))
    {
        new level = PlayerInfo[playerid][pPilotSkill], payment;
        new string[128];
        if(level >= 0 && level <= 50) payment = 17000;
        else if(level >= 51 && level <= 100) payment = 18250;
        else if(level >= 101 && level <= 200) payment = 19500;
        else if(level >= 201 && level <= 400) payment = 110750;
        else if(level >= 401) payment = 112000;

        GivePlayerMoney(playerid, payment);
        format(string, sizeof(string), "* You were paid $%d for pilot job.", payment);
        SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);

        PlayerInfo[playerid][pPilotSkill]++;
        DisablePlayerCheckpoint(playerid);
        SetVehicleToRespawn(1);
        GameTextForPlayer(playerid, "~g~Mission Success!", 3000, 3);
        flyjob[playerid] = 0;
    }

every i the first checkpoint, the next checkpoint nothing.


Re: Checkpoint Bug - Denying - 08.03.2013

Please, explain it a bit better, what's wrong?


Re: Checkpoint Bug - L.Hudson - 08.03.2013

Try seperating some
pawn Код:
&&
like not all the if in the same line


Re: Checkpoint Bug - Scott Zulkifli - 08.03.2013

if I am the first checkpoint, the next checkpoint can not be displayed.