[Help] Function and Command
#1

Okay, first of all, I use the southclaw GM and I'm adapting the same, on the server I developed a store, that by clicking on the buy button, the intention was for some function to check if the player has the necessary items in the inventory, then To check, I did this:

pawn Code:
new itemid;
    new tmp[5 + ITM_MAX_NAME + ITM_MAX_TEXT + 1];

    for(new i; i < GetPlayerInventorySize(playerid); i++)
    {
        itemid = GetInventorySlotItem(playerid, i);

        if(!IsValidItem(itemid))
            break;

        GetItemName(itemid, tmp);
    }
So, above it is probable that he takes the names of the items in the inventory of the player, i would like to know if has some command or function, that verifies if inside this item has a item "tal" for example:

In case of these items, contain the items: "potato" and "tomato" it will perform an action, otherwise it will perform another action.

these actions I know how it does, what I do not know is to do this check of the item, if anyone can help me, I will be very grateful, thanks in advance.
Reply
#2

Someone knew? Sorry the double post
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)