02.07.2015, 13:56
//Edit: Ok you dont need this function, just write it like this:
PHP код:
public checkpointUpdate()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
for(new j; j < sizeof checkpoints; j++)
{
if(!IsPlayerInRangeOfPoint(i,4.0,checkpoints[j][0],checkpoints[j][1],checkpoints[j][2],checkpoints[j][3])) continue;
if(playerCheckpoint[i]!=j)
{
SetPlayerCheckpoint(i, checkpoints[j][0],checkpoints[j][1],checkpoints[j][2],checkpoints[j][3]);
playerCheckpoint[i] = j;
}
else DisablePlayerCheckpoint(i),playerCheckpoint[i] = 999;
}
}
}