[FilterScript] Simple Inventory System
#13

I did a simple UseItem function

Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if (dialogid == INVENTORY_DIALOG)
	{
	new item_name[50], get_id = -1;
		if (response)
			{
        	get_id = ArrayList::Get(InventoryList[playerid], PlayerInventory[playerid][i_item_type][listitem] - 1);
        	
		if(get_id + 1 == 1) return GivePlayerWeapon(playerid, 24, 100), SendClientMessage(playerid, -1, "You succesfully takes your weapon!"),PlayerInventory[playerid][i_item_amount][listitem] -= 1;
		if(get_id + 1 == 2) return SetPlayerHealth(playerid, 100.0), SendClientMessage(playerid, -1, "You succesfully sets your health full!"),PlayerInventory[playerid][i_item_amount][listitem] -= 1;
		if(get_id + 1 == 3) return ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.1, 0, 1, 1, 0, 0, 1), SendClientMessage(playerid, -1, "You succesfully eats your burger!"),PlayerInventory[playerid][i_item_amount][listitem] -= 1;
		get_id = -1;
			}
	}
	return 1;
}
Reply


Messages In This Thread
Simple Inventory System - by Ivan_Ino - 11.07.2016, 19:15
Re: Simple Inventory System - by SickAttack - 11.07.2016, 19:46
Re: Simple Inventory System - by Ivan_Ino - 11.07.2016, 20:05
Re: Simple Inventory System - by Markdrifter18 - 11.07.2016, 22:40
Re: Simple Inventory System - by feheristi97 - 11.07.2016, 22:50
Re: Simple Inventory System - by bybaran - 13.07.2016, 11:02
Re: Simple Inventory System - by Ivan_Ino - 13.07.2016, 12:18
Re: Simple Inventory System - by Hunud - 13.07.2016, 12:38
Re: Simple Inventory System - by bybaran - 13.07.2016, 16:51
Re: Simple Inventory System - by Max_Andolini - 13.07.2016, 17:29
Re: Simple Inventory System - by Ivan_Ino - 13.07.2016, 18:31
Re: Simple Inventory System - by Crayder - 13.07.2016, 18:54
Re: Simple Inventory System - by bybaran - 13.07.2016, 21:08
Re: Simple Inventory System - by Ivan_Ino - 13.07.2016, 21:41
Re: Simple Inventory System - by feheristi97 - 14.07.2016, 00:53
Re: Simple Inventory System - by Ivan_Ino - 14.07.2016, 01:00
Re: Simple Inventory System - by bybaran - 14.07.2016, 08:10
Re: Simple Inventory System - by Ivan_Ino - 14.07.2016, 10:24
Re: Simple Inventory System - by bybaran - 15.07.2016, 07:42
Re: Simple Inventory System - by Ivan_Ino - 15.07.2016, 10:30
Re: Simple Inventory System - by bybaran - 15.07.2016, 12:19
Re: Simple Inventory System - by Ivan_Ino - 15.07.2016, 15:23
Re: Simple Inventory System - by Reijo - 03.09.2017, 21:05

Forum Jump:


Users browsing this thread: 7 Guest(s)