Merge pull request #1622 from 1nexis/patch-4

fix(es_extended/server/main): GlobalState jobcount infinitely increasing
This commit is contained in:
Kenshin13
2025-03-09 23:03:35 +01:00
committed by GitHub
+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)