11.11.2014, 20:33
It shows only 1 player, how can i make it for all?
Код:
if (strcmp(cmdtext, "/richlist") == 0) { new sendername[MAX_PLAYER_NAME], cashstring[128], fstring[128]; for(new i = 0; i<MAX_PLAYERS; i++) { if(GetPlayerMoney(i) >= 25000000) { GetPlayerName(i, sendername, sizeof(sendername)); format(cashstring, sizeof(cashstring), "{ffffff}Name:{beea1a} %s {ffffff}Cash: {00e0e5}%s\n", sendername, DecimalPoint(GetPlayerMoney(i))); strcat(fstring, cashstring, sizeof(fstring)); } } ShowPlayerDialog(playerid, 3133, DIALOG_STYLE_LIST, "Rich Players", cashstring, "Close", ""); return 1; }