Jump to content
  • 0

Adding new trader items


SilverWind252

Question

5 answers to this question

Recommended Posts

  • 0

Ok you have to bare with me here if i miss anything as i have 100% custom traders on my server so have had to pull this info from the vanilla epoch files..

 

in server_traders.sqf you will have this for your hero trader (if using chernorus 11)

// Hero Vendor
menu_RU_Functionary1 = [
    [["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477]],
    [],
    "hero"
];

to add another menu option you have to add another block to the 3rd line. I have added the option "test" and used the tid of 9999

// Hero Vendor
menu_RU_Functionary1 = [
    [["Ammunition",478],["Clothes",476],["Helicopter Armed",493],["Military Armed",562],["Trucks Armed",479],["Weapons",477],["Test",9999]],
    [],
    "hero"
];

Save this and upload your changed files for your menu to appear at the trader.

 

 

 

 

To add items to that menu, you need to add them into the database using the 9999 tid. to do this you need to access your database (not sure how you do it with dayz.st but there will prob be a link in the control panel for it)

 

The code below, will add a combo lock to the hero trader in the new test menu.

INSERT IGNORE INTO `traders_data` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES

('["ItemComboLock",1]',10,'[1,"ItemBriefcase100oz",1]','[5,"ItemGoldBar10oz",1]',0,9999,'trade_items');
 
Link to comment
Share on other sites

  • 0

So I added ItemKeyKit to my trader. Everything works but when I look at the description on the trader it just shows (Itemkeykit). All the other tiesm will have the description and them the (). for instance, it should look like this Keykit (Itemkeykit) on the trader. Any thoughts on how I can add the description.

Link to comment
Share on other sites

  • 0

So I added ItemKeyKit to my trader. Everything works but when I look at the description on the trader it just shows (Itemkeykit). All the other tiesm will have the description and them the (). for instance, it should look like this Keykit (Itemkeykit) on the trader. Any thoughts on how I can add the description.

 

this is the database string

6828    ["ItemKeyKit",3]    1000    [1,"ItemBriefcase100oz",1]    [5,"ItemGoldBar10oz",1]    0    679    trade_weapons
Link to comment
Share on other sites

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
  • Discord

×
×
  • Create New...