QBCore
CreateThread(function()
LoadFrameworkConfig(function(loadedFramework)
if loadedFramework ~= 'QBCore' then return end
local QBCore = exports['qb-core']:GetCoreObject()
AddEventHandler('QBCore:Client:OnPlayerLoaded', function()
FetchPropsOnStart()
end)
-- ReUpdatePlayerData
function UpdatePlayerData()
PlayerData = QBCore.Functions.GetPlayerData()
end
-- GET JOB NAME
function GetPlayerJobName()
UpdatePlayerData()
if PlayerData and PlayerData.job and PlayerData.job.name then
return PlayerData.job.name
end
return nil
end
-- GET JOB GRADE
function GetPlayerJobGrade()
UpdatePlayerData()
if PlayerData and PlayerData.job and PlayerData.job.grade.level then
return PlayerData.job.grade.level
end
return nil
end
-- Notication
function Notify(message, messageType, duration)
QBCore.Functions.Notify(message, messageType, duration or 5000)
end
end)
end)
Last updated