Download from KEYMASTER and Unzip the forge-multijob.pack.zip and place this folder in your server's resource folder.
Add the resource to your server start config: ensure forge-multijob,the name of the folder must not be changed or the resource will not function correctly.
You must install SQL, make sure you install the correct one, since there is one for ESX and another for QB.
Clear the cache of your server and also of your own FiveM.
Reboot the entire server with the forge script well ensured in your server.cfg.
Do not rename this script, this may cause it to fail when opening the interface.
CONFIG
The following will explain all the settings, one of the most important things that I recommend you spend a few minutes to understand in order to offer your users the best possible experience.
Fill all the CONFIG very carefully.
Config = { }
Config.Framework = 'qbcore' -- Options: 'esx', 'qbcore'
Config.SQLWrapper = 'oxmysql' -- 'ghmattimysql', 'mysql-async', 'oxmysql'
Config.Type = 1 -- TYPE 1 players will be born with only one job until an administrator gives them the rest of the jobs. This is to be able to give more jobs to VIPs and stuff. TYPE 2 each player will have 3 jobs from the start.
Config.UseTarget = false -- true for use of target and false for use of floating text
Config.TargetSystem = 'qb-target' -- qb-target, ox_target
Config.Locations = { -- All with regard to the location of the Job Centre. You can add more than one
{
position = vector3(-267.1945, -959.7616, 31.2231),
blip = {
enabled = true,
id = 369,
color = 17,
scale = 0.7,
display = 2,
name = 'Job Center'
},
npc = {
enabled = true,
coords = vector3(-267.1945, -959.7616, 30.2231),
heading = 209.1426,
model = 's_m_m_dockwork_01',
range = 1.5
},
marker = {
enabled = false,
type = 2,
clorR = 222,
colorG = 186,
colorB = 77,
alpha = 255
}
}
}
Config.DefaultKey = 'F7' -- The key with which the Multijob Menu is opened. Where people activate and switch between their 3 jobs.
Config.AdminGroups = { 'admin', 'god' } -- The administration groups that will allow setjob1, setjob2 or setjob3 to be used
Config.UI = { -- Change the colours of the UI
mainColor = '#31afd4',
secondColor = '#285a69'
}
Config.Jobs = {
{
salary = 1200, -- Here the SALARY that will appear in the Interface. The actual salary will have to be modified inside your server in each "JOB"
difficulty = 'MEDIUM', -- Here is the Difficulty that will appear in the Interface
label = 'Gardener', -- The name that will appear on the Interface
description = 'Lorem ipsum dolor', -- The Job Description to be displayed in the Interface
job = 'gardener', -- The id of the job you will be given when you select the job
grade = 0
},
{
salary = 1400,
difficulty = 'HARD',
label = 'Police',
description = 'Lorem ipsum dolor',
job = 'police',
grade = 2
},
{
salary = 1600,
difficulty = 'EASY',
label = 'Ambulance',
description = 'Lorem ipsum dolor',
job = 'ambulance',
grade = 0
},
{
salary = 1600,
difficulty = 'MEDIUM',
label = 'Mechanic',
description = 'Lorem ipsum dolor',
job = 'mechanic',
grade = 0
},
{
salary = 1600,
difficulty = 'HARD',
label = 'UwU Cafe',
description = 'Lorem ipsum dolor',
job = 'uwu',
grade = 0
},
{
salary = 1600,
difficulty = 'HARD',
label = 'Pizza This',
description = 'Lorem ipsum dolor',
job = 'pizzathis',
grade = 0
}
}
Config.Functions = { -- Useful open functions in the script
DrawMarker = function(coords, data)
DrawMarker(data.type, coords, 0.0, 0.0, 0.0, 0.0, 180.0, 0.0, 0.4, 0.4, 0.4, data.colorR, data.colorG, data.colorB, data.alpha, true, true, 2, nil, nil, false)
end,
DrawText = function(text)
AddTextEntry('ALERT_MESSAGE', text)
BeginTextCommandDisplayHelp('ALERT_MESSAGE')
EndTextCommandDisplayHelp(0, false, false, -1)
end,
Notify = function(text)
if Config.Framework == 'esx' then
ESX.ShowNotification(text)
elseif Config.Framework == 'qbcore' then
QBCore.Functions.Notify(text)
end
end
}
Config.Translation = { -- Some texts for translation. The rest of the things you can translate in the index.html
openmenu = 'Press ~INPUT_CONTEXT~ to open the job center',
openmenutarget = 'Open job center',
currentjobchange = 'You\'ve activated %s as your current job.',
firstjobchange = 'Your first job has changed to %s.',
secondjobchange = 'Your second job has changed to %s.',
thirdjobchange = 'Your third job has changed to %s.'
}
ALTER TABLE `users`
ADD `jobs` longtext DEFAULT NULL;
ALTER TABLE `players`
ADD `jobs` longtext DEFAULT NULL;
If you want to edit the aesthetics or design. You have the HTML open so you can modify the style and everything as you want.
The script is RESPONSIVE for all resolutions as well.