fix(es_extended/server/main): GlobalState jobcount infinitely increasing

This commit is contained in:
nexis
2025-03-06 09:41:03 +01:00
committed by GitHub
parent 764ca27729
commit 638ce3a276
+5
View File
@@ -353,6 +353,11 @@ end)
AddEventHandler("esx:playerLogout", function(playerId, cb)
local xPlayer = ESX.GetPlayerFromId(playerId)
local job = xPlayer.getJob().name
Core.JobsPlayerCount[job] = Core.JobsPlayerCount[job] - 1
GlobalState[("%s:count"):format(job)] = Core.JobsPlayerCount[job]
if xPlayer then
TriggerEvent("esx:playerDropped", playerId)