12.06.2017, 16:51
Думаю принцип будет примерно таков:
PHP код:
new cps_done[10];
for(new i; i < current_race_members; i++)
{
for(new s = i; s < current_race_members; s++)
{
if(cps_done[s] > cps_done[i] || cps_done[s] == cps_done[i] && GetPlayerDistanceFromPoint(..., cppos[cps_done[s] % RACE_CPS_AMOUNT], ...) < GetPlayerDistanceFromPoint(..., cppos[cps_done[i] % RACE_CPS_AMOUNT], ...))
{
//swap
}
}
}