Weapon swaps to unarmed when Ammo runs out

So always when i run out of ammo, weapons goes back to the inventory
in other words its swaps to unarmed when i run out of ammo

And what do you want to happen after weapon runs out of ammo?

This should do the job for you… If the weapon has no ammo it will just keep the weapon in your hand…

i just want that weapons stays in ur arm, and the basic gta sound effect that u ran out of ammo

and where do i put this?

Any client.lua file!

Code:

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(1)
        SetWeaponsNoAutoswap(true)
    end
end)

it works, when i hold down the right mouse button, but when i release it, it just swaps to unarmed

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        SetWeaponsNoAutoswap(true)
    end
end)

This might do the job, works fine for me…

Thanks this did the job,
Thanks for your effort and time <3

hey, ahah sorry it works but at the end, i cant open my inventory :smiley:

Any errors client side?

In the console there isnt a single error

Doesn’t seem to work for me using throwables like BZ Gas

does this no longer work?