Update main.lua

This commit is contained in:
Mr Sneaky
2025-08-23 17:31:16 +02:00
committed by GitHub
parent 5cc766be67
commit b965cddca0
+3 -1
View File
@@ -337,7 +337,9 @@ AddEventHandler("esx:playerLoaded", function(_, xPlayer, isNew)
Core.JobsPlayerCount[job] = (Core.JobsPlayerCount[job] or 0) + 1 Core.JobsPlayerCount[job] = (Core.JobsPlayerCount[job] or 0) + 1
GlobalState[jobKey] = Core.JobsPlayerCount[job] GlobalState[jobKey] = Core.JobsPlayerCount[job]
Player(xPlayer.source).state:set('isNew', isNew, false) if isNew then
Player(xPlayer.source).state:set('isNew', true, false)
end
end) end)
AddEventHandler("esx:setJob", function(_, job, lastJob) AddEventHandler("esx:setJob", function(_, job, lastJob)