Quote:
Originally Posted by [XST]O_x
pawn Код:
CMD:wfdebt(playerid, params[]) { new string[ 512 ]; new cnt = 0; new name[ MAX_PLAYER_NAME + 1 ]; foreach(new i: Player) { if(GetPlayerMoney(i) < 0) { cnt++; GetPlayerName(i, name, sizeof name); format(string, sizeof string, "%s\n%s", string, name); } if(cnt == 0) { //No players in debt } else { ShowPlayerDialog(..., string, ...); } } return 1; }
|
That won't work becuase you're checking if the Money of the player is less than '0'.
EDIT: Sorry, I forgot about cash going negative, My bad.