mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Have SetJobDuty also trigger job updates
This commit is contained in:
@@ -251,6 +251,8 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||
|
||||
function self.Functions.SetJobDuty(onDuty)
|
||||
self.PlayerData.job.onduty = not not onDuty -- Make sure the value is a boolean if nil is sent
|
||||
TriggerEvent('QBCore:Server:OnJobUpdate', self.PlayerData.source, self.PlayerData.job)
|
||||
TriggerClientEvent('QBCore:Client:OnJobUpdate', self.PlayerData.source, self.PlayerData.job)
|
||||
self.Functions.UpdatePlayerData()
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user