Weapon inventory problem

Hello everyone. So, we are facing a rather weird problem right now.
The problem we have is that any weapon you have is either gone or has no ammo when you left the server and reconnect to it. The same happens when you die and get revived by a medic or revived by an admin. We’re not getting error codes either.
To make it easier we test it with a Pistol. It doesnt matter if its a weapon bought in the weapon shop or bought from the gang armory or if its a spawned weapon.

Since we have no idea why this is happening, we tried stuff like adding the pistol as items, since ITEMS are getting saved. But Weapons or Ammo are not saved.
I looked in the weapons database, everything is fine there.
When I check the users inventory database I dont see the weapons (since they are not saved as items), but I can see them in their normal users database loadout.

We just dont know where this problem is origninated in. We could fix it, but where should we look and what should we do? Its really weird. Nearly everything else works, but this just won’t work at all.

Any help would be very much appreciated :slight_smile: Thanks in advance

2 Likes

do you have a “loadout” column in users at your database?

– Protaknium

We have the following in our database regarding user:
users
user_accounts
user_inventory
user_liceneses

so I guess no?^^ Would adding a loadout column fix it? And if so how to implemnt it properly? (my developer probalby knows it but he is out of town^^)

No, You understood it wrong, In the users, there is like steamid,Lisence,firstname,lastname etc.
Do you have “loadout” in there?

1 Like

Oh, yes there is. And if a user has a weapon it shows up there. but the weapon OR ammo is gone when you reconnect

2 Likes

*or get revived by admin/medic

1 Like

Are you sure this isnt caused by any resource?

2 Likes

Pretty sure since we aint getting any error code and we could not think of any ressource that would do it

hmm. It could be done by the ambulance job. but im not sure what could cause this! im sorry

1 Like

Hmm, the ambulance job is beefing around sometimes :smiley: If it’s the ambulance job, any idea what to fix there? like start esx_weaponshop before it? Or check in the script if people are supposed to loose everything?

2 Likes

You can try

1 Like

Still no luck.

Any luck? I am having the same issue.

2 Likes

What we did was: re-install weaponshop and clear the inventory (loadout, weapons) of every player in the database aswell as their weapons in the property invetory. We also had to use some scripting stuff from the new es_extended, since we cant use the newest one. It f** everything on our server, so we went to an older version. Then just re-start server and the problem was gone.

What clothing shop are you using?
I think I narrowed it down to this tonight but need further testing.

Fixed… Issue was the clothing shop.
Ensure you trigger - TriggerEvent(‘esx:restoreLoadout’)

Works on /revive and relog - Ped and Freemode models

1 Like

I can’t seem to get the weapons to show in the wheel or in inventory. they load into loadout db just fine. you can buy them from shops and it knows you own them. No usable weapon for me to date unless my character picks it up off the ground.(also gone upon relog.) ESX, inventory hud(drag/drop) esx_weaponshop(no guns) and weashops(this one works)

We just had to re-install the weaponshop and clear the whole users DB from every user.

that’s rough. my server is only a week old with only friends chars so I could essentially do that with out much loss. Do you think the database not being clear when adding SQL file from weaponshop makes it error? I do get a buffer error regarding esx_weaponshop(I don’t know what it’s missing)

1 Like

The question is: did you change something in your weaponshop? And: Which Essentialmode Version are you running?