19 lines
629 B
Lua
19 lines
629 B
Lua
![]() |
if Config.qbSettings.enabled then
|
||
|
QBCore = exports['qb-core']:GetCoreObject()
|
||
|
|
||
|
if QBCore.Functions.GetPlayerData() and QBCore.Functions.GetPlayerData().job then
|
||
|
PLAYER_JOB = QBCore.Functions.GetPlayerData().job.name
|
||
|
end
|
||
|
|
||
|
RegisterNetEvent('QBCore:Client:OnPlayerLoaded')
|
||
|
AddEventHandler('QBCore:Client:OnPlayerLoaded', function()
|
||
|
PLAYER_JOB = QBCore.Functions.GetPlayerData().job.name
|
||
|
end)
|
||
|
|
||
|
|
||
|
RegisterNetEvent('QBCore:Client:OnJobUpdate')
|
||
|
AddEventHandler('QBCore:Client:OnJobUpdate', function(JobInfo)
|
||
|
PLAYER_JOB = JobInfo.name
|
||
|
end)
|
||
|
end
|