Loot questions
#1

Hello I'm using a loot system which spawns random items on the floor etc and I've made Cookies as loot as I have the servers currency to cookies the only problem is that the inventory system requires you to use the item before having the effect done.
For example:
Код:
OnPlayerUseItem(playerid,ItemName[])
{
	if(!strcmp(ItemName,"Cookie",true))
	{
            if(pInfo[playerid][pCookies] += 1) return SendClientMessage(playerid,-1,"*"COL_WHITE" You have added one cookie to your currency.You can eat your cookies with /eatcookie.");
	    pInfo[playerid][pCookies] += 1;
	    RemoveSlotToInventory(playerid,"Cookie",1);
	}
}
Код:
pInfo[playerid][pCookies] += 1;
Makes it so when the loot is used it adds the Cookie to the currency but I want it so that when I pick up the loot it automaticly adds the Cookie to the currency without having to use it
May I be assisted please?
Reply


Messages In This Thread
Loot questions - by Hybris - 13.04.2015, 12:59
Re: Loot questions - by BleverCastard - 13.04.2015, 13:01
Re: Loot questions - by Hybris - 13.04.2015, 13:03
Re: Loot questions - by BleverCastard - 13.04.2015, 13:12
Re: Loot questions - by Hybris - 13.04.2015, 13:42
Re: Loot questions - by BleverCastard - 13.04.2015, 13:55

Forum Jump:


Users browsing this thread: 2 Guest(s)