Zerio MultijobsUpgrading from v2

Upgrading from v2

v3 is a free update for everyone who owns zerio-multijobs. Your players keep their jobs, and the v2 exports and commands keep working. What changes for you as the owner is the config, the requirements, and the SetJob edits v2 asked you to make, which v3 no longer needs.

Plan about 15 minutes, and take a database backup first.

Back up the old resource and your database

Keep a copy of your v2 zerio-multijobs folder (you need its config.lua below), and back up the database.

Remove the SetJob edits

v2’s FAQ had you paste a snippet into es_extended, qb-core or qbx_core so hires reached the multi-job list. v3 follows job changes by itself, also for players who were offline, so remove that snippet from:

  • ESX: es_extended/server/classes/player.lua, function setJob
  • QBCore: qb-core/server/player.lua, function SetJob
  • Qbox: qbx_core/server/player.lua, function SetPlayerPrimaryJob

Leaving it in does no harm on QBCore and ESX, but there is no reason to keep a patch in your framework.

Make sure oxmysql runs

v3 needs oxmysql. mysql-async and ghmattimysql are no longer supported. Start oxmysql before your framework and zerio-multijobs.

Replace the folder

Delete the old zerio-multijobs folder and put the v3 one in its place. Keep the name zerio-multijobs: other resources call its exports by that name.

Move your settings

config.lua is now three files in config/. Copy your values over using the table below.

Qbox only: two server.cfg lines

On Qbox, v3 stores jobs in qbx_core’s own multi-job list, so qbx_core’s limits apply. Add these to server.cfg, then restart the whole server (qbx_core reads them once, at start):

setr qbx:max_jobs_per_player 3   # at least Config.maxJobs plus any extra slots
setr qbx:setjob_replaces false   # a hire through SetJob keeps the player's other jobs

On the first start, v3 moves your v2 rows into qbx_core and keeps the old table as zerio_multijobs_v2.

Start and check

Start the server. The console shows which framework v3 found, and warns about anything it needs:

[zerio-multijobs] using bridge: qbx

Where each v2 setting went

v2 (config.lua)v3
Config.LocaleConfig.locale in config/general.lua
Config.OpenType, CommandName, Keybind, ItemConfig.open = { command, key, item }: any of them at once, false turns one off
Config.CurrencyConfig.currency
Config.UsingJaksamJobCreator, UsingLunarJobsCreatorGone: both job creators are found automatically
Config.EnableESXIdentityGone: names come from ESX, with esx_identity when it runs
Config.DefaultJob, Config.DefaultGradeConfig.defaultJob (leave nil for the framework’s own)
Config.IncludeDefaultJobInMenuConfig.showDefaultJob
Config.MaxJobsConfig.maxJobs (false for no limit)
Config.JobIconsicon per job in Config.jobs, config/jobs.lua
Config.DefaultIconConfig.defaultIcon
Config.BlockedJobsblocked = true per job in Config.jobs
Config.LockedJobslocked = true per job in Config.jobs
html/theme.csstheme/tokens.css
⚠️

Two defaults changed. v2 allowed unlimited jobs (Config.MaxJobs = -1); v3 allows 3 (Config.maxJobs = 3). And v2 opened with F4 only; v3 opens with F4 and /jobs. Set them back if you prefer the old behaviour.

Icons: v2 used Material Design names (mdi-account-star). v3 has its own set, or an image URL per job, see the Configuration Guide.

Translations

v3’s texts are in locales/*.json, in 14 languages. If you translated v2 yourself (locales/<lang>.lua), that file does not carry over: the texts changed. Start from locales/en.json or the closest included language, see Languages.

What stays the same

  • The zerio_multijobs table and your players’ jobs (on Qbox they move into qbx_core, see above).
  • /givemultijob and /removemultijob.
  • Every v2 export: AddJob, RemoveJob, UpdateJobRank, GetJobs, CountJobs, DoesPlayerHaveJob, GetPlayersWithJob, and the client export Open. See the Developer Documentation.