CityRP Documentation Repository

cityrp.jobgroups

Team Names & SOPs -- shared job-group config and token substitution.

Functions

Sharedcityrp.jobgroups.All() → table[]Source ☍

Get every registered Job Group.

Returns

  1. table[]
Sharedcityrp.jobgroups.Get(id) → table?Source ☍

Get a Job Group by id.

Parameters

  • idstring

Returns

  1. table?
Sharedcityrp.jobgroups.GetByTeam(teamIndex) → table[]Source ☍

Get the Job Groups a team is a member of.

teamIndex:
    | `TEAM_PRESIDENT`
    | `TEAM_VP`
    | `TEAM_SSL`
    | `TEAM_SS`
    | `TEAM_GAL`
    | `TEAM_GA`
    | `TEAM_POLICECOMMANDER`
    | `TEAM_POLICEOFFICER`
    | `TEAM_FIRECHIEF`
    | `TEAM_RESCUE`
    | `TEAM_FIREMAN`
    | `TEAM_PARAMEDIC`
    | `TEAM_NEXUSDESK`
    | `TEAM_CITIZEN`
    | `TEAM_CHEF`
    | `TEAM_DOCTOR`
    | `TEAM_ARMSDEALER`
    | `TEAM_MECHANIC`
    | `TEAM_TAXI`
    | `TEAM_SECURITY`
    | `TEAM_REBEL`
    | `TEAM_REBELLEADER`
    | `TEAM_ANARCHIST`
    | `TEAM_BLACKMARKETDEALER`
    | `TEAM_MAFIABOSS`
    | `TEAM_MAFIA`
    | `TEAM_AFK`

Parameters

Returns

  1. table[]
Sharedcityrp.jobgroups.GetControlled(ply) → table[]Source ☍

Get the Job Groups a player currently controls.

Parameters

Returns

  1. table[]
Sharedcityrp.jobgroups.GetControlledByTeam(teamIndex) → table[]Source ☍

Get the Job Groups a given team controls (i.e. sees edit controls for on the Sergeant tab).

teamIndex:
    | `TEAM_PRESIDENT`
    | `TEAM_VP`
    | `TEAM_SSL`
    | `TEAM_SS`
    | `TEAM_GAL`
    | `TEAM_GA`
    | `TEAM_POLICECOMMANDER`
    | `TEAM_POLICEOFFICER`
    | `TEAM_FIRECHIEF`
    | `TEAM_RESCUE`
    | `TEAM_FIREMAN`
    | `TEAM_PARAMEDIC`
    | `TEAM_NEXUSDESK`
    | `TEAM_CITIZEN`
    | `TEAM_CHEF`
    | `TEAM_DOCTOR`
    | `TEAM_ARMSDEALER`
    | `TEAM_MECHANIC`
    | `TEAM_TAXI`
    | `TEAM_SECURITY`
    | `TEAM_REBEL`
    | `TEAM_REBELLEADER`
    | `TEAM_ANARCHIST`
    | `TEAM_BLACKMARKETDEALER`
    | `TEAM_MAFIABOSS`
    | `TEAM_MAFIA`
    | `TEAM_AFK`

Parameters

Returns

  1. table[]
Sharedcityrp.jobgroups.GetPrimaryGroup(teamIndex) → table?Source ☍

The single Job Group a team displays under (Assistant+ tab): membership first, falling back to a group it only controls (leader-only jobs like President aren't "members" of their own group).

teamIndex:
    | `TEAM_PRESIDENT`
    | `TEAM_VP`
    | `TEAM_SSL`
    | `TEAM_SS`
    | `TEAM_GAL`
    | `TEAM_GA`
    | `TEAM_POLICECOMMANDER`
    | `TEAM_POLICEOFFICER`
    | `TEAM_FIRECHIEF`
    | `TEAM_RESCUE`
    | `TEAM_FIREMAN`
    | `TEAM_PARAMEDIC`
    | `TEAM_NEXUSDESK`
    | `TEAM_CITIZEN`
    | `TEAM_CHEF`
    | `TEAM_DOCTOR`
    | `TEAM_ARMSDEALER`
    | `TEAM_MECHANIC`
    | `TEAM_TAXI`
    | `TEAM_SECURITY`
    | `TEAM_REBEL`
    | `TEAM_REBELLEADER`
    | `TEAM_ANARCHIST`
    | `TEAM_BLACKMARKETDEALER`
    | `TEAM_MAFIABOSS`
    | `TEAM_MAFIA`
    | `TEAM_AFK`

Parameters

Returns

  1. table?
Sharedcityrp.teamname.SubstituteTokens(text, ply) → stringSource ☍

Substitute the %mid token (shown to users in the job-name override tooltip) for a player's CID.

Parameters

Returns

  1. string

Tables

Sharedcityrp.jobgroups.listSource ☍

The "Government" preset's Job Groups. A future preset (e.g. Criminal/Gang) is purely additive -- append entries here with a different preset value; nothing else in this file needs to change unless the menu is later required to filter by active preset.

Sharedcityrp.jobgroups.policeLiveriesSource ☍

Police-only default vehicle livery options -- v_pol_crownvic only defines the 4 Bambo liveries, so a SirWulf pick is skipped silently at apply time; see cityrp.teamname.ApplyDefaultLivery.

Fields

Sharedcityrp.jobgroupsSource ☍
Sharedcityrp.teamnameSource ☍