07.12.2016, 13:04
PHP код:
stock GetPlayerRacePosition(playerid)
{
new count, cp = gCheckpoint[playerid] + 1;
foreach(new i : Player)
{
if(gCheckpoint[i] > gCheckpoint[playerid])
{
count ++;
}
else if (gCheckpoint[i] == gCheckpoint[playerid])
{
if (GetPlayerDistanceFromPoint(i, g_arrCheckpoint[0][cp], g_arrCheckpoint[1][cp], g_arrCheckpoint[2][cp]) < GetPlayerDistanceFromPoint(playerid, g_arrCheckpoint[0][cp], g_arrCheckpoint[1][cp], g_arrCheckpoint[2][cp]))
{
count ++;
}
}
}
return count + 1;
}
- I have seen your code somewhere and based it on the code above.
How about; Sorting out the list of these players (Top 5 list)

