Skip to content

Commit

Permalink
refactor(client): disable firing when weapon timer is nil
Browse files Browse the repository at this point in the history
The timer is removed when disarming the player.
  • Loading branch information
thelindat committed Jul 12, 2024
1 parent 43bb753 commit 13e9981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inven
DisableControlAction(0, 80, true)
DisableControlAction(0, 140, true)

if currentWeapon.metadata.durability <= 0 then
if currentWeapon.metadata.durability <= 0 or not currentWeapon.timer then
DisablePlayerFiring(playerId, true)
elseif client.aimedfiring and not currentWeapon.melee and currentWeapon.group ~= `GROUP_PETROLCAN` and not IsPlayerFreeAiming(playerId) then
DisablePlayerFiring(playerId, true)
Expand Down

0 comments on commit 13e9981

Please sign in to comment.