Checkpoints
#1

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!
Reply
#2

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 ?
Reply
#3

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...!
Reply
#4

Use either variables, proximity checks or a checkpoint streamer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)