1
0
Fork 0
forked from Simnation/Main
Main/resources/[standalone]/ps-multijob
2025-08-11 23:43:42 +02:00
..
client ed 2025-08-11 23:43:42 +02:00
html fix 2025-06-24 04:26:19 +02:00
server ed 2025-08-11 23:43:42 +02:00
svelte-source fix 2025-06-24 04:26:19 +02:00
.gitignore fix 2025-06-24 04:26:19 +02:00
config.lua ed 2025-08-11 23:31:05 +02:00
database.sql fix 2025-06-24 04:26:19 +02:00
fxmanifest.lua fix 2025-06-24 04:26:19 +02:00
README.md fix 2025-06-24 04:26:19 +02:00

ps-multijob

image

A script designed with a sleek and modern design for being able to display your current jobs as well as switching between them.

Features

  • Configurable ignore certain jobs.
  • Configurable keybind to open the job menu - J by default.
  • Configurable max jobs per citizen ID. Unlimited jobs for players with the 'admin' permission.
  • Configurable white list jobs.
  • Configurable descriptions per job.
  • Configurable side (left or right) of the screen you want the ui to show on. Right side by default. (see Config)
  • Configurable job icon via font awesome icons. Change these icons in the config
  • Remove someone's job by doing /removejob - Admin only.
  • Coming later: Admin Tab for job handling.

Preview

image

Installation

  • Rename to ps-multijob. Do not change the name or it will not work.
  • Import SQL into your database
  • Ensure to server.cfg

Linking to qb-management | Auto Firing

  1. Find the following event

    qb-bossmenu:server:FireEmployee
    
  2. Insert the TriggerEvent right under the notification for 'Employee Fired!'. The TriggerEvent should be added twice, once near line 174 and once near line 199.

    TriggerClientEvent('QBCore:Notify', src, "Employee fired!", "success")
    TriggerEvent('ps-multijob:server:removeJob', target)
    

Usage

Serversided Exports

  • GetJobs(citizenid)

    Example usage:

    local jobs = exports["ps-multijob"]:GetJobs("citizenid here")
    
  • AddJob(citizenid, job, grade)

    Example usage:

    exports["ps-multijob"]:AddJob("citizenid here", "police", 0)
    
  • UpdateJobRank(citizenid, job, grade) Example usage:

    exports["ps-multijob"]:UpdateJobRank("citizenid here", "police", 3)
    
  • RemoveJob(citizenid, job)

    Example usage:

    exports["ps-multijob"]:RemoveJob("citizenid here", "police")
    

Credits