22.12.2014, 14:38
That's so stupid to have a timer here. You can just use OnPlayerStateChange and check if the oldstate was PLAYER_...._DRIVER, and the newstate is PLAYER_..._ONFOOT. And inside it check if the player is in race. Example:
pawn Код:
public OnPlayerStateChange(..........)
{
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
if(Joined[playerid] == true)
{
// Reset their vars and send the message here.
}
}
return 1;
}