09.03.2015, 15:16
In my race system, when the race starts and the racers are in the first checkpoint, the checkpoint doesn't get triggered unless the player leaves the checkpoint then enters it again (drives forward then reverses into the checkpoint). I have under OnPlayerUpdate this:
But it still doesn't get triggered unless the leave and enter it again. I've also tried to use OnPlayerLeaveRaceCheckpoint but that provides the same results.
pawn Код:
if(IsPlayerInRaceCheckpoint(playerid) && RaceBegun == 1) //If they're in their race checkpoint and the race has started
{
if(PlayerRaceCP[playerid] == 1) //If the player's race checkpoint progress is the first checkpoint
{
PlayerPlaySound(playerid, 4202, 0, 0, 0); //Play a sound
PlayerCheckpoint[playerid] ++; //Add to their checkpoint progress
CreatePlayerRaceCP2(playerid); //Sets the new race checkpoint for the player
}
}