Skip to content

Commit

Permalink
fix(es_extended/client/main): reset isFirstSpawn on logout
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenshiin13 committed Nov 26, 2024
1 parent 4744202 commit 51c777f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion [core]/es_extended/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ RegisterNetEvent("esx:playerLoaded", function(xPlayer, _, skin)
StartServerSyncLoops()
end)

local isFirstSpawn = true
ESX.SecureNetEvent("esx:onPlayerLogout", function()
ESX.PlayerLoaded = false
isFirstSpawn = true
end)

ESX.SecureNetEvent("esx:setMaxWeight", function(newMaxWeight)
Expand All @@ -59,7 +61,6 @@ local function onPlayerSpawn()
ESX.SetPlayerData("dead", false)
end

local isFirstSpawn = true
AddEventHandler("playerSpawned", onPlayerSpawn)
AddEventHandler("esx:onPlayerSpawn", function()
onPlayerSpawn()
Expand Down

0 comments on commit 51c777f

Please sign in to comment.