mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 20:01:27 +00:00
fix(es_extended/server/main): GlobalState jobcount infinitely increasing
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user