Inventory
#8

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
pawn Код:
GiveItem(playerid, item[], amount)
{
    for(new i; i < 25; i++)
    {
        if(!strcmp(InventoryInfo[playerid][i][ItemName], item))
        {
            return InventoryInfo[playerid][i][ItemCount] += amount;
        }
    }
       
    for(new i; i < 25; i++)
    {
        if(!InventoryInfo[playerid][i][ItemCount])
        {
            format(InventoryInfo[playerid][i][ItemName], 32, item);
            return InventoryInfo[playerid][i][ItemCount] = amount;
        }
    }
    return 0;
}
If it doesn't give you the item, then "InventoryInfo[playerid][i][ItemCount]" is not 0.
It does give me the item, but the item's name is always blank.
Reply


Messages In This Thread
Inventory - by GoldenLion - 07.10.2016, 14:40
Re: Inventory - by Luicy. - 07.10.2016, 16:40
Re: Inventory - by SickAttack - 07.10.2016, 17:50
Re: Inventory - by Pearson - 07.10.2016, 17:51
Re: Inventory - by GoldenLion - 07.10.2016, 19:37
Re: Inventory - by GoldenLion - 08.10.2016, 11:52
Re: Inventory - by SickAttack - 08.10.2016, 13:57
Re: Inventory - by GoldenLion - 08.10.2016, 14:48
Re: Inventory - by SickAttack - 08.10.2016, 14:58
Re: Inventory - by GoldenLion - 08.10.2016, 15:15

Forum Jump:


Users browsing this thread: 1 Guest(s)