# Salary

> Reference for Salary in sky_jobs_base.

[All server exports](/docs/base/jobs-base/server-exports)

## Salary

These exports allow external resources to temporarily pause and resume salary payouts for a player.

### `pausePlayerSalary(playerId)`

- **Purpose**: Pauses salary payouts for the given player. While paused, the player will not receive any automatic salary payments.
- **Arguments**:

  - `playerId` (`number`) — the server ID of the player. **Required.**
- **Returns**: `boolean` — `true` on success, `false` if the player ID is invalid.

```lua
exports["sky_jobs_base"]:pausePlayerSalary(playerId)
```

### `resumePlayerSalary(playerId)`

- **Purpose**: Resumes salary payouts for the given player after they were paused.
- **Arguments**:

  - `playerId` (`number`) — the server ID of the player. **Required.**
- **Returns**: `boolean` — `true` on success, `false` if the player ID is invalid.

```lua
exports["sky_jobs_base"]:resumePlayerSalary(playerId)
```

### `isPlayerSalaryPaused(playerId)`

- **Purpose**: Checks whether salary payouts are currently paused for the given player.
- **Arguments**:

  - `playerId` (`number`) — the server ID of the player.
- **Returns**: `boolean` — `true` if paused, `false` otherwise.

```lua
local paused = exports["sky_jobs_base"]:isPlayerSalaryPaused(playerId)
```

### `getGradeSalary(jobName, grade)`

- **Purpose**: Reads the salary configuration of a job grade as configured in the boss menu.
- **Arguments**:

  - `jobName` (`string`) — the job name. **Required.**
  - `grade` (`number`) — the job grade. **Required.**
- **Returns**:

  - `number` — salary amount per interval (`0` if none configured).
  - `number` — payout interval in minutes.

```lua
local amount, intervalMinutes = exports["sky_jobs_base"]:getGradeSalary("ambulance", 3)
print(("Grade 3 earns $%d every %d minutes"):format(amount, intervalMinutes))
```

<callout color="info" icon="i-lucide-info">

The pause state is stored in memory and automatically cleared when the player disconnects. No database changes are needed.

</callout>

<br />
