11.03.2009, 16:41
It won't, SetPlayerCheckpoint won't return a value (which means you can't assign an id for it.)
To solve, try with player state:
Good luck.
Leopard
To solve, try with player state:
pawn Код:
#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;
}
Leopard

