Create Jobs
Configuration
If you want to make job assignment mandatory for players to work, enable this option in the configuration:
Config.jobRequired = true
ESX Framework
Add Jobs to Database
Run this SQL query to add all 8 jobs to your ESX database:
INSERT INTO `jobs` (name, label) VALUES
('lumberjack', 'Lumberjack'),
('electrician', 'Electrician'),
('oiltechnician', 'Oil Technician'),
('fisherman', 'Fisherman'),
('coffeefarmer', 'Coffee Farmer'),
('baker', 'Baker'),
('tailor', 'Tailor'),
('scientist', 'Scientist');
Add Job Grades
Run this SQL query to add the Employee grade for all jobs:
INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
('lumberjack', 0, 'employee', 'Employee', 50, '{}', '{}'),
('electrician', 0, 'employee', 'Employee', 50, '{}', '{}'),
('oiltechnician', 0, 'employee', 'Employee', 50, '{}', '{}'),
('fisherman', 0, 'employee', 'Employee', 50, '{}', '{}'),
('coffeefarmer', 0, 'employee', 'Employee', 50, '{}', '{}'),
('baker', 0, 'employee', 'Employee', 50, '{}', '{}'),
('tailor', 0, 'employee', 'Employee', 50, '{}', '{}'),
('scientist', 0, 'employee', 'Employee', 50, '{}', '{}');
QBCore Framework
Add Jobs to qb-core
Add these jobs to your resources/[qb]/qb-core/shared/jobs.lua:
['miner'] = {
label = 'Miner',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Employee', payment = 50 }
}
},
['lumberjack'] = {
label = 'Lumberjack',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Employee', payment = 50 }
}
},
['electrician'] = {
label = 'Electrician',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Employee', payment = 50 }
}
},
['oiltechnician'] = {
label = 'Oil Technician',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Employee', payment = 50 }
}
},
['fisherman'] = {
label = 'Fisherman',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Employee', payment = 50 }
}
},
['coffeefarmer'] = {
label = 'Coffee Farmer',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Employee', payment = 50 }
}
},
['baker'] = {
label = 'Baker',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Employee', payment = 50 }
}
},
['tailor'] = {
label = 'Tailor',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Employee', payment = 50 }
}
},
['scientist'] = {
label = 'Scientist',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Employee', payment = 50 }
}
}