Merge pull request #1138 from MoskalykA/slight-optimisation

refactor: slight optimisation
This commit is contained in:
Gellipapa
2023-07-31 21:08:13 +02:00
committed by GitHub
+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)