refactor: slight optimisation

This commit is contained in:
MoskalykA
2023-07-30 13:44:04 +02:00
parent 0365c2816c
commit cead0aa431
+5 -5
View File
@@ -84,13 +84,13 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin)
end)
end
if Config.DisableHealthRegeneration or Config.DisableWeaponWheel or Config.DisableAimAssist or Config.DisableVehicleRewards then
if Config.DisableHealthRegeneration then
SetPlayerHealthRechargeMultiplier(playerId, 0.0)
end
if Config.DisableWeaponWheel or Config.DisableAimAssist or Config.DisableVehicleRewards then
CreateThread(function()
while true do
if Config.DisableHealthRegeneration then
SetPlayerHealthRechargeMultiplier(playerId, 0.0)
end
if Config.DisableWeaponWheel then
BlockWeaponWheelThisFrame()
DisableControlAction(0, 37, true)