Brit

[SOLVED] Cherno Trader Items

6 posts in this topic

Posted (edited)

Hi,

I have had a look on the forum for adding items to specific traders but i can't seem to find any good posts about it so i was wondering if some one cal help me. I have added custom traders to my Cherno mission and added all the custom objects to "initServer.sqf" and the map markers to the "mission.sqm" and they all all working fine but what i can't figure out is how to add items to specific traders i have place around the map because at the moment when i click trade the list is empty but i can sell items to them.

If someone does not mind and can give me one trader and one item example i can build from there.

Thanks is advance!

Edited by Brit

Share this post


Link to post
Share on other sites

You need to add the item list to the trader as defined in the config.cpp in your mission file. eg:

	class Community
	{
		name = "Community Items";
		icon = "a3\ui_f\data\gui\Rsc\RscDisplayArsenal\uniform_ca.paa";
		items[] = 
		{
			"Exile_Item_InstaDoc",
			"Exile_Item_Vishpirin",
			"Exile_Item_Bandage",
			"Exile_Item_DuctTape",
			"Exile_Item_PlasticBottleFreshWater",
			"Exile_Item_Beer",
			"Exile_Item_Energydrink",
			"Exile_Item_EMRE",
			"Exile_Item_Cheathas",
			"Exile_Item_Noodles",
			"Exile_Item_BBQSandwich",
			"Exile_Item_Surstromming",
			"Exile_Item_Catfood",
			"Exile_Item_CanOpener",
			"Exile_Melee_Axe",
			"Exile_Item_CookingPot",
			"Exile_Item_Matches",
			"rhs_mag_9x18_12_57N181S",
			"rhs_weap_makarov_pmm",
			"B_AssaultPack_blk",
			"B_FieldPack_blk",
			"TRYK_shirts_DENIM_BL_Sleeve"
			
		};
	};

for the Community trader

Share this post


Link to post
Share on other sites
Advertisement

Sorry i am still a bit lost...

The traders are just objects in  "initServer.sqf" but how do i define them and add them like you said ?

Share this post


Link to post
Share on other sites

Your traders should be defined in initPlayerLocal.sqf, eg:

_trader = [
    "Community",
    "GreekHead_A3_01",
    ["InBaseMoves_table1"],
    [0.1, 0.5, 0.2],
    170,
    _cashDesk
]
call ExileClient_object_trader_create;	
_trader setVariable ["ExileTraderType", "Community"];

Defines a trader of type "Community". So he will sell the items defined in config.cpp as being sold by a "Community" trader

Share this post


Link to post
Share on other sites

Hi,

I have done that so now i can see the trader but he is still showing 0 items in his list, here is my trader code.

Quote

_trader = 
[
    "Exile_Trader_Hardware",
    "WhiteHead_17",
    ["AidlPercMstpSnonWnonDnon_G01", "AidlPercMstpSnonWnonDnon_G02", "AidlPercMstpSnonWnonDnon_G03", "AidlPercMstpSnonWnonDnon_G04", "AidlPercMstpSnonWnonDnon_G05", "AidlPercMstpSnonWnonDnon_G06"],
    [2509.71,5098.28,0.033432],
    0
]
call ExileClient_object_trader_create;

_trader setVariable ["ExileTraderType", "Exile_Trader_Hardware"];

 

Share this post


Link to post
Share on other sites

Ok i got it now, thank you secong_coming for your help bro it's very much appreciated!

If anyone else is stuck hit me up and i will be happy to help you get setup :)

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.