Jump to content

Config Traders Questions


lonewolfgaming

Recommended Posts

I am considering converting my server to use the config traders instead of off the database SQL. I have researched it and found out a premade trader list, like the one in Zupa's Coin script is a good place to start. My question is, does the server still access the database to know what items the traders are selling through their trader id? I noticed in the Zupa file it has the items set up similiar to how the server traders.sqf is.

Link to comment
Share on other sites

config trader don't need/use anything from database

traders list all item with the category id that you gave him

 

for exemple

in your cfg files:

class Category_100 { <--- here it is category 100
    class CSJ_GyroC {type = "trade_any_vehicle";buy[] ={4000,"Coins"};sell[] ={2000,"Coins"};};

    class CSJ_GyroCover {type = "trade_any_vehicle";buy[] ={4000,"Coins"};sell[] ={2000,"Coins"};};

........................etc

 

now set this number to a trader in server_trader.sqf:

// Aircraft Trader, NEAF
menu_Pilot_EP1 = [
    [["Gyro Copter",100],["Cargo Planes",102],["Airplanes Unarmed",103],["Airplanes Armed",104],["Helicopter Unarmed",105]],
    [],
    "neutral"
];

Gyro Copter = this is the category name that shows ingame on trader it list all helis under the cat id 100

 

Link to comment
Share on other sites

3steN8igall, one more question. I sat down and looked at the cfg server trader folder today and I am wondering about something. Take for example, FriendlyAssultRifle has the line class Category_485 { with the available weapons under it. Can all three weapon traders have the same class Category of 485, or do I need to copy and paste the weapons under a different class Category number?

Link to comment
Share on other sites

Ok, got the config trader running with the game base traders, but when I enter the info for my custom traders and try to log in the game errors out with this: File.mpmissions\DayZ_Epoch_11.Chernarus\description.ext,line213:/CfgTraderCategory/Category_696/Category_699/Category_695/Category_694/Category_698/Category_693/;Missing'}'  I have the info entered in under the name of the trader,i.e, ConstructionBuildingSupplies.hpp and have #include it in the Cfg Trader.hpp. Do I need to change the first part to one of the current listing like Bandit, Friendly, Neutral or Hero?

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

×
×
  • Create New...