05.04.2015, 18:56
So I made pizzaboy job, player needs to go through few checkpoints, but as soon as I enter first checkpoint, I get message that I delivered goods, but next checkpoint does not appears, I even used DisablePlayerCheckpoint but it still didn't work, see code below.
by the way, checkpointStage gets set to 1 as soon as you get in the pizza bike. I am not sure what is problem, so help would be appreciated.
Code:
public OnPlayerEnterCheckpoint(playerid)
{
if(checkpointStage == 1)
{
DisablePlayerCheckpoint(playerid);
checkpointStage = 2;
SendClientMessage(playerid, -1, "Pizza delivered, now go to next checkpoint."); //This gets sent, but I get no checkpoint
SetPlayerCheckpoint(playerid, 745.1824,-550.9210,17.1799, 5);
return 1;
}
else if(checkpointStage == 2)
{
DisablePlayerCheckpoint(playerid);
checkpointStage = 3;
SendClientMessage(playerid, -1, "Pizza delivered, now go to next checkpoint.");
SetPlayerCheckpoint(playerid, 271.5015,-51.9949,1.9796, 5);
}
return 1;
}





.