Add job count management on player events
Introduces event handlers to update job counts when players load, change jobs, or unload across multiple framework modules. Ensures job count tracking stays accurate by adding or removing counts based on player actions. (would like to update this to have some client event tables?)
This commit is contained in:
1 parent
c399fbaca4
commit
9fdb41e9f6
4 files changed
+19
No files matched your search
@@ -557,6 +557,9 @@ end
|
||||
RegisterNetEvent("QBCore:Server:OnPlayerLoaded", function(src)
|
||||
src = src or source
|
||||
TriggerEvent("community_bridge:Server:OnPlayerLoaded", src)
|
||||
local jobData = Framework.GetPlayerJobData(src)
|
||||
if not jobData then return end
|
||||
Framework.AddJobCount(src, jobData.jobName)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("QBCore:Server:OnPlayerUnload", function(src)
|
||||
|
||||
Reference in new issue
Block a user