How to Install
FiveStar Script
Last updated
Was this helpful?
FiveStar Script
Last updated
Was this helpful?
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)
end
ActiveTags = { ---@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
...
},
{
Title = "How to become a police officer?",
Text = "To become a police officer, you need to join the police force via the recruitment center. You must be level 2 and above to apply.",
StatusOpen = false,
TagsAccess = {"police"},
Profile = "?",
Permission = { ---@param "everyone" | { Name = "police", Rank = 15 } ---@alias job level example(3)
Name = "police",
Rank = 1
},
Button = {
StatusOpen = false,
Text = 'Apply Now',
Style = "background: #5865F4;",
Url = "https://twitchfarsi.com/"
}
}
Please put your license in server/license.lua
| If your script is encrypted, enter your license