Skip to content

Commit 13e9981

Browse files
committed
refactor(client): disable firing when weapon timer is nil
The timer is removed when disarming the player.
1 parent 43bb753 commit 13e9981

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎client.lua‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inven
14421442
DisableControlAction(0, 80, true)
14431443
DisableControlAction(0, 140, true)
14441444

1445-
if currentWeapon.metadata.durability <= 0 then
1445+
if currentWeapon.metadata.durability <= 0 or not currentWeapon.timer then
14461446
DisablePlayerFiring(playerId, true)
14471447
elseif client.aimedfiring and not currentWeapon.melee and currentWeapon.group ~= `GROUP_PETROLCAN` and not IsPlayerFreeAiming(playerId) then
14481448
DisablePlayerFiring(playerId, true)

0 commit comments

Comments
 (0)