mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Add function to retrieve player's full name from character data
This commit is contained in:
@@ -253,6 +253,11 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||
return QBCore.Functions.HasItem(self.PlayerData.source, items, amount)
|
||||
end
|
||||
|
||||
function self.Functions.GetName()
|
||||
local charinfo = self.PlayerData.charinfo
|
||||
return charinfo.firstname .. ' ' .. charinfo.lastname
|
||||
end
|
||||
|
||||
function self.Functions.SetJobDuty(onDuty)
|
||||
self.PlayerData.job.onduty = not not onDuty
|
||||
TriggerEvent('QBCore:Server:OnJobUpdate', self.PlayerData.source, self.PlayerData.job)
|
||||
|
||||
Reference in New Issue
Block a user