FiveStar Development
YoutubeCFX forumTebexDiscord
  • 👨‍💻About Us
  • 😊Control Panel ⁽ᶠᵒʳ ᶜᵘˢᵗᵒᵐᵉʳˢ ᵒᶠ ᵗʰᵉ ᵒᶠᶠᶦᶜᶦᵃˡ ˢᶦᵗᵉ⁾
    • 📲Active Redeem Code
    • ⬇️Download Script
    • 👾Create License
    • 📅Expiration date
    • ⬅️Reset Data License
  • 🧾Scripts
    • 🆘FiveStar-HelpMenu
      • 🧠How to Install
      • ⏭️Config Script
    • 🛡️FiveStar-Paintball
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 🔫FiveStar-WeaponShop
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 🔐FiveStar-Security [FREE FOR CUSTOMER]
      • 🧠How to Install
      • ⏭️Config Script
    • 🎟️FiveStar-MissionClub
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 🛒FiveStar-VehicleShop
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 💸FiveStar-Subscribe
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 🚘FiveStar-Garage
      • 😘[ESX]
        • 🧠How to Install
        • ⏭️Config Script
      • 🥰[QB]
        • 🧠How to Install
        • ⏭️Config Script
    • 💋FiveStar-Speedometer [FREE]
      • 🧠How to Install
Powered by GitBook
On this page
  • Set player job (optional)
  • Add License

Was this helpful?

  1. Scripts
  2. FiveStar-HelpMenu

How to Install

FiveStar Script

PreviousFiveStar-HelpMenuNextConfig Script

Last updated 6 months ago

Was this helpful?

Set player job (optional)

If you want to set permission for categories or data, you must return the player job in this function

config.lua - line 19 - 27
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,
client/config.lua - line 5 - 13
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
config.lua - table Config.Head
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
    ...
},
config.lua - table Config.Body
{
    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/"
    }
}

Add License

Please put your license in server/license.lua | If your script is encrypted, enter your license

🧾
🆘
🧠
Page cover image