Jump to content
  • 0

Huge Problem - buying trader items without required currency


Magz

Question

I added a vehicle ammo strip script but it only works for vehicles that spawn via traders. If I spawn them in with infistar they have full ammo and every restart replenish ammo.

 

I also have the ArmoredSUV_PMC (20,000 slot SUV) available for donators in our donation store on our website. In an attempt to make this vehicle follow suit with the ammo strip script, I added the vehicle to all neutral and friendly traders as so...

       item           qty        buy              sell          order  tid          afile
["ArmoredSUV_PMC",2]   20  [1,"ItemRuby",1] [1,"TrashTinCan",1]   0    701   trade_any_vehicle_old 

I did the same for another vehicle with a ItemTopaz as the buy, everything else is the same as above. This is the first time I tried to use gems as currency. I figured it was the easiest way since gems don't naturally spawn on my server and in an attempt to maintain control, only my admins can spawn gems.

 

The problem is, players can purchase these vehicles WITHOUT having a ruby or topaz in their inventory. When they DO have a ruby or topaz, the gem is taken as it normally would be, but when they don't have these items, the vehicle is STILL sold to them.

 

How do I fix this?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
I had the same problem But my fix was simply adding the _old
looks like you have that in there soo maybe something here will help you..
 
this was how I added a thermal SD with ruby as payment.
INSERT INTO Traders_DATA (`item`, `qty`, `buy`, `sell`, `tid`, `afile`) VALUES
('["SCAR_H_STD_TWS_SD",3]', 200, '[2,"ItemRuby",1]', '[1,"ItemRuby",1]', 526, 'trade_weapons_old');
 
soo you dont have gold Veins on your server ???
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...