17.06.2011, 16:02
There was a good example in the old area51.pwn which came with the sa-mp package :/
Its quite easy, you create an player array
and you define some checkpoints
and than if you set a checkpoint you just set the array to
in the end if you disable the checkpoint you need to reset the array
And in OnPlayerEnterCheckpoint
The timer for the explosion should be clear, if not read the wiki page about SetTimerEx
Its quite easy, you create an player array
pawn Код:
stock gPlayerCheckpointStatus[MAX_PLAYERS];
pawn Код:
enum {
CHECKPOINT_NONE,
CHECKPOINT_ONE,
CHECKPOINT_TWO
}
pawn Код:
gPlayerCheckpointStatus[playerid] = CHECKPOINT_ONE;
SetPlayerCheckpoint(playerid, ...);
pawn Код:
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
DisPlayerPlayerCheckpoint(playerid);
pawn Код:
switch(gPlayerCheckpointStatus[playerid]) {
case CHECKPOINT_ONE: {}
case CHECKPOINT_TWO: {}
default: {
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
DisPlayerPlayerCheckpoint(playerid);
}
}