10.03.2014, 19:40
Hello all,
I have a problem with sorting wanted players.
I am using this code:
And it returns in print:
What it should do is sorting the top 5 wanted players on order(66,35,33,22,11) with the returning playerid.
What i am doing wrong?
PS: I am using Slice his include:
https://sampforum.blast.hk/showthread.php?tid=343172
Admigo
I have a problem with sorting wanted players.
I am using this code:
pawn Код:
//Top of script
enum e_wanted_level_sort_data {E_WANTED_PLAYERID, E_WANTED_LEVEL};
new WantedLevel2[MAX_PLAYERS][e_wanted_level_sort_data];
//Command
WantedLevel2[0][E_WANTED_LEVEL]=66;
WantedLevel2[1][E_WANTED_LEVEL]=22;
WantedLevel2[2][E_WANTED_LEVEL]=33;
WantedLevel2[3][E_WANTED_LEVEL]=11;
WantedLevel2[4][E_WANTED_LEVEL]=35;
SortDeepArray(WantedLevel2, E_WANTED_LEVEL);
for (new i = 0; i < 5; i++) {
printf("e_wanted_level_sort_data[%d] = {%d,%d}", i, WantedLevel2[i][E_WANTED_PLAYERID],WantedLevel2[i][E_WANTED_LEVEL]);
}
pawn Код:
[19:40:08] e_wanted_level_sort_data[0] = {0,0}
[19:40:08] e_wanted_level_sort_data[1] = {0,0}
[19:40:08] e_wanted_level_sort_data[2] = {0,0}
[19:40:08] e_wanted_level_sort_data[3] = {0,0}
[19:40:08] e_wanted_level_sort_data[4] = {0,0}
What i am doing wrong?
PS: I am using Slice his include:
https://sampforum.blast.hk/showthread.php?tid=343172
Admigo


