Jump to content
  • 0
Sign in to follow this  

Adding Things To The Traders


Hey der guise! I was hoping one of you could give me a detailed walkthrough on how to add custom vehicles and weapons with their ammo to the traders, I am COMPLETELY new to this so don't throw weird commands at me without explaining them completely please :P Thanks!!

Share this post

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0




 1- Look at your mission.pbo/server_traders.sqf

You will found a list with all your server traders and their TIDS.

// Bandit Trader
menu_RUS_Soldier2 = [
[["Ammunition",577],["Clothing",575],["Helicopter Armed",512],["Military Armed",569],["Trucks Armed",534],["Weapons",627]],
( for exemple Helicopter Armed TIDS is 512 ... Keep this number
2- Go to your data base and open your trader_tiems table...
click on insert and complete the box like this for adding UH1Y with ammo at each restart:
ID :  let it blank 
Class Name : UH1Y_DZ
Type : 2
Group : Helicopter Armed
Afile : trade_any_vehicle
3- Open your trader_data table and click on insert.
Complete the box like this:
ID: leave it blank
Item : ["UH1Y_DZ",2]
Qty : 30
Buy : [6,"ItemBriefcase100oz",1]
Sell :  [1,"ItemBriefcase100oz",1]
order : 0
TID : 512
afile : trade_any_vehicle
Now close your data base and restart your server.
The bandit trader now sell a UH1Y with full ammo at restart.
This is how to add any vehicle to any trader. You can do the same path to add other item to the right trader but in this case you will need to modify some stuff like the afile, the tid, etc...
UH1Y_DZE = vehicle without ammo at restart
UH1Y_DZ   = vehicle with ammo at restart.

Share this post

Link to post
Share on other sites
  • 0

Hey der guise! I was hoping one of you could give me a detailed walkthrough on how to add custom vehicles and weapons with their ammo to the traders, I am COMPLETELY new to this so don't throw weird commands at me without explaining them completely please :P Thanks!!

 Ok I'll try and make this an simple explanation.


In your mission folder you will see a script called server_traders.sqf. This is what you'll need to use as reference for adding items to the proper traders. Here is the snippet for Hero Trader so you can see what we're looking at.

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

It lists all the menus that will show up for the Hero Trader, and each has a # ID which will be required when adding your new items into the database. Now for adding new items to your database, simply create a notepad document, and save it as trader_data.sql


Inside this you'll need to add all the items you want individually for each trader for the appropriate menu. Here is an example of what it'll look like.



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

('["ItemKiloHemp",1]', 50, '[3,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]',0, 541, 'trade_items'),

('["ItemKiloHemp",1]', 50, '[3,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]',0, 665, 'trade_items'),

('["ItemKiloHemp",1]', 50, '[3,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]',0, 670, 'trade_items');



This is the item ID



This is the item type, types are as follows.

1 = Items

2 = Vehicles/Backpacks

3 = Weapons

If you're unsure what type an item should be, browse your trader_data in database for similar items.



This is the amount of the item a trader will carry.



This is how much an item costs to buy [Amount,"CurrencyItemType",1] from what I can tell the 1 at the end of it never changes.



This is how much an item will sell for (how much you make selling it) Works the same as buying.



This is the trader menu id, as seen in the server_traders.sqf



This is the trade type. Trade types are as follows.






One more thing to note, when you look at the example for the sql file I made, you'll see each line ends with ")," and the last line ends with ");". Make sure that only the last line ends with the ";" or you may encounter issues. Once you have everything added to your custom sql file, go into your database and import it.


Hope that helps.

Share this post

Link to post
Share on other sites
  • 0

I'm trying to add a black market trader to Taviana.

I have managed to create the vendor's kiosk inside the neutral vendor city in Lypestok.

And the trader appears, along with all the props I put in.


So, I'm ready to setup the menu, and the categories and black market weapons and black market ammo.



My question is this, I added him to the server_traders.sqf as such: (I'm assuming that the 452 and 453 are menus)


//Black Market Vendor
menu_Soldier_GL_M16A2_PMC = [
    [["Black Market Weapons",452],["Black Market Ammo",453]],


I'm stuck here. Don't know how to proceed. Will this only show partial list of weapons and ammo? Since the database has
other weapons and other ammo (for black market) with more id numbers than just the two I show here; 452 and 453.


And my database already has weapons (which I did not add, but they were there) for the black market trader.

In the database, under trader_ids is the following:


id          name                                  trader

453       black market ammo            140

460       black market ammo            142

527       black market ammo            154

456       black market ammo            141


452       black market weapons       140

526       black market weapons       154

455       black market weapons       141

459       black market weapons       142


Generally, black market traders only have 3 categories in the menus, black market weapons, black market ammo, and explosives,

unlike the other vendors that have assault rifles, sniper rifles, etc.


I copied the code from an existing vendor under neutral vendors in the server_traders.sqf

Of course, the skin, or model I used, was already setup in the database for use as a black market vendor.


I'm really new at this, and am surprised I even got this far; don't want to screw it up now.


[Edited] It would appear that I have to go into the database, and change the460, 527, and 456 to all be 453.
And the 526, 455. and 459 to all be 452.



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By EditedSnowHD
      Hallo all,
      First I want to say i'm not the owner of this server. I just really like the server! Why?
      Well it reminds me of the good old days, and it has an 'OG Epoch feeling'. This is because the map isn't edited and the loot is really balanced. 
      You can't just join, get 25000 coins and start shooting with a tank. It's not like those servers. Ow and another thing, if you open up a map, you won't see like 300 activities all going on at once, not turbid at all. 
      The server also uses the original silver/gold system and everything you find/build/shoot feels really rewarding. 
      The addons added to the server really add something special to the experience on the server, and not distract you from the original feeling.
      I have just played for a few days on the server, and there a few standard players (and the owner is really kind!). But we're still looking to share this amazing experience with other people who might be searching for the 'OG Epoch feeling'.
      Already sold? Here is the Server IP: port: 2302 , Server name: [EU][PvP] GGWEZ DayZ Epoch Chernarus - FreshDB | HC | Gemcrafting
      Link to loading screen and rules: https://imgur.com/a/kIsfXaX

      Deploy Bike (old bike).
      Gem Crafting (static Weapons, decorations and more).
      AI Base.
      Custom Vehicles.
      Indestructible bases.
      Take Clothes.
      Spawn Selection.
      Custom Economy and Loot (Really well balanced IMO).
      Lift object with heli.
      Custom Trader City (Really cozy).
      Refuel at gasstation.
      Street, -Buildinglights (for at night).
      and much more!
      There also is a Discord channel where you can meet up and share info (like about the AI base or player builds).
      Discord: discord.gg/M6w2fun
      Staff: Drashyy & Mfkrp9 & EditedSnow
      If you have any more questions, feel free to contact me! Hope to see you in Chernarus.
      Edit 10-05-2020: I'm now part of the staff! Im a moderator on their discord.

    • By THAC0_Gewch
      Updated for 1.0.6.x
    • By MysteryGamersElite
      [EU/UK] SDF Epoch|Wiped April 1st|FPS++|WAI & DZMS|SSD|Coins|Hourly Paycheck|Custom Loot| AND MORE....
      Server IP:
      Discord: https://discord.gg/BWJCjTe
      We offer 24 hour support via discord for any questions or issues with your game!
      Top Server Feature List:
      - Modded DZMS and WAI Mission System
      - Custom High Loot Tables and Improved Dynamic Vehicle Spawns
      - Paycheck Every Hour
      - Coin Based Currency with Storage Banking only
      - Deploy Bike & Mozzie
      - Locate Vehicle
      - Snap Build Pro
      - Group Management
      - Repair, Refuel and Rearm at Service Stations
      - Vehicle Key Changer
      - infiSTAR AntiHack
      - Virtual Garage
      - Change View Distance with Binoculars
      - 3 Hour Restarts starting from Midnight GMT
      - Garage Door Opener
      - Take Clothes
      - Indestructible Bases except doors
    • By Pickle Rick
      Stop on by Rods server,  ask for Pickle Rick or OTRod...  we'll give ya a free tank. 

  • Advertisement
  • Supporters
  • Discord

  • Create New...