How do I create multiciple Checkpoints? I mean, there is a checkpoints, after you've entered it there comes a next, and next and next and next...
pawn Код:
new Float:CPs[3][3] = {
{0.0, 0.0 0.0},
{0.0, 0.0 0.0},
{0.0, 0.0 0.0},
};
//in a command, for example:
SetPlayerCheckpoint(playerid, CPs[0][0], CPs[0][1], CPs[0][2], 5.0);
SetPVarInt(playerid, "CP" 0);
public OnPlayerEnterCheckpoint(playerid)
{
new pcp = GetPVarInt(playerid, "CP");
SetPlayerCheckpoint(playerid, CPs[pcp + 1][0], CPs[pcp + 1][1], CPs[pcp + 1][2], 5.0);
SetPVarInt(playerid, "CP", pcp+1);
return 1;
}