Skip to main content
The Jobs component manages character employment, on-duty status, and job-based permissions. Characters can have multiple jobs simultaneously, stored as an array on the character.

Overview

Access via Jobs (server-side only).

Multiple Jobs

Characters can hold multiple jobs at once (Jobs array)

Grade System

Each job has workplaces and grades with levels

On-Duty Status

Clock in/out system per job

Permissions

Job-based access control via Permissions sub-component
Server-Side Only: All job operations must be performed on the server. Never attempt to modify job data from the client.
Important: Characters have a Jobs array (plural), NOT a single Job field. Each entry in the array is a job object with Id, WorkplaceId, GradeId, and GradeLevel.

Job Data Structure

Characters store jobs as an array:

Job Management

Get

Get a job definition by its ID.
string
required
Job identifier (e.g., ‘police’, ‘ems’, ‘mechanic’)
table|nil
Job definition data or nil if job doesn’t exist
Examples:

GiveJob

Assign a job to a character. Characters can have multiple jobs.
number
required
Character SID
string
required
Job identifier (e.g., ‘police’, ‘ems’, ‘mechanic’)
string
Workplace identifier within the job
string
Grade/rank identifier within the workplace
Examples:

RemoveJob

Remove a job from a character.
number
required
Character SID
string
required
Job identifier to remove
Examples:

Permissions

The Jobs.Permissions sub-component handles job-based access checks.

HasJob

Check if a player has a specific job.
number
required
Player server source
string
required
Job identifier to check. Can pass multiple job IDs as additional arguments.
boolean
true if the player has the specified job
Examples:

GetJobs

Get all jobs for a player.
number
required
Player server source
table
Array of job objects the player has
Examples:

Duty System

The Jobs.Duty sub-component manages on-duty/off-duty status.

On

Clock a player in (set on-duty) for a specific job.
number
required
Player server source
string
required
Job identifier to clock in for
Examples:

Off

Clock a player out (set off-duty) for a specific job.
number
required
Player server source
string
required
Job identifier to clock out of
Examples:

GetDutyData

Get duty information for a specific job, including all on-duty players.
string
required
Job identifier
table
Duty data including DutyPlayers array
Examples:

Accessing Character Jobs Directly

You can also access a character’s jobs through the DataStore:
While you can read char:GetData('Jobs') directly, always use Jobs:GiveJob() and Jobs:RemoveJob() to modify jobs, and Jobs.Permissions:HasJob() for checking job access. Do NOT use char:SetData('Jobs', ...) directly.

Best Practices

Always use Jobs.Permissions:HasJob() for access checks:

Next Steps

Jobs - Events

Job-related events

Jobs - Configuration

Job definitions and setup

Characters API

Character management

Job System Guide

Complete job system guide
Job Integration: Use Jobs.Permissions:HasJob(source, jobId) for access checks and Jobs.Duty:GetDutyData(jobId).DutyPlayers to find on-duty players. These are the two most commonly used patterns.