Allows you to limit a job to only be joinable if the player is currently some other job first.
Alias
NeedJob, NeedToChangeFrom, jobs
Source
added in Arivia v3
Requires
no additional requirements
Type
table { }
Example
TEAM_CHIEF = DarkRP.createJob( 'Civil Protection Chief',
{
color = Color( 5, 255, 0, 255 ),
model = 'models/player/combine_soldier_prisonguard.mdl',
description = [[The Chief is the leader of the Civil Protection]],
weapons = { 'arrest_stick', 'unarrest_stick', 'weapon_deagle2', 'stunstick', 'door_ram', 'weaponchecker' },
command = 'chief',
chief = true,
NeedJob = { TEAM_POLICE },
category = 'Civil Protection',
} )
TEAM_CHIEF = DarkRP.createJob( 'Civil Protection Chief',
{
color = Color( 5, 255, 0, 255 ),
model = 'models/player/combine_soldier_prisonguard.mdl',
description = [[The Chief is the leader of the Civil Protection]],
weapons = { 'arrest_stick', 'unarrest_stick', 'weapon_deagle2', 'stunstick', 'door_ram', 'weaponchecker' },
command = 'chief',
chief = true,
NeedJob = { TEAM_POLICE, TEAM_CIVIL },
category = 'Civil Protection',
} )
TEAM_CHIEF = DarkRP.createJob( 'Civil Protection Chief',
{
color = Color( 5, 255, 0, 255 ),
model = 'models/player/combine_soldier_prisonguard.mdl',
description = [[The Chief is the leader of the Civil Protection]],
weapons = { 'arrest_stick', 'unarrest_stick', 'weapon_deagle2', 'stunstick', 'door_ram', 'weaponchecker' },
command = 'chief',
chief = true,
jobs = { TEAM_POLICE, TEAM_CIVIL },
category = 'Civil Protection',
} )
If multiple jobs are provided; the system will allow a player to be any ONE of the total list in order to switch to the new job.
Output
If player selects a job that has a job requirement; they will be presented with an error message in multiple locations:
Notes
Some server owners tend to use CustomCheck to validate jobs; we'd recommend using NeedJob or NeedToChangeFrom instead for more functionality within Arivia.