Preventing Weapon Disappearance in the Arena (ox_inventory Integration)
If you're using the ox_inventory script, you may notice that weapons disappear when entering the PvP arena. To fix this issue, you'll need to make some modifications to the code.
Open the client.lua file from ox_inventory.
Find the following line:
localweaponHash=GetSelectedPedWeapon(playerPed)
Just below this line, you'll see the following code:
This additional change ensures that the weapon mismatch check is ignored when the player is inside the PvP arena, helping prevent weapons from being removed unexpectedly.
Below is a printout of how you have to put it in your script.
Other cases
If you don't use ox_inventory you have to know how to identify on your server which script manages the player's weapons.
And use the arena statebag which has examples here and also in reviver (ambulancejob) and a complete explanation on the ' Statebag ' page of how you use this function.
Also check if your server has anticheat and if this is the case, contact the owner of this script and explain the situation and they should definitely have a solution.