🛠️Setup

This is a detailed setup guide for Multi Job Selection System. If you have any questions before making a purchase, you can contact us on Discord

Setting Up the Script

  • This Script Works Only in ESX and QB

  • The script includes an automatic SQL installer, but manual installation is also possible by turning off CodeStudio.AutoSQL in the config and installing the SQL query

    By Default No Need
    CREATE TABLE IF NOT EXISTS `player_multijob` (
        `id` INT(255) NOT NULL AUTO_INCREMENT,
        `identifier` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
        `job` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_general_ci',
        `grade` INT(11) NOT NULL,
        `removeable` TINYINT(1) NOT NULL,
        PRIMARY KEY (`id`) USING BTREE
    )
    COLLATE='utf8mb4_general_ci'
    ENGINE=InnoDB
    AUTO_INCREMENT=35
    ;
    
  • UI can be accessed via command, key, or by selecting ped by target

  • The script has admin commands for job assignment/removal from the player

  • You can set the maximum number of jobs that a player can save using CodeStudio.MaxJobs

  • Auto job saving can be enabled with CodeStudio.AllowAutoJobSaving for automatic registration of jobs in the multi-job menu when the player receives a job

  • If you are using QB, you can enable the on/off duty feature using CodeStudio.EnableDuty

Events and Exports

Client Side

Open Multi Job Menu
TriggerEvent('cs:multijob:openUI', true)
Close Multi Job Menu
TriggerEvent('cs:multijob:openUI', false)

Server Side

  • Event to Remove Job from Multi Job Menu [ identifier = player citizenid if QB and steam if ESX, job = job to be removed ]

    TriggerEvent('cs:multijob:removeJob', identifier, job)
    
  • Event to AddJob to Multi Job Menu

    [ identifier = player citizenid if QB and steam if ESX, job = job to be removed, grade = job grade or rank ]

    TriggerEvent('cs:multijob:addjob', identifier, job, grade)
  • Event to Update Job Rank in Multi Job Menu

    [ identifier = player citizenid if QB and steam if ESX, job = job to be removed, grade = job grade or rank ]

    TriggerEvent('cs:multijob:updateJob', identifier, job, grade)
  • Event to Automatically Check a Player's Job and Add or Update It Automatically

    TriggerEvent('cs:multijob:checkForJob')

Last updated