20.11.2010, 16:38
why when i try to add more than 1 Checkpoint one disappears?
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, CP_SIZE, BurnFarmCpsA[0][0],BurnFarmCpsA[0][1],BurnFarmCpsA[0][2]))
{
DisablePlayerRaceCheckpoint(playerid);
PlayerPlaySound(playerid, 1058, 0.0,0.0,0.0);
SetPlayerRaceCheckpoint(playerid, 0, BurnFarmCpsA[1][0], BurnFarmCpsA[1][1],BurnFarmCpsA[1][2], BurnFarmCpsA[2][0], BurnFarmCpsA[2][1],BurnFarmCpsA[2][2],CP_SIZE);
return 1;
}
return 1;
}
You can only have one active at a time you need to check if the player is in range of the checkpoint inside onplayerentercheckpoint then disable the current checkpoint ie,
pawn Код:
EDIT: I personally dont use streamers for racecheckpoints they stream on the minimap from a longer distance if you don't use one. |