Jump to content
Sign in to follow this  
Hercx

Addon Item setLbData to classname, in inventory UI

Recommended Posts

hey guys,

been stuck on this one for almost a week now and can't figure it out. What I need is my Addon object once picked up with the standard in game inventory UI. to add label data, to the UI list box, simply the class name of the object. the inventory ui does this with magazines, weapons and other items but not with my addons items.

Addon class config:

class CfgPatches
{
class A3_HercxMedical_F_Items
{
	units[] = {};
	weapons[] = {"Hercx_Bloodbag"};
	requiredVersion = 0.1;
	requiredAddons[] = {"A3_Weapons_F"};
};
};
class CfgWeapons
{	
class ItemCore;
class MedikitItem;

class Hercx_Bloodbag: ItemCore
{
	scope = 2;
	displayName = "Bloodbag";
	model = "\Medical\BloodBag_F.p3d";
	picture = "\Medical\Images\BloodBag_F.paa";
	descriptionShort = "IV bloodbag for bloodloss";
	class ItemInfo: MedikitItem
	{
		mass = 8;
		allowedSlots[] = {801,701,901};
	};
};
};

class CfgVehicles
{
class Item_Base_F;
class Hercx_Item_Bloodbag: Item_Base_F
{
	scope = 2;
	scopeCurator = 2;
	displayName = "Bloodbag";
	vehicleClass = "Items";
	class TransportItems
	{
		class Hercx_Bloodbag
		{
			name = "Hercx_Bloodbag";
			count = 1;
		};
	};
};
};

Any help with this would be much appreciated

Cheers

Hercx

Share this post


Link to post
Share on other sites

looks as if you're trying to Inherit the functions of the medkit but replace the model and textures. if that's the case then all you need to do is Inherit everything from the medkit and just change the things you want to change.

class CfgWeapons
{
       class Medikit;
class Hercx_Bloodbag: Medikit
{
	scope = 2;
	displayName = "Bloodbag";
	model = "\Medical\BloodBag_F.p3d";
	picture = "\Medical\Images\BloodBag_F.paa";
	descriptionShort = "IV bloodbag for bloodloss";
};
};

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×