Help inventory sell item
#1

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$
Reply
#2

Код:
	
   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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)