ESX
CreateThread(function()
LoadFrameworkConfig(function(loadedFramework)
if loadedFramework ~= 'ESX' then return end
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
AddEventHandler('esx:playerLoaded', function()
FetchPropsOnStart()
end)
-- ReUpdatePlayerData
function UpdatePlayerData()
ESX.PlayerData = ESX.GetPlayerData()
end
-- GET JOB NAME
function GetPlayerJobName()
UpdatePlayerData()
if ESX.PlayerData and ESX.PlayerData.job and ESX.PlayerData.job.name then
return ESX.PlayerData.job.name
end
return nil
end
-- GET JOB GRADE
function GetPlayerJobGrade()
UpdatePlayerData()
if ESX.PlayerData and ESX.PlayerData.job and ESX.PlayerData.job.grade then
return ESX.PlayerData.job.grade
end
return nil
end
-- Notication
function Notify(message, messageType, duration)
ESX.ShowNotification(message, duration, messageType)
end
end)
end)
Last updated