mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 17:01:16 +00:00
Merge pull request #1012 from Cocodrulo/main
Update CreatePlayer Function
This commit is contained in:
@@ -270,6 +270,14 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||
return true
|
||||
end
|
||||
|
||||
function self.Functions.Notify(text, type, lenght)
|
||||
TriggerClientEvent('QBCore:Notify', self.PlayerData.source, text, type, lenght)
|
||||
end
|
||||
|
||||
function self.Functions.HasItem(items, amount)
|
||||
QBCore.Functions.HasItem(self.PlayerData.source, items, amount)
|
||||
end
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user