Checkpoints
#1

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...
How can I do this?
I want to add it for Tutorials and for Jail
Reply
#2

A base:

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)