Setring up my Fivem Scripts
Liveries & Vehicle Textures
After Purchase
Configuration
Dependencies
SonoranCAD
Custom Flags & Billboards
Prostitution
Flatten Tires
QB-BlackMarket
Backseat
qb-sheriffjob
Ragdoll
Togglepointing
Vehicle Underglow Toggle
CES Help Document > FiveM > qb-sheriffjob
qb-sheriffjob
1. Installation
Extract the Script:
Unzip qb-sheriffjob.zip and place the folder in your resources/ directory.
2. Start the Script:
Add the following to your server.cfg
ensure qb-sheriffjob
3. Create the Job in Your SQL Database
INSERT INTO `jobs` (name, label) VALUES ('sheriff', 'Sheriff');
INSERT INTO `job_grades` (job_name, grade, name, label, salary) VALUES
('sheriff', 0, 'recruit', 'Recruit', 100),
('sheriff', 1, 'deputy', 'Deputy', 300),
('sheriff', 2, 'sergeant', 'Sergeant', 500),
('sheriff', 3, 'captain', 'Captain', 700),
('sheriff', 4, 'chief', 'Chief', 1000);
4. Configuration
Inside config.lua
Config = {}
Config.SheriffJob = {
label = "Sheriff",
defaultDuty = false,
offDutyPay = 0,
grades = {},
vehicles = {
["0"] = { vehicle = "sheriff", label = "Recruit Cruiser" },
["1"] = { vehicle = "sheriff2", label = "Deputy SUV" },
["2"] = { vehicle = "sheriff3", label = "Sergeant Patrol" },
["3"] = { vehicle = "riot", label = "Captain Riot Van" },
["4"] = { vehicle = "fbi", label = "Chief FBI" }
}
}
You can add more vehicles by rank, change vehicle models, or rename labels.
5. How to Use
Players with the sheriff job can use /toggleduty to go on or off duty.
When on duty, trigger the spawnVehicle event to get a vehicle based on your grade
TriggerEvent('qb-sheriffjob:spawnVehicle')
⚠️ You'll need to bind this to a menu, button, or location to make it usable in-game.
6. Developer Notes
server/server.lua handles the duty toggle logic and ensures only sheriff job players are allowed.
client/client.lua handles notifications and vehicle spawning using the job grade.
7. License
This script is provided for free use.
You're allowed to modify — but not sell under any form.
Review this page
1 recommend this page