This article is not relevant anymore: The updated version is here: https://originahl-scripts.com/fr/help/script-activation-presentation#3
New Website here : https://originahl-scripts.com/gmod-scripts

The content below is no longer current, however I am keeping this article for those who would use the old version:


Hello, you want the job in the menu F4 to be invisible? But it is only visible if the player is in the whiteliste for this job? Here I'll give you an example.

--Note:
--EXEMPLE Whit One Class:
"Civil Protection"
--Line need be added:
--customCheck
--CustomCheckFailMsg = "You are not in the withelist!",


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 to alert the public to the presence of a criminal.]]
,
weapons = {"arrest_stick", "door_ram", "weaponchecker"},
command = "cp",
max = 4,
salary = GAMEMODE.Config.normalsalary * 1.45,
admin = 0,
vote = true,
hasLicense = true,
ammo = {
]"pistol"] = 60,
},
category = "Civil Protection",
customCheck = function(ply) if CLIENT then return PlychangeAllowed(ply,"Civil Protection") else return true end end, --Respect the Space and the CAPS

CustomCheckFailMsg = "You are not in the withelist!",
})

--Why something this is wrong? if the original name of the Job is "Civil Protection" you need respect CAPS, and Space
Some bad example:

--Problem is the CAPS:"civil protection"
--Problem is the Spaces:"CivilProtection" or " Civil Protection " or "Civil Protection "
--Another reason you put the bad name of job, example: "Mayor"
--Il s'agit des seuls raisons que cela ne fonctionne pas.