
π§ How to Install
FiveStar Script
Set player job (optional)
If you want to set permission for categories or data, you must return the player job in this function
PlayerJobNow = function() ---@alias If you want to set permission for handles or data, you must return the player job in this function
if GetResourceState("es_extended") == "started" then
local data = exports['es_extended']:getSharedObject().PlayerData
return { Name = data.job.name, Rank = data.job.grade }
elseif GetResourceState("qb-core") == "started" then
local data = exports['qb-core']:GetCoreObject().Functions.GetPlayerData()
return { Name = data.job.name, Rank = data.job.grade.level }
end
end,if GetResourceState("es_extended") == "started" then
RegisterNetEvent('esx:setJob', function(data, lastJob) ---@alias To update player data jobs
UpdateJob({Name = data.name, Rank = data.grade})
end)
elseif GetResourceState("qb-core") == "started" then
AddEventHandler('QBCore:Client:OnJobUpdate', function(job) ---@alias To update player data jobs
UpdateJob({Name = job.name, Rank = job.grade})
end)
endActiveTags = { ---@alias tag name, access permission, style button | index one is default
["faq"] = { Permission = "everyone" }, ---@alias Index is default | Permission: All players - Style: background blue
["vehicle"] = { Permission = "everyone" },
["jobs"] = { Permission = "everyone" },
["report"] = { Permission = "everyone" },
["keybind"] = { Permission = "everyone" },
["weapon"] = { Permission = "everyone" },
["police"] = {Permission = {Name = "police", Rank = 3}, Style = "background: #5865F4;" }, ---@alias job level example(3) and above
["medic"] = {Permission = {Name = "ambulance", Rank = 1}, Style = "background: #416CAD;" }, ---@alias job level example(1) and above
["mechanic"] = {Permission = {Name = "mecano", Rank = 2}, Style = "background: #AC902B;" } ---@alias job level example(2) and above
...
},Last updated
Was this helpful?