SA-MP Forums Archive
RemoveItem (PInevntory) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: RemoveItem (PInevntory) (/showthread.php?tid=332834)



RemoveItem (PInevntory) - muhib777 - 09.04.2012

https://sampforum.blast.hk/showthread.php?tid=280696

Код:
if(strcmp("/sw", cmdtext, true) == 0)
    {
    new Seaweed = Create_Item("Seaweed");
    Add_Item(playerid, Seaweed);
    return 1;
    }
Код:
if(strcmp("/swoff", cmdtext, true) == 0)
    {
    new Seaweed = Create_Item("Seaweed");
    Remove_Item(playerid, Seaweed, 1);
    return 1;
    }
So when I use /sw it appears in the inventory but when I do /swoff it doesn't remove any seaweed how do I sort it out?


Re: RemoveItem (PInevntory) - TzAkS. - 09.04.2012

Try like this.
Код:
if(strcmp("/swoff", cmdtext, true) == 0)
    {
    Remove_Item(playerid, Seaweed, 1);
    return 1;
    }



Re: RemoveItem (PInevntory) - muhib777 - 09.04.2012

Quote:
Originally Posted by TzAkS.
Посмотреть сообщение
Try like this.
Код:
if(strcmp("/swoff", cmdtext, true) == 0)
    {
    Remove_Item(playerid, Seaweed, 1);
    return 1;
    }
I end up getting this

error 017: undefined symbol "Seaweed"


Re: RemoveItem (PInevntory) - muhib777 - 11.04.2012

bump