Jump to content
  • 0

Enable Metal Floors in Traders?


JohnyMST

Question

18 answers to this question

Recommended Posts

  • 0

Is there any specific TID or afile number for this or can I use the template below and just change the item name:

 

INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["ItemComboLock",1]', 10, '[6,"ItemGoldBar",1]', '[3,"ItemGoldBar",1]', 662, 'trade_items'),('["ItemComboLock",1]', 10, '[6,"ItemGoldBar",1]', '[3,"ItemGoldBar",1]', 530, 'trade_items'),('["ItemComboLock",1]', 10, '[6,"ItemGoldBar",1]', '[3,"ItemGoldBar",1]', 508, 'trade_items');

?

Thanks :)

Link to comment
Share on other sites

  • 0

tid This number must match the trader category id found in the mission file server_traders.sqf

afile Use the following types each of these represent a different .sqf file that performs the work:

  • trade_items
  • trade_weapons
  • trade_any_vehicle
  • trade_any_boat
  • trade_backpacks
Link to comment
Share on other sites

  • 0

 

I like this a lot however I will not be using this on my server. Too much control and I want to keep it to minimum to avoid abusive admins (including myself).

 

 

So I have found the server_traders.sqf and made the following SQL code for Metal Panel Kit.

INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["Metal_Panel_Kit",1]', 50, '[4,"ItemGoldBar",1]', '[2,"ItemGoldBar",1]', 530, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["Metal_Panel_Kit",1]', 50, '[4,"ItemGoldBar",1]', '[2,"ItemGoldBar",1]', 662, 'trade_items');
INSERT INTO traders_data (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES ('["Metal_Panel_Kit",1]', 50, '[4,"ItemGoldBar",1]', '[2,"ItemGoldBar",1]', 508, 'trade_items');

Any Errors?

Please let me know if that will work in all traders where Building Supplies are available.

 

Link to comment
Share on other sites

  • 0

I have added the code above but didn't work yet.

Does this need a restart in order to show up in traders stock?

 

 

Restarts are required for server to see your changes.

 

 

 

// metal_floor_kit
 
INSERT INTO `Traders_DATA` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["metal_floor_kit",1]',100,'[1,"ItemGoldBar",1]','[1,"ItemGoldBar",1]',0,530,'trade_items')
INSERT INTO `Traders_DATA` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["metal_floor_kit",1]',100,'[1,"ItemGoldBar",1]','[1,"ItemGoldBar",1]',0,662,'trade_items')
INSERT INTO `Traders_DATA` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["metal_floor_kit",1]',100,'[1,"ItemGoldBar",1]','[1,"ItemGoldBar",1]',0,508,'trade_items')
 

 

 

// wooden_shed_kit
 
INSERT INTO `Traders_DATA` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["wooden_shed_kit",1]',100,'[5,"ItemGoldBar",1]','[3,"ItemGoldBar",1]',0,530,'trade_items')
INSERT INTO `Traders_DATA` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["wooden_shed_kit",1]',100,'[5,"ItemGoldBar",1]','[3,"ItemGoldBar",1]',0,662,'trade_items')
INSERT INTO `Traders_DATA` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["wooden_shed_kit",1]',100,'[5,"ItemGoldBar",1]','[3,"ItemGoldBar",1]',0,508,'trade_items'
 
// ItemComboLock
 
 
INSERT INTO `Traders_DATA` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["ItemComboLock",1]',100,'[1,"ItemBriefcase100oz",1]','[9,"ItemGoldBar",1]',0,530,'trade_items')
INSERT INTO `Traders_DATA` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["ItemComboLock",1]',100,'[1,"ItemBriefcase100oz",1]','[9,"ItemGoldBar",1]',0,662,'trade_items')
INSERT INTO `Traders_DATA` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["ItemComboLock",1]',100,'[1,"ItemBriefcase100oz",1]','[9,"ItemGoldBar",1]',0,508,'trade_items')
Link to comment
Share on other sites

  • 0

If you are putting the query into mySQL administrator / Workbench / Navicat it will usually be ok without the finishing semi-colon. For multiple queries it is probably best to put them in.

 

Either way you will get an error back if there is a problem.

 

As always with these updates, take a backup first :)

Link to comment
Share on other sites

  • 0

 

Isn't there supposed to be a " ; " on the end of the line? so  it's like:

INSERT INTO `Traders_DATA` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["ItemComboLock",1]',100,'[1,"ItemBriefcase100oz",1]','[9,"ItemGoldBar",1]',0,530,'trade_items');

 

i used heidiSQL to insert the lines i pasted.  i did a line at a time.      well the one line of wooden shed i didnt copy/paste the ")"   

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...