❓Frequent Questions
¿Why the alert is not being triggered with my robbery script?
If the alert is not running when a theft is executed, it is very possible that it is because you do not have the export/event added within that script, here is the list of exports to be able to add alerts.
¿Why I can't see buttons to add data in the criminal code?
In qbcore you can define which ranks are bosses, if you do not have a rank that is considered a boss you will not be able to see the criminal code buttons.
Here we show an example where rank 4 is considered a boss and therefore will be able to see the buttons to add criminal code.
police = {
label = 'Law Enforcement',
type = 'leo',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Recruit', payment = 50 },
['1'] = { name = 'Officer', payment = 75 },
['2'] = { name = 'Sergeant', payment = 100 },
['3'] = { name = 'Lieutenant', payment = 125 },
['4'] = { name = 'Chief', isboss = true, payment = 150 }, -- BOSS
},
},You will have to set in config/permissions.lua what ranks will be considered as boss, by default the boss will be rank 4, you can add as many as you want.
Example with some ranks as boss(4, 5, 6):
Config.BossGrade = { 4, 5, 6 } -- ONLY ESX, set the grades that will be considered as boss and will have more permissions like manage penal code¿How to change department/jurisdiction of a job?
By default all ranges will have LSPD as department, you can change it by adding a field type in each range.
Example making rank 0, 1, 2, 3 be from department LSSD and rank 4 be from department BCSO
police = {
label = 'Law Enforcement',
type = 'leo',
defaultDuty = true,
offDutyPay = false,
grades = {
['0'] = { name = 'Recruit', payment = 50, type = "LSSD" },
['1'] = { name = 'Officer', payment = 75, type = "LSSD" },
['2'] = { name = 'Sergeant', payment = 100, type = "LSSD" },
['3'] = { name = 'Lieutenant', payment = 125, type = "LSSD" },
['4'] = { name = 'Chief', payment = 150, type = "BCSO", isboss = true, },
},
},By default all ranges will have LSPD as department, you can change it by editing the column type of each grade in the table job_grades.
Example with the police ranks 5, 6, 7, 8, 9 as LSPD and sheriff with LSSD.

SQL Error illegal mix of collations
This error occurs when a JOIN is performed between columns that use different collations. In our case, this happens when querying debtors by joining the origen_police_bills table with players or users.
To resolve this issue, make sure all text columns involved in the join use the same collation (e.g. utf8mb4_general_ci or utf8mb4_unicode_ci).
⚠️ Important: Make a backup before applying any collation changes—especially if your database contains Chinese, Japanese, or other non-UTF8MB4 characters.
ALTER TABLE origen_police_bills CONVERT TO CHARACTER SET utf8mb4;
ALTER TABLE players CONVERT TO CHARACTER SET utf8mb4;ALTER TABLE origen_police_bills CONVERT TO CHARACTER SET utf8mb4;
ALTER TABLE users CONVERT TO CHARACTER SET utf8mb4;Last updated