So I had a player with 2100 scrap in their backpack try to purchase an attack heli using /attack and were told by Vehicle License that they did not have enough scrap. So they then tried /mini and were again told they did not have enough. When they checked their backpack they had 350 scrap left, but no vehicle was purchased. I am able to reproduce the issue. Is this a Item Retriever issue or a Vehicle License issue?
Scrap Lost Using Vehicle LicenseSolved
I'm not sure it's either. I just tested but wasn't able to reproduce this issue. I tested using the vanilla backpack and also with the Backpacks plugin. Can you verify you can reproduce this with no other plugins installed (only Vehicle License, Item Retriever, and Backpacks if applicable)?
I checked the Vehicle License code and it appears to be correct. It uses vanilla Rust functions PlayerInventory.GetAmount to determine whether there's enough, then PlayerInventory.Take to take the items if there was enough. Those are both hooked by Item Retriever. I'm not seeing any way that query pattern could result in the issue described. The only way that you could simultaneously see a message that you don't have enough and also get the amount taken from you is if the GetAmount function somehow had a side effect of actually taking the items. Item Retriever won't have that effect, but it's possible that another plugin is hooking that function and is performing the incorrect side effect of taking the items.
I don't have the backpacks plugin, it is the vanilla backpack. I will test this further and let you know.
I tried reproducing on my dev server and was not able to do so. Then I tried reproducing again on the live server and couldn't, so I have no idea why it was an issue 3 weeks ago, but not now. I guess we can just close this out for now.
Locked automatically