Setting up a police job on your QBCore FiveM server doesn't have to be complicated. This guide walks you through everything — from getting the script files to testing it in game. No coding experience required.
Before installing any script on your FiveM server, make sure you have the following set up 👇
QBCore framework — your server needs to be running QBCore. If you're on ESX, the steps are similar but the exports will differ.
txAdmin or file access — you need to be able to upload files to your server's resources folder. Most hosting providers like ZAP-Hosting give you a file manager.
oxmysql — QBCore uses oxmysql for database queries. Make sure it's installed and running.
You have two options here — download a pre-made script or generate one with AI.
If you want a custom police job built exactly how you want it — specific F6 menu options, cuffing animations, MDT system, jail timer — you can describe it in plain English and Stellar AI will write all the files for you in seconds.
"Make a QBCore police job with F6 menu, handcuffing players, escorting, jailing with a 10 minute timer, issuing fines, a police MDT to search player records, and spawning a police car. Include fxmanifest, client.lua, server.lua and config.lua"
Once you have your script files, you need to get them onto your server. Here's how 👇
Open your server's file manager (ZAP-Hosting, Pterodactyl, WinSCP etc) and navigate to your resources folder. Create a new folder with your script name — for example qb-police.
Upload these files into that folder 👇
Open your server.cfg file and add the ensure line for your new script. It should go after qb-core loads 👇
The order matters — always ensure qb-core before any scripts that depend on it.
Some police scripts need a database table. If your script includes an install.sql file, open your database manager (HeidiSQL, phpMyAdmin or your hosting panel) and run that SQL file.
If there's no SQL file, skip this step — not all scripts need one.
Restart your server and join. To test the police job 👇
This sets your character's job to police with grade 5. Then press F6 to open the police menu and check everything works — cuffing, MDT, vehicles etc.
This usually means qb-core is loading after your script. Move your ensure line below ensure qb-core in server.cfg and restart.
The script can't find QBCore. Make sure your script uses the correct init pattern — either GetSharedObject() or GetCoreObject() depending on your QBCore version.
Check you're actually set to the police job. Run /setjob again and make sure the job name matches exactly what's in config.lua.
Describe your perfect police job in plain English and Stellar AI writes all 4 files — fxmanifest, client, server and config — ready to drop in. Free to start, no coding needed.
Generate my police job →