fix(legacy/multichar): Remove HUD components if player logs out

This commit is contained in:
Linden
2021-05-18 01:00:30 +10:00
parent 2555ea7345
commit 46f2b2c28b
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,6 @@ AddEventHandler('esx:playerLoaded', function(playerData, isNew)
ESX.PlayerData = playerData
ESX.PlayerData.ped = ESX.PlayerData.ped
FreezeEntityPosition(ESX.PlayerData.ped, true)
-- enable PVP
@@ -79,6 +78,7 @@ end)
RegisterNetEvent('esx:onPlayerLogout')
AddEventHandler('esx:onPlayerLogout', function()
ESX.PlayerLoaded = false
if Config.EnableHud then ESX.UI.HUD.Reset() end
end)
RegisterNetEvent('esx:setMaxWeight')