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

1 Like

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…

2 Likes

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

1 Like

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?

Does it work for weapons tho, there might be another native just for throwables. But if i remember correctly when throwables go to 0 they get removed from the inventory.

Still works, on latest artifacts.