This is an edited version of qb-policejob, with the support of different police departments, so server owners are not limited to the /setjob police… etc. This creates the ability for server owners to create multiple departments which will have the same functions as the police job.
Hey, good question! I changed all client and server.luas as well as the config. The config.lua can be adjusted to your liking. This is the recent version of qb-policejob and will be updated weekly.
So while this will allow you to add a sheriffs department, those sheriffs are still going to get stressed out. I think there are a couple of other checks like in qb-drugs for police numbers. just search the entire code base.
I didnt think of that! Would you be able to possible assist with making an edit for qb-hud too to support this? Also, the code you sent is exactly what i did.
changing all of this and adding new police jobs like dps, doc, doj etc and adding the type = “leo” does not work for me and i looked through and everything is right, i switched my job in game to police and tried to open the trashcan for police that i set with a vector3 in the police config and it will open for police job but when i switch my job to dps with the type dps and go back to try to open the trashcan as the dps job it will not even pop up with my third eye.
so going off of qb-policejob\server\main.lua i literally just changed anything from .name == "police" to .type == "leo"
local function GetCurrentCops()
local amount = 0
local players = QBCore.Functions.GetQBPlayers()
for _, v in pairs(players) do
if v and v.PlayerData.job.type == "leo" and v.PlayerData.job.onduty then
amount += 1
end
end
return amount
end
make sure you type and leo are all lower case since casing matters.
im having an issue with the different jobs i have bcso and sast but nothing seems to work when im that job no armory or anything through the police job there all set like this
I found and fixed the issue I hope it works for you too. Goto policejob/client and replace job.lua with the job.lua attached and it should fix your issue. job.lua (38.2 KB)