Jump to content
  • 0
Tricks

Want to add radios to traders on a Vilayer server, please.

Question

Hey everyone, I am trying to add radios to my traders, can someone give me the exact SQL query for my database please? I want to charge 1 10oz gold to buy and sell. If possible I would like to sell at all building supply traders under tool belt items. Thanks!!!

Share this post


Link to post
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Regardless of which map you are on, this will be the SQL code you need:
 

INSERT INTO traders_data ('item', 'qty', 'buy', 'sell', 'order', 'tid', 'afile') VALUES
('["ItemRadio",3]', 50, '[1,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]', 0, 510, 'trade_items'),
('["ItemRadio",3]', 50, '[1,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]', 0, 532, 'trade_items'),
('["ItemRadio",3]', 50, '[1,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]', 0, 663, 'trade_items');

which map?

 

Since 1.0.4 (I think?), the traders have unified the category codes. Unless you have changed it to something else, or want a special category for it, these are the Toolbelt Items category ID's.

Share this post


Link to post
Share on other sites
  • 0

Hey Glen, its not working. I am getting an error:

/* SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''["ItemRadio",1]', 50, '[1,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]', 0, ' at line 1 */

I am playing on Epoch Chernaurs on a Vilayer server.

Share this post


Link to post
Share on other sites
  • 0

Hey Glen, its not working. I am getting an error:

/* SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''["ItemRadio",1]', 50, '[1,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]', 0, ' at line 1 */

I am playing on Epoch Chernaurs on a Vilayer server.

Sometime si hate MySQL Syntax soo much. :) 

Try this: 

 

INSERT INTO 'traders_data' ('item', 'qty', 'buy', 'sell', 'order', 'tid', 'afile') VALUES
('["ItemRadio",3]',50,'[1,"ItemGoldBar10oz",1]','[1,"ItemGoldBar10oz",1]',0,510,'trade_items'),
('["ItemRadio",3]',50,'[1,"ItemGoldBar10oz",1]','[1,"ItemGoldBar10oz",1]',0,532,'trade_items'),
('["ItemRadio",3]',50,'[1,"ItemGoldBar10oz",1]','[1,"ItemGoldBar10oz",1]',0,663,'trade_items');

Share this post


Link to post
Share on other sites
  • 0

Nope yours didn't work Glen, same error. Here is what I used before but am not receiving item in game:

INSERT INTO `traders_data` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["ItemRadio",1]',50,'[1,"ItemGoldBar10oz",1]','[1,"ItemGoldBar10oz",1]',0,663,'trade_items')

Share this post


Link to post
Share on other sites
  • 0

Try this:

INSERT INTO `traders_data` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES ('["ItemRadio",3]',50,'[1,"ItemGoldBar10oz",1]','[1,"ItemGoldBar10oz",1]',0,663,'trade_weapons')

edit: just noticed you experienced a syntax error...I just tried this and it worked for me though.

Share this post


Link to post
Share on other sites
  • 0

Single Quotes + Heidi = annoying. :) 

 

INSERT INTO `traders_data` (`item`,`qty`,`buy`,`sell`,`order`,`tid`,`afile`) VALUES 
(`["ItemRadio",3]`,50,`[1,"ItemGoldBar10oz",1]`,`[1,"ItemGoldBar10oz",1]`,0,510,`trade_items`),
(`["ItemRadio",3]`,50,`[1,"ItemGoldBar10oz",1]`,`[1,"ItemGoldBar10oz",1]`,0,532,`trade_items`),
(`["ItemRadio",3]`,50,`[1,"ItemGoldBar10oz",1]`,`[1,"ItemGoldBar10oz",1]`,0,663,`trade_items`);

Share this post


Link to post
Share on other sites
  • 0

hahaha ok here's one... I added MixOil for 2 stroke oil and its wrong. how can I remove it from my database? Also what is the correct item code, cant find it on google

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.

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

Loading...

  • Similar Content

    • By calinova22
      How would I go about adding custom vehicles to my server? I want to have an F35B with no weapons. I know how to remove the weapons, just cant find the file for the jet itself to edit.
    • By Cyrus
      I have placed a fuel pump in starry using a custom script. The fuel pump is there and accessible but i would like to know how i can make it work with out the need of having to place a generator or a running fuel ural. by default it acts the same way a placeable fuel pump works picked up in the world. 
      Here is the code that use to spawn the fuel pump. 
      _vehicle_344 = objNull; if (true) then { _this = createVehicle ["Land_A_FuelStation_Feed", [6325.166, 7715.0869, 0.15837258], [], 0, "CAN_COLLIDE"]; _vehicle_344 = _this; _this setDir -52.000465; _this setPos [6325.166, 7715.0869, 0.15837258]; }; Any help will be appreciated.
    • By Apex - Slick
      Hi,
       
      So i was enjoying Epoch the other day when a server restart happened, so without a worry i disconnected, 15 mins later i reconnected after the restart and my armor, vest and all of my inventory items were gone. Main firearm, sidearm, helmet and other equipment like the map, gps and binoculars were still there. The gear wasn't worth much and i i'm not trying to whine about getting it back (i really don't mind getting it back) i just thought i'd report this bug. Also, i found others with the same problem, anyone on the forum with some experience on the matter and maybe tips on how to prevent something like it happening again?
       
      Thanks in advance,
      Apex - Slick
    • By JohnnyBravo666
      My question is for when I switched over to single currency from the default currency, that when I went to the traders, it was showing costs like "5 Coins" to buy and "3 Coins to sell". I understand that it's pulling the value quantities from the trader files from the default currency. But is there a way to set it so it calculates what the gold bars and silver bars and whatnot are equal to in single currency ?
      I'd really prefer not to have to change up all the files.
    • By Thug
      [SOLVED]
      First, why take the weapons from traders? 
      Second, If possible how do I go about adding them back. 
      I am looking through dayz_code and not finding anything. I know I may have looked over the part that covers this. Just need a little help.
      Reason to put them back is, my panthera map is going to be 100% militarized. AI everywhere and all traders will be military personnel. 
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...