Posts: 723
Threads: 366
Joined: Jun 2016
Hi,
What easiest and shortest way making top10 by money, score? maybe using sorting functions? but i want to write money, score or whatever and top player name. But also if i want to make any top, top20, top100 how it look. I know with mysql it's easy but how do with pawn
Posts: 217
Threads: 42
Joined: Aug 2016
Reputation:
0
I don't know much but it will contain your register system's things
Posts: 723
Threads: 366
Joined: Jun 2016
What? don't want do mysql i want in pawn
Posts: 723
Threads: 366
Joined: Jun 2016
No you don't understand

i only use online players with variables nothing load stats
Posts: 723
Threads: 366
Joined: Jun 2016
for(new t = top; t >= 0; t--)
{
top using getplayerscore? what if score 1million? it do cikle million times? and then max_players 1000000*MAX_PLAYERS ?
Posts: 723
Threads: 366
Joined: Jun 2016
Quote:
Originally Posted by SickAttack
|
Код:
stock OrdenarLista(list[],out_pos[],size=sizeof(list), bool:desc=false) {
if(size <= 1) return 0;
QuickSort(list,out_pos,0,size-1,desc);
return 1;
}
stock QuickSort(v[],index[],b,t,desc)
{
new
pivote,
t_var,
vp,i;
if(b<t) {
pivote=b;
vp=v[pivote];
for(i=b+1; i<=t; i++){
if(desc?(v[i]>vp):(v[i]<vp)) {
pivote++;
t_var=v[i];
v[i]=v[pivote];
v[pivote]=t_var;
t_var=index[i];
index[i]=index[pivote];
index[pivote]=t_var;
}
}
t_var=v[b];
v[b]=v[pivote];
v[pivote]=t_var;
t_var = index[b];
index[b] = index[pivote];
index[pivote] = t_var;
QuickSort(v, index,b, pivote-1,desc);
QuickSort(v, index,pivote+1, t,desc);
}
}
out_pos what it mean
Please show example with this function