FiveM Guide

How to Install a QBCore Police Job on Your FiveM Server

August 2026 · 5 min read · Stellar AI

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.

What you need before starting

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.

Step 1 — Get your police job script

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.

💡 Try this prompt in Stellar AI:

"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"

Step 2 — Upload the files to your server

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 👇

resources/ └── qb-police/ ├── fxmanifest.lua ├── client.lua ├── server.lua └── config.lua

Step 3 — Add to server.cfg

Open your server.cfg file and add the ensure line for your new script. It should go after qb-core loads 👇

ensure qb-core ensure qb-police

The order matters — always ensure qb-core before any scripts that depend on it.

Step 4 — Run the SQL (if needed)

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.

Step 5 — Restart and test

Restart your server and join. To test the police job 👇

/setjob [yourname] police 5

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.

Common errors and how to fix them

Error: "No such export in resource qb-core"

This usually means qb-core is loading after your script. Move your ensure line below ensure qb-core in server.cfg and restart.

Error: "attempt to index a nil value"

The script can't find QBCore. Make sure your script uses the correct init pattern — either GetSharedObject() or GetCoreObject() depending on your QBCore version.

F6 menu not showing

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.

Don't want to set this up manually?

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 →