mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
refactor: slight optimisation
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user