mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 02:01:33 +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
|
return true
|
||||||
end
|
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)
|
function self.Functions.SetJobDuty(onDuty)
|
||||||
self.PlayerData.job.onduty = not not onDuty -- Make sure the value is a boolean if nil is sent
|
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)
|
TriggerEvent('QBCore:Server:OnJobUpdate', self.PlayerData.source, self.PlayerData.job)
|
||||||
|
|||||||
Reference in New Issue
Block a user