Docs/Yecoyz Multijob

Overview

What Yecoyz Multijob does and what's included.

Yecoyz Multijob lets players keep several jobs and switch between them. It works with ESX, QBCore and Qbox, and the source is open on GitHub. Players use it from its own menu (/jobs, key J) or as the Jobs app on Yecoyz Tablet.

Features

Feature Description
Several jobs The job a player works now plus the others they keep, up to Config.MaxJobs (3 by default). Admins, or any permission you set, have no limit
Switching One click, and the rank in each job is kept. A cooldown stops switch spam, and you choose if players can switch while dead or in a vehicle
Duty Go on and off duty for the job you work. With yecoyz_duty the shift is saved to the right job, and a switch closes the shift first
Go off work Be unemployed for a while without losing a job
Quit a job With a confirmation. The online bosses of that job get a message
Find work Jobs anyone can take (taxi, garbage...), with a short text, rank and salary. No boss or admin needed
Live numbers Rank, salary, colleagues online and on duty, and hours worked this week per job
Other scripts Hires, fires and promotions made by any boss menu or admin command are picked up, also while the player is offline
Rules Exclusive groups, jobs that are never kept, and a check when a rank was deleted
Admin An Admin page in the menu and the /addjob, /removejob and /checkjobs commands
Logs Switches, quits and admin changes go to your Discord through yecoyz_core's logs

How it keeps jobs

The framework job is always the job the player works right now, so every other script keeps working as before. Yecoyz Multijob keeps its own list of every job a player has, and for each character the job they had when they left. That is how changes made while a player was offline are found when they log in.

When another script gives a player a new job, the new job is added and the old one stays in the list (Config.KeepOldJob). When a script sets them to the default job (unemployed), that is read as a fire and the job leaves the list (Config.RemoveOnFire). Players who lost a job while they were offline get a message a moment after they log in.

Note

On Qbox, which keeps a job list of its own, the two lists are kept the same. See Installation.

With the other Yecoyz scripts

Each of these is optional and only used while it runs:

  • Yecoyz Tablet: the menu is also a Jobs app, laid out like the Duty and Company apps.
  • Yecoyz Duty: shifts and hours per job. The Shifts button opens its menu or app.
  • Yecoyz Boss Menu: bosses get a Company button, and staff lists include people who keep the job but work another one right now.

Next steps

  1. Check the dependencies and install steps.
  2. Set the limit, rules and Find work jobs in the configuration.
  3. Connect your own scripts with the exports and events.
Stuck on this step?

Open a ticket in the Discord with what you tried and what you see, and I'll help you get it running.

Ask on Discord
Up nextInstallationDependencies and setup for Yecoyz Multijob.