Skip to content

Commit

Permalink
refactor(client): reduce delay between shooting and using items
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Jul 12, 2024
1 parent 13e9981 commit 0f7a476
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,12 @@ local function useItem(data, cb, noAnim)
return
end

if currentWeapon?.timer and currentWeapon.timer > 100 then return end
if currentWeapon and currentWeapon.timer ~= 0 then
if IsPedShooting(playerPed) then return end
if currentWeapon.timer - GetGameTimer() > 100 then return end

DisablePlayerFiring(cache.playerId, true)
end

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

Expand Down

0 comments on commit 0f7a476

Please sign in to comment.