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.