# Server Exports

### GetPlayerJobs

Return a table with player jobs

```lua
exports.jobcreator:GetPlayerJobs(identifier)
```

* identifier: `string`

Return:

* jobs: `table` containing:
  * `grade`
  * `name`
  * `atwork` (1 is in service, else 0)

***

### HasJob

Check if a player has a job

```lua
exports.jobcreator:HasJob(identifier, jobname)
```

* identifier: `string`
* jobname: `string`

Return:

* `true` success
* `false` insuccess

***

### SetJobGrade

Set the grade for the job

```lua
exports.jobcreator:SetJobGrade(identifier, jobname, grade)
```

* identifier: `string`
* jobname: `string`
* grade: `number`

Return:

* `true` success
* `false` insuccess

***

### GetJobGrade

Returns the job grade, else -1

```lua
exports.jobcreator:GetJobGrade(identifier, jobname)
```

* identifier: `string`
* jobname: `string`

Return:

* grade: `number`

***

### GetNJob

Returns the n-th job from player jobs

```lua
exports.jobcreator:GetNJob(identifier, nth)
```

* identifier: `string`
* nth: `number`

Return:

* job: `table` containing:
  * `grade`
  * `name`
  * `atwork` (1 is in service, else 0)

***

### GetFirstJob

Return the first job of the player

```lua
exports.jobcreator:GetFirstJob(identifier)
```

* identifier: `string`

Return:

* job: `table` containing:
  * `grade`
  * `name`
  * `atwork` (1 is in service, else 0)

***

### SetJob

Add a new job to a player if at least one is free

```lua
exports.jobcreator:SetJob(identifier, jobname, grade)
```

* identifier: `string`
* jobname: `string`
* grade: `number`

***

### RemoveJob

Remove a specified job from players's job

```lua
exports.jobcreator:RemoveJob(identifier, jobname)
```

* identifier: `string`
* jobname: `string`

***

### GetJobLabel

Return the Label of a specific job

```lua
exports.jobcreator:GetJobLabel(jobname)
```

* jobname: `string`

Return:

* jobLabel: `string`

***

### GetGradeLabel

Return the Label of a specific grade of a job

```lua
exports.jobcreator:GetGradeLabel(jobname, grade)
```

* jobname: `string`

Return:

* gradeLabel: `string`

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://next-script-tm.gitbook.io/next-scripts/paid-resources/job-creator/exports/server-exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
