Loop help
#6

pawn Код:
new
    bool: isfull
;

for(new i = 0; i < 10; i++)
{
    if(!PlayerInfo[playerid][pSlot][i])
    {
        PlayerInfo[playerid][pSlot][i] = item;
        isfull = true;
        break;
    }
}

if(!isfull) SendClientMessage(playerid, COLOR_RED, "ERROR:{FFFFFF} Your inventory is full.");
// You may return the message, that depends on what you want.
Reply


Messages In This Thread
Loop help - by Blast3r - 18.11.2013, 20:49
AW: Loop help - by Littl3j0hNy - 18.11.2013, 21:08
Re: Loop help - by Loot - 18.11.2013, 21:23
Re: Loop help - by Blast3r - 20.11.2013, 08:21
Re: Loop help - by DaRk_RaiN - 20.11.2013, 09:22
Re: Loop help - by Konstantinos - 20.11.2013, 09:48

Forum Jump:


Users browsing this thread: 3 Guest(s)