Multi-job management system for RedM using RSG Core.
Allows players to have and switch between multiple jobs dynamically.
Integrates seamlessly with RSG Core and the duty/job grade system.
Locales: en, fr, es, it, pt-br, el
License: GPL‑3.0
- 💼 Hold multiple jobs at once (configurable maximum).
- 🔄 Switch between jobs instantly using
/myjobsor via menu. - 🔔 Localized notifications through
ox_lib. - 🧩 SQL storage for persistence (
player_jobstable). - 🛠️ Duty toggle supported (calls
RSGCore:ToggleDuty). - 🎨 Configurable job icons using FontAwesome.
- 🔐 Whitelist system to allow specific players more jobs.
- 🌍 Multi-language support built-in.
Config = {}
-- Maximum jobs per player (default: 3)
Config.MaxJobs = 3
-- Specific citizens who can have more jobs
Config.AllowedMultipleJobs = {
"CITIZEN1234", -- Example: admins, testers
"CITIZEN5678"
}
-- Job icons (FontAwesome)
Config.JobIcons = {
['rancher'] = 'fa-solid fa-cow',
['vallaw'] = 'fa-solid fa-shield-halved',
['doctor'] = 'fa-solid fa-briefcase-medical',
['blacksmith'] = 'fa-solid fa-hammer',
['miner'] = 'fa-solid fa-mountain',
['hunter'] = 'fa-solid fa-paw',
['butcher'] = 'fa-solid fa-cutlery',
}💡 You can use any FontAwesome 6 icon class.
Icons appear next to the job name in the/myjobsmenu.
- Maintains a table of player jobs in MySQL (
player_jobs). - On resource start, all player jobs are loaded and linked to their citizenid.
- When a player adds or switches job:
- Verifies against
Config.MaxJobs(or whitelist exception). - Updates both RSGCore job data and SQL table.
- Triggers localized notification with job name & grade.
- Verifies against
- Opens a context menu using
ox_lib.registerContext. - Displays all jobs (current job highlighted).
- Selecting one job calls
TriggerServerEvent('rsg-multijob:switchJob', job) - Displays success/failure notification.
| Command | Description |
|---|---|
/myjobs |
Opens the multi-job selection menu |
/addjob [jobname] [grade] |
(Admin) Adds a new job to a player |
/removejob [jobname] |
(Admin) Removes a job from a player |
CREATE TABLE IF NOT EXISTS `player_jobs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`citizenid` varchar(50) DEFAULT NULL,
`job` varchar(50) DEFAULT NULL,
`grade` int(11) DEFAULT 0,
PRIMARY KEY (`id`)
);Every time a player switches job:
- Their job is updated in
PlayerData.job. - All server checks (
Player.PlayerData.job.name) instantly reflect the change. - If the new job supports
onDuty, it triggers a call toRSGCore:ToggleDuty.
Example usage:
local Player = RSGCore.Functions.GetPlayer(source)
print(Player.PlayerData.job.name) -- returns the currently active job- Place
rsg-multijobinside yourresources/[rsg]folder. - Import
rsg-multijob.sql(or manually create the table above). - Add to your
server.cfg:ensure ox_lib ensure rsg-core ensure rsg-multijob
- Restart your server.
All text strings are managed via ox_lib.locale() and are available in:
en,fr,es,it,pt-br,el
Example English keys:
{
"cl_lang_1": "You have switched to job: %{job}",
"cl_lang_2": "You already have this job!",
"cl_lang_3": "You cannot hold more than %{max} jobs."
}- Randolio — Original multijob system concept & design https://github.com/Randolio
- Mafiaborn — RSG Core adaptation & maintenance
- RSG / Rexshack-RedM — framework integration & localization support
- Community translators
- License: GPL‑3.0