Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Commit 0f7a476

Browse files
committed
refactor(client): reduce delay between shooting and using items
1 parent 13e9981 commit 0f7a476

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client.lua

+6-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,12 @@ local function useItem(data, cb, noAnim)
431431
return
432432
end
433433

434-
if currentWeapon?.timer and currentWeapon.timer > 100 then return end
434+
if currentWeapon and currentWeapon.timer ~= 0 then
435+
if IsPedShooting(playerPed) then return end
436+
if currentWeapon.timer - GetGameTimer() > 100 then return end
437+
438+
DisablePlayerFiring(cache.playerId, true)
439+
end
435440

436441
if invOpen and data.close then client.closeInventory() end
437442

0 commit comments

Comments
 (0)