DarkRP CP/Mayor/Swat unable to warrant/wanted + Hitman menu not working

I’ve been having these issues for a little while and haven’t been able to figure them out and they are driving my up the wall.
Firstly my custom and default mayor and cp jobs are unable to give out warrants and wanteds, Whenever the command is used it will say “You are not the right job to make someone wanted” while someone is mayor, cp, chief, swat.

These are what I use in jobs.lua


TEAM_POLICE = DarkRP.createJob("Civil Protection", {
    color = Color(25, 25, 170, 255),
    model = {"models/player/police.mdl", "models/player/police_fem.mdl"},
    description = [[The protector of every citizen that lives in the city.
        You have the power to arrest criminals and protect innocents.
        Hit a player with your arrest baton to put them in jail.
        Bash a player with a stunstick and they may learn to obey the law.
        The Battering Ram can break down the door of a criminal, with a warrant for their arrest.
        The Battering Ram can also unfreeze frozen props (if enabled).
        Type /wanted <name> to alert the public to the presence of a criminal.]],
    weapons = {"weapon_fists", "arrest_stick", "unarrest_stick", "m9k_glock", "stunstick", "door_ram", "weaponchecker", "weapon_cuff_tactical"},
    command = "cp",
    max = 4,
    salary = GAMEMODE.Config.normalsalary * 1.45,
    admin = 0,
    vote = true,
    hasLicense = true,
    ammo = {
        ["pistol"] = 60,
    },
    category = "Civil Protection",
})

TEAM_CHIEF = DarkRP.createJob("Civil Protection Chief", {
    color = Color(20, 20, 255, 255),
    model = "models/player/combine_soldier_prisonguard.mdl",
    description = [[The Chief is the leader of the Civil Protection unit.
        Coordinate the police force to enforce law in the city.
        Hit a player with arrest baton to put them in jail.
        Bash a player with a stunstick and they may learn to obey the law.
        The Battering Ram can break down the door of a criminal, with a warrant for his/her arrest.
        Type /wanted <name> to alert the public to the presence of a criminal.
        Type /jailpos to set the Jail Position]],
    weapons = {"weapon_fists", "arrest_stick", "unarrest_stick", "m9k_colt1911", "stunstick", "door_ram", "weaponchecker", "weapon_cuff_tactical"},
    command = "chief",
    max = 1,
    salary = GAMEMODE.Config.normalsalary * 1.67,
    admin = 0,
    vote = false,
    hasLicense = true,
    chief = true,
    NeedToChangeFrom = TEAM_POLICE,
    ammo = {
        ["pistol"] = 60,
    },
    category = "Civil Protection",
})

TEAM_MAYOR = DarkRP.createJob("Mayor", {
    color = Color(150, 20, 20, 255),
    model = "models/player/breen.mdl",
    description = [[The Mayor of the city creates laws to govern the city.
    If you are the mayor you may create and accept warrants.
    Type /wanted <name>  to warrant a player.
    Type /jailpos to set the Jail Position.
    Type /lockdown initiate a lockdown of the city.
    Everyone must be inside during a lockdown.
    The cops patrol the area.
    /unlockdown to end a lockdown]],
    weapons = {"weapon_fists"},
    command = "mayor",
    max = 1,
    salary = GAMEMODE.Config.normalsalary * 1.89,
    admin = 0,
    vote = true,
    hasLicense = false,
    mayor = true,
    category = "Civil Protection",
})

This is at the bottom of my jobs.lua


AddAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG})
AddAgenda("Police agenda", TEAM_MAYOR, {TEAM_CHIEF, TEAM_POLICE})
AddDoorGroup("Cops and Mayor only", TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR)
AddDoorGroup("Gundealer only", TEAM_GUN)
DarkRP.addHitmanTeam(TEAM_HITMAN)
DarkRP.addHitmanTeam(TEAM_PHITMAN)

This is my disabled defaults


--[[---------------------------------------------------------------------------
DarkRP disabled defaults
---------------------------------------------------------------------------

DarkRP comes with a bunch of default things:
	- a load of modules
	- default jobs
	- shipments and guns
	- entities (like the money printer)
	and many more

If you want to disable or replace the default things, you should disable them here

Note: if you want to have e.g. edit the official medic job, you MUST disable the default one in this file!
You can copy the medic from DarkRP and paste it in darkrp_config/jobs.lua
---------------------------------------------------------------------------]]


--[[---------------------------------------------------------------------------
The list of modules that are disabled. Set to true to disable, false to enable.
Modules that are not in this list are enabled by default. 
In some cases some external addons may overwrite one of the modules below and will expect them to be enabled to work. 
In these few cases it will be pretty obvious when you expect something to happen and nothing does.  
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["modules"] = {
	["afk"]              = true,
	["chatsounds"]       = false,
	["events"]           = false,
	["fpp"]              = false,
	["f1menu"]           = false,
	["f4menu"]           = false,
	["hitmenu"]          = false,
	["hud"]              = false,
	["hungermod"]        = true,
	["playerscale"]      = false,
	["sleep"]            = false,
	["fadmin"]           = false,
}



--[[---------------------------------------------------------------------------
The disabled default jobs. true to disable, false to enable.

NOTE: If you disable a job and remake it, expect things that rely on the job to stop working
e.g. you disable the gundealer and you make a new job as TEAM_GUN. If you want the shipments/door groups/etc. to
work for your custom job, remake them to include your job as well.
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["jobs"] = {
	["chief"]     = true,
	["citizen"]   = false,
	["cook"]      = false, --Hungermod only
	["cp"]        = true,
	["gangster"]  = true,
	["gundealer"] = true,
	["hobo"]      = true,
	["mayor"]     = true,
	["medic"]     = true,
	["mobboss"]   = true,
}

--[[---------------------------------------------------------------------------
Shipments and pistols
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["shipments"] = {
	["AK47"]         = true,
	["Desert eagle"] = true,
	["Fiveseven"]    = true,
	["Glock"]        = true,
	["M4"]           = true,
	["Mac 10"]       = true,
	["MP5"]          = true,
	["P228"]         = true,
	["Pump shotgun"] = true,
	["Sniper rifle"] = true,
}

--[[---------------------------------------------------------------------------
Entities
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["entities"] = {
	["Drug lab"]      = true,
	["Gun lab"]       = true,
	["Money printer"] = true,
	["Microwave"]     = true, --Hungermod only
	["Tip Jar"]       = false,
}

--[[---------------------------------------------------------------------------
Vehicles
(at the moment there are no default vehicles)
You could use this to disable vehicles you added in the vehicles.lua located in the darkrp_customthings folder.
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["vehicles"] = {

}

--[[---------------------------------------------------------------------------
Food
Food is only enabled when hungermod is enabled (see disabled modules above).
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["food"] = {
	["Banana"]           = false,
	["Bunch of bananas"] = false,
	["Melon"]            = false,
	["Glass bottle"]     = false,
	["Pop can"]          = false,
	["Plastic bottle"]   = false,
	["Milk"]             = false,
	["Bottle 1"]         = false,
	["Bottle 2"]         = false,
	["Bottle 3"]         = false,
	["Orange"]           = false,
}

--[[---------------------------------------------------------------------------
Door groups
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["doorgroups"] = {
	["Cops and Mayor only"] = false,
	["Gundealer only"]      = false,
}


--[[---------------------------------------------------------------------------
Ammo packets
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["ammo"] = {
	["Pistol ammo"]  = true,
	["Rifle ammo"]   = true,
	["Shotgun ammo"] = true,
}

--[[---------------------------------------------------------------------------
Agendas
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["agendas"] = {
	["Gangster's agenda"] = false,
	["Police agenda"] = false,
}

--[[---------------------------------------------------------------------------
Chat groups (chat with /g)
Chat groups do not have names, so their index is used instead.
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["groupchat"] = {
	[1] = false, -- Police group chat (mayor, cp, chief and/or your custom CP teams)
	[2] = false, -- Group chat between gangsters and the mobboss
	[3] = false, -- Group chat between people of the same team
}

--[[---------------------------------------------------------------------------
Jobs that are hitmen
set to true to disable
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["hitmen"] = {
	["mobboss"] = false,
}

DarkRP.disabledDefaults["hitmen"] = {
	["Mob boss"] = false,
}

DarkRP.disabledDefaults["hitmen"] = {
	["Hitman"] = false,
}

DarkRP.disabledDefaults["hitmen"] = {
	["Professional Hitman"] = false,
}

--[[---------------------------------------------------------------------------
Demote groups
When anyone is demote from any job in this group, they will be temporarily banned
from every job in the group
---------------------------------------------------------------------------]]
DarkRP.disabledDefaults["demotegroups"] = {
	["Cops"]		 = false,
	["Gangsters"]	 = false,
}


Secondly it seems that my hitman jobs don’t get the hitman menu like they are supposed to.

Thank you to anyone that provides any kind of help, it is very appreciated.
If any other info is needed I will gladly share it.

This is my full jobs.lua if anyone is interested or if it helps

You’ve defined your jobs in the wrong place, please see the default file: https://github.com/FPtje/darkrpmodification/blob/master/lua/darkrp_customthings/jobs.lua#L18-L20 I’ve highlighted where your jobs should be

Thanks for your help but evidently darkrp doesn’t care where you put the jobs to much, I renamed my mayor and cp jobs and now the mayor is working but cp and swat are still unable to warrant or wanted

here is a pastebin of my now current jobs.lua

weird how the mayor started working but cp and swat arent

(also I’ll move the jobs where they need to be)

[editline]8th September 2017[/editline]

Alright I’ve cleaned it up and put it in the paste bin but as I said only my mayor job is working properly now.
Also trying to become cpc prints this:
“you need to be first to be able to become Civil Protection Chief”

Your jobs file is a complete mess and it’s incredibly hard to read, but it seems that you are not giving each job a unique name.

For example:



TEAM_POLICE2 = DarkRP.createJob("Civil Protection", {
TEAM_POLICE2 = DarkRP.createJob("S.W.A.T", {
TEAM_POLICE2 = DarkRP.createJob("S.W.A.T Sniper", {
TEAM_POLICE2 = DarkRP.createJob("S.W.A.T Leader", {
TEAM_POLICE2 = DarkRP.createJob("S.W.A.T Medic", {
TEAM_POLICE2 = DarkRP.createJob("S.W.A.T Commander", {


These are all being defined as “TEAM_POLICE2”, instead they should be unique.

You will also need to add each unique job definition to the CP table



GAMEMODE.CivilProtection = {
    [TEAM_POLICE] = true,
    [TEAM_CHIEF] = true,
    [TEAM_MAYOR] = true,
    [TEAM_POLICE2] = true,
    [TEAM_CHIEF2] = true,
    [TEAM_MAYOR2] = true,
}


Yeah I know its a mess… But hey its better then a lot of them.
I’ll try that again, having my jobs at the bottom was probably giving me some of the issues I had before. And I’ll try to organize it better. time to make some coffee for me

[editline]8th September 2017[/editline]

Okie Dokie All organized… betterish… Hopefully It’ll work

[editline]8th September 2017[/editline]

Good news, Swat teams can warrant (I keep wanting to spell it warrent) and wanted, BUT CP still cannot and CPC is still saying that weird first thing

I’m unsure about this one, at a quick glance your jobs seem fine. Have you been checking the server and client consoles for any errors?

On your ‘Civil Protection Chief’ job, you have the following line:



NeedToChangeFrom = TEAM_POLICE,


However, ‘TEAM_POLICE’ doesn’t exist, perhaps try ‘TEAM_POLICE2’ ?