Installation
Install all resource dependencies.
Insert SQL tablet to your database
[OPTIONAL] Change locale in server.cfg
setr ox:locale en
If you will set it to other language than en/pl you need to add new file to locales with this template and set everything to wanted language!
{
"success": "Success", // Indicating that an action was successful.
"error": "Error", // Indicating that an error occurred.
"canceled": "Canceled", // Indicating that an action was canceled.
"nojobs": "No jobs", // Indicating that the player currently has no jobs assigned.
"offduty": "Off duty", // Text shown when a player is off duty.
"onduty": "On duty", // Text shown when a player is on duty.
"openjobmenu": "Open job menu", // Setting dispaly.
"managejobs": "Manage jobs", // Option to manage available jobs.
"job": "Job", // Label for a job.
"player": "Player", // Label for a player.
"actual": "Current", // Indicating the current state or job.
"grade": "Grade", // Label for job grade.
"salary": "Salary", // Label for salary.
"gradesalary": "Grade: %s \nSalary: $%s", // Format for displaying grade and salary.
"dutystatus": "Duty status: %s", // Displaying the current duty status of the player.
"changejob": "Change job", // Option to change a player's job.
"changejobto": "Change job to %s", // Prompt to change to a specific job.
"changedjobto": "Changed job to %s", // Confirm message showing which job was changed to.
"cantchangejobto": "Failed to change job to %s", // Error message indicating the failure to change to a specified job.
"deletejob": "Delete job", // Option to delete a job.
"deletequestion": "Are you sure you want to delete the job %s?", // Confirmation question before deleting a job.
"deletedescription": "Administration is not responsible for deleted jobs", // Warning message about the responsibility for deleted jobs.
"cantdeletejob": "Failed to delete job", // Message indicating the failure to delete a job.
"canceleddeletejob": "Job deletion canceled", // Message indicating job deletion was canceled.
"dutyturnedoff": "You are off duty", // Indicating that the player is now off duty.
"dutyturnedon": "You are on duty", // Indicating that the player is now on duty.
"unknown": "Unknown", // Indicating an unknown status or value.
"samegrade": "The player's job is already at this grade", // Message indicating the job is already at the specified grade.
"jobupdated": "Job updated", // Confirming that the job was updated.
"jobupdatedtarget": "Your job: %s has been updated", // Message to the target player about their job update.
"newgrade": "New grade: %s", // Indicating the new job grade.
"addedjob": "Job added", // Confirming that a job was added.
"addedjobinfo": "Player: %s \nJob: %s \nGrade: %s", // Information about the job added to a player.
"addedjobtarget": "New job added", // Confirmation message to the player who received a new job.
"addedjobtargetinfo": "Job: %s \nGrade: %s", // Detailed information for the player about the new job.
"deletedjob": "Job deleted", // Confirming that a job has been deleted.
"targetnojob": "The player does not have this job", // Message indicating that the target player does not have the specified job.
"playernotfound": "Player not found" // Message indicating that a player with the given ID could not be found.
}
Config
Set everything in the config to your preferences
config = {}
-- Maximum number of jobs a player can have
config.maxJobs = 3
-- Keybind for opening the job menu
config.JobMenuKeybind = 'PAGEUP' -- Refer to https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/ for other key options
-- Command configurations
config.commands = {
duty = {
name = 'duty',
help = 'Go on/off duty',
params = false,
restricted = false,
},
menu = {
name = 'job',
help = 'Job menu',
params = false,
restricted = false,
},
addjob = {
name = 'addjob',
help = 'Assign a job to a player',
params = {
{
name = 'Gracz', -- do not change this line, this is used for the command arguments and script will not work if changed
type = 'playerId',
help = 'Player ID',
},
{
name = 'praca', -- do not change this line, this is used for the command arguments and script will not work if changed
type = 'string',
help = 'Job name',
},
{
name = 'Stopien', -- do not change this line, this is used for the command arguments and script will not work if changed
type = 'number',
help = 'Job grade',
},
},
restricted = 'admin',
},
removejob = {
name = 'removejob',
help = 'Remove a job from a player',
params = {
{
name = 'Gracz', -- do not change this line, this is used for the command arguments and script will not work if changed
type = 'playerId',
help = 'Player ID',
},
{
name = 'praca', -- do not change this line, this is used for the command arguments and script will not work if changed
type = 'string',
help = 'Job name',
},
},
restricted = 'admin',
},
}
-- Color configurations
config.color = {
red = '#c4443b',
green = '#4ab05a',
}
-- Job icons configuration
config.JobIcons = { -- must be a free font awesome icon
['police'] = 'fa-solid fa-shield',
['ambulance'] = 'fa-solid fa-user-doctor',
['mechanic'] = 'fa-solid fa-wrench',
['tow'] = 'fa-solid fa-truck-pickup',
}
Last updated