NEXT Scripts Docs
  • NEXT Scripts | FiveM Resource Studio
  • CHAR CREATOR
    • Info | CharCreator
    • Installation
    • Events
  • X MENU
    • Info | X Menu
    • Installation
      • Configuration
      • Job Lock & Multi Job
    • Utils
  • Binoculars
    • Info | Binoculars
Powered by GitBook
On this page
  • Job lock
  • Multi Job
  1. X MENU
  2. Installation

Job Lock & Multi Job

If you use any Framework on you Server you can take advantage of the feature, that you can lock the x menu for certian jobs or even have different menus for any job.

Job lock

Dont forget to configure the framework in line 151 - 153. If you use an custom Framework you have to edit custom_framework.lua

Config.UseFramework = false
Config.Framework = "ESX"
Config.UseEsxExport = false

To use the job lock feature, simply go to line 159 in config.lua and set Config.JobLock = true . Then you can configure the jobs which can open the menu in line 160.

If you use multijob, you either have to disable the job lock or add all jobs with custom menus to it.

Config.JobLock = true
Config.Jobs = {'police', 'ambulance'}

Multi Job

Players can have a different menu depending on their job. To configure this go to line 164 in config.lua and set Config.MultiJob = true then you can configure the job specific menus in Config.JobMenus. Here is an example:

If MultiJob is active, players that dont have a job which is configured there, will see the deafult menu.

Config.JobMenus = {
    ["police"] = {
        ['button0'] = {
            active = true,
            image = "imgs/police.png",
            hovertext = true,
            text = "text",
            execute = function()
                
            end
            submenu = {
                active = false,
            }
        },
        
        ['button1'] = {
            active = true,
            image = "imgs/police.png",
            hovertext = true,
            text = "text",
            execute = function()
                
            end,
            submenu = { -- Example sub menu
                active = true,
                ['button1'] = {
                    active = true,
                    image = "imgs/police.png",
                    hovertext = true,
                    text = "text",
                    execute = function()
                        
                    end
                },
                ['button2'] = {
                    active = true,
                    image = "imgs/police.png",
                    hovertext = true,
                    text = "text",
                    execute = function()
                        
                    end
                },
                ['button3'] = {
                    active = true,
                    image = "imgs/police.png",
                    hovertext = true,
                    text = "text",
                    execute = function()
                        
                    end
                }
            } 
        },
        
        ['button2'] = {
            active = true,
            image = "imgs/police.png",
            hovertext = true,
            text = "text",
            execute = function()
                
            end
            submenu = {
                active = false,
            }
        },
        
        ['button3'] = {
            active = true,
            image = "imgs/police.png",
            hovertext = true,
            text = "text",
            execute = function()
                
            end
            submenu = {
                active = false,
            }
        },
        
        ['button4'] = {
            active = true,
            image = "imgs/police.png",
            hovertext = true,
            text = "text",
            execute = function()
                
            end
            submenu = {
                active = false,
            }
        },
        
        ['button5'] = {
            active = true,
            image = "imgs/police.png",
            hovertext = true,
            text = "text",
            execute = function()
                
            end
            submenu = {
                active = false,
            }
        },
        
        ['button6'] = {
            active = true,
            image = "imgs/police.png",
            hovertext = true,
            text = "text",
            execute = function()
                
            end
            submenu = {
                active = false,
            }
        }
    }
}
PreviousConfigurationNextUtils

Last updated 2 years ago