19.10.2018, 20:01
(
Последний раз редактировалось g1venchy; 19.10.2018 в 22:57.
)
PHP код:
new arrPlayers[MAX_PLAYERS],
cnt,
j,
k,
bool:startAgain=false,
s[300];
foreach(new i:Player){
if(Player[i][pGroup] == gattacker || Player[i][pGroup] == gattacked)arrPlayers[cnt++]=i;
}
for(new i; i < cnt; i++){
j=arrPlayers[i];
k=arrPlayers[i+1];
if(Player[j][Kills] > Player[k][Kills])arrPlayers[i+1]=j,arrPlayers[i]=k,startAgain=true;
if(i==cnt-1 && startAgain)i=0,startAgain=false;
}
for(new i; i < cnt; i++){
j=arrPlayers[i];
format(s, sizeof(s), "%s\n%d\t%s\t%d", s, Player[j][pID], Player[j][Name], Player[j][Kills]);
}