Revert respect ESX config

This commit is contained in:
ElPumpo
2018-11-11 14:10:57 +01:00
parent 74653246b0
commit e56d700df4
2 changed files with 13 additions and 16 deletions
+11 -13
View File
@@ -125,21 +125,19 @@ AddEventHandler('esx_status:setDisplay', function(val)
end)
-- Pause menu disable hud display
if ESX.GetConfig().EnableHud then
Citizen.CreateThread(function()
while true do
Citizen.Wait(300)
Citizen.CreateThread(function()
while true do
Citizen.Wait(300)
if IsPauseMenuActive() and not isPaused then
isPaused = true
TriggerEvent('esx_status:setDisplay', 0.0)
elseif not IsPauseMenuActive() and isPaused then
isPaused = false
TriggerEvent('esx_status:setDisplay', 0.5)
end
if IsPauseMenuActive() and not isPaused then
isPaused = true
TriggerEvent('esx_status:setDisplay', 0.0)
elseif not IsPauseMenuActive() and isPaused then
isPaused = false
TriggerEvent('esx_status:setDisplay', 0.5)
end
end)
end
end
end)
-- Loaded event
Citizen.CreateThread(function()
+2 -3
View File
@@ -46,10 +46,9 @@ end)
RegisterServerEvent('esx_status:update')
AddEventHandler('esx_status:update', function(status)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer ~= nil then
if xPlayer then
xPlayer.set('status', status)
end
end)