23.09.2016, 23:55
why is showing me only player who have more than 500.000$ in the bank ? i added to see in the hand and bank if you have 500k dosen't matter where you have more than 500k
Код HTML:
CMD:richlist(playerid, params[]) { if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!"); if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai gradul necesar ca sa folosesti aceasta comanda!"); const max_sort = 20; new string[500 + (MAX_PLAYER_NAME+1)*max_sort]; new Cache:result = mysql_query(handle, "SELECT `Name`,`Cash`,`Account`,`HoursPlayed` FROM `players` WHERE `Cash` > 500000 AND `Account` > 500000 ORDER BY `Cash` > 500000 AND `Account` > 500000 DESC LIMIT 20"); new tmp = cache_num_rows(); if(tmp) { strcat(string,"Nume\tBani la el\tBani in banca\tOre jucate\n"); for(new i,a[11],c[11],h[11],n[MAX_PLAYER_NAME]; i<tmp; i++) { cache_get_field_content(i, "Name", n); cache_get_field_content(i, "Cash", c); cache_get_field_content(i, "Account", a); cache_get_field_content(i, "HoursPlayed", h); format(string,sizeof(string),"%s%s\t%d\t%d\t%d\t%d\n",string,n,strval©,strval(a),strval(h)); } } cache_delete(result); if(string[0] == EOS) return SendClientMessage(playerid, COLOR_ERROR, "Nu sunt playeri ce au peste 500.000$ la ei sau in banca"); ShowPlayerDialog(playerid, 525242, DIALOG_STYLE_TABLIST_HEADERS, "Top 10 jucatori bogati", string, "Iesi", ""); return 1; }