CMD:wfdebt help
#4

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.
Reply


Messages In This Thread
CMD:wfdebt help - by MrCallum - 25.08.2016, 13:56
Re: CMD:wfdebt help - by DarkSkull - 25.08.2016, 14:03
Re: CMD:wfdebt help - by [XST]O_x - 25.08.2016, 14:03
Re: CMD:wfdebt help - by DarkSkull - 25.08.2016, 14:08
Re: CMD:wfdebt help - by MrCallum - 25.08.2016, 14:11
Re: CMD:wfdebt help - by DarkSkull - 25.08.2016, 14:22
Re: CMD:wfdebt help - by MrCallum - 25.08.2016, 15:00

Forum Jump:


Users browsing this thread: 1 Guest(s)