mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 09:48:52 +00:00
Revert respect ESX config
This commit is contained in:
+11
-13
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user