Inventory function help
#4

Quote:
Originally Posted by CyNiC
Посмотреть сообщение
This should work.
pawn Код:
forward AddItemToBag(playerid, itemid);
public AddItemToBag(playerid, itemid)
{
    if(PlayerInfo[playerid][pBagSlot1] == 0)
    {
        PlayerInfo[playerid][pBagSlot1] = itemid;
        return 1;
    }
    else if(PlayerInfo[playerid][pBagSlot2] == 0)
    {
        PlayerInfo[playerid][pBagSlot2] = itemid;
        return 1;
    }
    else if(PlayerInfo[playerid][pBagSlot3] == 0)
    {
        PlayerInfo[playerid][pBagSlot3] = itemid;
        return 1;
    }
    else if(PlayerInfo[playerid][pBagSlot4] == 0)
    {
        PlayerInfo[playerid][pBagSlot4] = itemid;
        return 1;
    }
    else if(PlayerInfo[playerid][pBagSlot5] == 0)
    {
        PlayerInfo[playerid][pBagSlot5] = itemid;
        return 1;
    }
    return SendClientMessage(playerid, COLOR_NORMALRED, "( ! ) Your Bag is full");
}
I already got it working. However, thanks
Reply


Messages In This Thread
Inventory function help - by sim_sima - 25.10.2011, 16:35
Re: Inventory function help - by sim_sima - 06.11.2011, 11:26
Re: Inventory function help - by CyNiC - 06.11.2011, 12:48
Re: Inventory function help - by sim_sima - 08.11.2011, 15:45

Forum Jump:


Users browsing this thread: 2 Guest(s)