My jobs.lua does not work. Help pls

I have add jobs in my jobs.lua but when I’m on the server I don’t see them. Can you help me pls? I tried with AddExtraTeam and DarkRP.createJob and none of them work.


--[[---------------------------------------------------------------------------
DarkRP custom jobs
---------------------------------------------------------------------------

This file contains your custom jobs.
This file should also contain jobs from DarkRP that you edited.

Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua
	Once you've done that, copy and paste the job to this file and edit it.

The default jobs can be found here:
https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua

For examples and explanation please visit this wiki page:
http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields


Add jobs under the following line:
---------------------------------------------------------------------------]]

TEAM_MAFIA = DarkRP.createJob("Mafieux", {
    color = Color(75, 75, 75, 255),
    model = {
        "models/player/Group03/Female_01.mdl",
        "models/player/Group03/Male_09.mdl"},
    description = [[The lowest person of crime.
        A gangster generally works for the Mobboss who runs the crime family.
        The Mob boss sets your agenda and you follow it or you might be punished.]],
    weapons = {},
    command = "gangster",
    max = 3,
    salary = GAMEMODE.Config.normalsalary,
    admin = 0,
    vote = false,
    hasLicense = false,
    category = "Gangsters",
})

TEAM_MAFIA = DarkRP.createJob("Chef Mafia", {
    color = Color(25, 25, 25, 255),
    model = "models/player/gman_high.mdl",
    description = [[The Mob boss is the boss of the criminals in the city.
        With his power he coordinates the gangsters and forms an efficient crime organization.
        He has the ability to break into houses by using a lockpick.
        The Mob boss posesses the ability to unarrest you.]],
    weapons = {"lockpick", "unarrest_stick"},
    command = "MAFIABOSS",
    max = 1,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = false,
    category = "Gangsters",
})

TEAM_GUN = AddExtraTeam("Vendeur D'arme", {
    color = Color(255, 140, 0, 255),
    model = "models/player/monk.mdl",
    description = [[A Gun Dealer is the only person who can sell guns to other people.
        Make sure you aren't caught selling illegal firearms to the public! You might get arrested!]],
    weapons = {},
    command = "gundealer",
    max = 2,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = false,
    category = "Citizens",
})

TEAM_MEDIC = AddExtraTeam("Medic", {
    color = Color(47, 79, 79, 255),
    model = "models/player/kleiner.mdl",
    description = [[With your medical knowledge you work to restore players to full health.
        Without a medic, people cannot be healed.
        Left click with the Medical Kit to heal other players.
        Right click with the Medical Kit to heal yourself.]],
    weapons = {"med_kit"},
    command = "medic",
    max = 3,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = false,
    medic = true,
    category = "Citizens",
})

TEAM_CHIEF = AddExtraTeam("Chef Police", {
    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.]],
    weapons = {"arrest_stick", "unarrest_stick", "fas2_famas", "stunstick", "door_ram", "weaponchecker"},
    command = "chief",
    max = 1,
    salary = 100,
    admin = 0,
    vote = false,
    hasLicense = true,
    chief = true,
    NeedToChangeFrom = TEAM_POLICE,
    ammo = {
        ["pistol"] = 60,
    },
    category = "Police",
})

TEAM_MAYOR = AddExtraTeam("Mayor", {
    color = Color(150, 20, 20, 255),
    model = "models/player/breen.mdl",
    description = [[The Mayor of the city creates laws to govern the city.]],
    weapons = {},
    command = "mayor",
    max = 1,
    salary = 500,
    admin = 0,
    vote = true,
    hasLicense = true,
    mayor = true,
    category = "Mayor",
})

TEAM_POLICE = DarkRP.createJob("Police", {
    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.]],
    weapons = {"arrest_stick", "unarrest_stick", "fas2_famas", "stunstick", "door_ram", "weaponchecker", "awp_asiimov",},
    command = "AP",
    max = 4,
    salary = 100,
    admin = 1,
    vote = true,
    hasLicense = true,
    ammo = {
        ["pistol"] = 60,
    },
    category = "Police",
})

TEAM_HITMAN = DarkRP.createJob("Hitman", {
    color = Color(25, 25, 170, 255),
    model = {"models/norpo/ArkhamOrigins/Assassins/Viewmodel/Deathstroke_ValveBiped_HandModel.mdl"},
    description = [[Un hitman qui n'a pas besoin de raison pour tuer.]],
    weapons = {"arrest_stick", "unarrest_stick", "fas2_famas", "stunstick", "door_ram", "weaponchecker", "awp_asiimov"},
    command = "SWAT",
    max = 1,
    salary = 100,
    admin = 1,
    vote = false,
    hasLicense = true,
    ammo = {
        ["pistol"] = 60,
		["sniper"] = 1000,
    },
    category = "Hitman",
})

TEAM_HE = DarkRP.createJob("Hitman Elite", { 
color = Color(0, 0, 255, 255), 
model = {"models/player/soldier_stripped.mdl"}, 
description = [[Un hitman qui n\'a pas besoin de raison pour tuer.]], 
weapons = {"awp_asiimov","fas2_famas"},
command = "he", 
max = 2, 
salary = 1000, 
admin = 0, 
vote = false, 
hasLicense = false,
 ammo = {
        ["pistol"] = 60,
		["sniper"] = 1000,
    },
prior =	{TEAM_POLICE}}

customCheck = function(ply) return ply:GetNWSString("usergroup") = "donator" end
})

TEAM_SWAT = DarkRP.createJob("SWAT", {
color = Color(0, 119, 255, 255),
model = {"models/player/police.mdl"},
description = "You're a member of the SWAT team, you stop raids and reduce crime!",
weapons = {"awp_asiimov", "arrest_stick", "unarrest_stick", "door_ram", "weaponchecker", "stunstick"},
command = "swat",
max = 4,
salary = 1000,
admin = 0,
vote = false,
hasLicense = true,
})


--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
GAMEMODE.DefaultTeam = TEAM_CITIZEN


--[[---------------------------------------------------------------------------
Define which teams belong to civil protection
Civil protection can set warrants, make people wanted and do some other police related things
---------------------------------------------------------------------------]]
GAMEMODE.CivilProtection = {
	[TEAM_POLICE] = true,
	[TEAM_MAYOR] = true,
	[TEAM_CHIEF] = true,
}

--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_HITMAN)

[lua]
prior = blahblah, <—
customCheck = function(ply) return ply:GetNWSString(“usergroup”) = “donator” end
})
[/lua]

That should be your error.

Thanks Keosan,
It worked very well. But this should have add a team that you need to be on before going to the team. How do I do it if this method does not work?

What? If I understood your question then you should use this: NeedToChangeFrom = TEAM_WHATEVER

I think he didn’t get that he missed a comma…