11.03.2009, 16:35
fixed
#define CHECKPOINT_STATE_ENTER_TURISMO
#define CHECKPOINT_STATE_ENTER_SULTAN
new PlayerCheckpointState[MAX_PLAYERS]; //create new array of players
//OnPlayerConnect maybe?
SetPlayerCheckpoint(playerid, ...);
PlayerCheckpointState[playerid] = CHECKPOINT_STATE_ENTER_TURISMO; //so the game know that if the player enter a checkpoint with this variable set to CHECKPOINT_STATE_ENTER_TURISMO, it will do something special
//OnPlayerEnterCheckpoint
public OnPlayerEnterCheckpoint(playerid) //you probably notice there isn't an checkpointid here.
{
if(PlayerCheckpointState[playerid] == CHECKPOINT_STATE_ENTER_TURISMO)
{
//do what you want here! For example fix the car
}
else if(PlayerCheckpointState[playerid] == CHECKPOINT_STATE_ENTER_SULTAN)
{
//maybe something else?
}
return 1;
}