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



Checkpoints - DJRebis - 27.06.2013

Hi, im trying to do checkpint again and i dont understand how to add 2nd checkpoint! I did like this
Код:
public OnPlayerEnterCheckpoint(playerid)
{
        if(IsPlayerInAnyVehicle(playerid))
        DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid,COLOR_ORANGE,"Drive back to docks!");
        SetPlayerCheckpoint(playerid,2462.9810,-2097.6760,13.5469, 5.0);
        }
        else if(IsPlayerInAnyVehicle(playerid))
        {
        DisablePlayerCheckpoint(playerid);
        GivePlayerMoney(playerid,1000);
        SendClientMessage(playerid,COLOR_YELLOW,"You got 1000$ for delivering!");
        return 1;
}
But i got 2 errors from it: error 010: invalid function or declaration ! Help pls!


Re: Checkpoints - AIped - 27.06.2013

well at first you forgot some brackets

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
        if(IsPlayerInAnyVehicle(playerid))
        {//here
        DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid,COLOR_ORANGE,"Drive back to docks!");
        SetPlayerCheckpoint(playerid,2462.9810,-2097.6760,13.5469, 5.0);
        }
        else if(IsPlayerInAnyVehicle(playerid))
        {
        DisablePlayerCheckpoint(playerid);
        GivePlayerMoney(playerid,1000);
        SendClientMessage(playerid,COLOR_YELLOW,"You got 1000$ for delivering!");
        }//here
        return 1;
}
Also..why are you using isplayerinanyvehicle twice ? it doesnt make sence. What are you trying to do ?


Re: Checkpoints - DJRebis - 27.06.2013

I dunno im just learning scripting so i dunno lot stuff! But anyway tnx for help!
Im try to learn how to add new checkpoints...!


Re: Checkpoints - Vince - 27.06.2013

Use either variables, proximity checks or a checkpoint streamer.