Jump to content
  • 0

Reducing trader stock to 0


BetterDeadThanZed

Question

I've set up a new server and on it, I set the quantity of all trader items to 0. I've confirmed the database shows the totals as 0. As players sell them items, the stock grows. However, when I went to a trader, I was able to buy an ALICE pack, a full jerry can and a UAZ, even though the database shows these items had 0 stock. Am I missing something? I tried to buy some other items, like a blood bag, and it told me there was insufficient stock.

 

*EDIT * Nevermind. Looks like I forgot to remove the sql trigger to restock them :)

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Just some more information... it appears that after a server restart I may be able to buy one of an item, even if it's stock is at 0. For example, yesterday I bought one AK mag when it said stock was 0. When I tried buying a second one, it said it had insufficient stock. I just tried it again and the same thing happened. So, I'm thinking that perhaps every item in the trader's database also has a minimum of 1, even if the quantity is 0?

Link to comment
Share on other sites

  • 0

try to put a negative value in the database (-1 for example) to test it.

 

I'll give it a shot.

 

Something else I've found today. I bought an AK mag, then got the message about no stock when I tried to buy the second. I went back later and was able to repeat it. Bought one, couldn't buy another, and there was no server restart between that.

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