Help inventory sell item - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help inventory sell item (
/showthread.php?tid=120420)
Help inventory sell item -
Giotis11 - 11.01.2010
hi i need your help
Код:
if (strcmp(cmdtext, "/selltabaco", true)==0)
{
RemoveItemFromPlayerInventory(playerid,1,1);
PlayerHasItemInInventory(playerid,1);
GivePlayerMoney(playerid,100);
return 1;
}
if you wi=rite the command in server give to you $ and ramoves on tabaco but if you press the command again gives to you 100$ and don't ramove a tabaco becouse you don't have how i can make it to ramove one tabaco and give you 100$
Re: Help inventory sell item -
armyoftwo - 11.01.2010
Код:
if (strcmp(cmdtext, "/selltabaco", true)==0)
{
if(PlayerHasItemInInventory(playerid,1))
{
RemoveItemFromPlayerInventory(playerid,1,1);
GivePlayerMoney(playerid,100);
}
return 1;
}
try this.. i am not sure if it works