18.11.2013, 20:49
Alright, hello. So I'm trying to create a system which gives the item to a slot if it's free. Like if slot 2 is taken it'll set it to 3 etc. However, this sets all my slots to the amount I put, so I'm wondering how do I make it that if slot 1 is taken it just sets it to slot 2?
The code I made:
The code I made:
pawn Код:
for(new i = 0; i < 10; i++)
{
if(i != 10)
{
if(PlayerInfo[playerid][pSlot][i] == 0)
{
PlayerInfo[playerid][pSlot][i] = item;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "ERROR:{FFFFFF} Your inventory is full.");
}
}