Skip to content

Commit 43bb753

Browse files
committed
refactor(client): set weapon timer based on time between shots
May improve ammo sync for some weapons.
1 parent 813d483 commit 43bb753

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
@@ -1497,7 +1497,7 @@ RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inven
14971497
end
14981498

14991499
currentWeapon.timer = GetGameTimer() + 200
1500-
else currentWeapon.timer = GetGameTimer() + 400 end
1500+
else currentWeapon.timer = GetGameTimer() + (GetWeaponTimeBetweenShots(currentWeapon.hash) * 1000) + 100 end
15011501
end
15021502
elseif currentWeapon.throwable then
15031503
if not invBusy and IsControlPressed(0, 24) then

0 commit comments

Comments
 (0)