No weapons

❌ No Weapons — Arena PvP (ox_inventory Integration)

Preventing Weapon Disappearance Inside Arena

If you are using ox_inventory, you may notice that weapons disappear or get removed when entering Arena PvP.

To fix this issue, you need to make small modifications to the ox_inventory script so it respects the Arena statebag:

This ensures that inventory logic does not interfere while the player is inside Arena.


🛠 Step 1 — Edit ox_inventory (client.lua)

1️⃣ Open: ox_inventory/client.lua


2️⃣ Locate this line:

local weaponHash = GetSelectedPedWeapon(playerPed)

3️⃣ Just below it, you will find:

if currentWeapon then

Replace it with:

if currentWeapon and not LocalPlayer.state.inArena then

This prevents ox_inventory from interfering with weapons while the player is inside Arena PvP.

🛠 Step 2 — Prevent Weapon Mismatch Removal

Scroll further down and find:

Replace it with:

This ensures weapon mismatch checks are ignored while the player is inside Arena.

🛠 Step 3 — Block Inventory Open Inside Arena

To prevent players from opening inventory while inside Arena:

Find this line (near the top of the file):

Add this directly below it:

🧩 Other Cases

If you are not using ox_inventory, you need to:

  1. Identify which script manages weapon saving on your server.

  2. Add a check using:

Anywhere weapons are:

  • Saved

  • Restored

  • Synced

  • Loaded on reconnect


🔐 Using Anti-Cheat

If your server uses an anti-cheat:

  • Contact the anti-cheat developer.

  • Inform them that Arena PvP uses LocalPlayer.state.inArena.

  • Ask them to whitelist weapon changes while the statebag is true.

Atualizado