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