Merge pull request #1012 from Cocodrulo/main

Update CreatePlayer Function
This commit is contained in:
Kakarot
2023-09-23 15:13:25 -05:00
committed by GitHub
+8
View File
@@ -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)