17.11.2018, 21:19
use variable to count, if count is 0 then send bag is full msg
pawn Код:
new iCount = 0;
for(new i = 0; i < 10; i++)
{
if(Bag[playerid][i][Slot] == 0)
{
Bag[playerid][i][Slot] = 1279;
Bag[playerid][i][Unity] = 100;
iCount = 1;
break; //i think you need this else it will set all slots which are empty to new item...
}
}
if (iCount == 0) return SendClientMessage(playerid, -1, "Your bag is full.");