Browse docs
Salary
Reference for Salary in sky_jobs_base.
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—trueon success,falseif the player ID is invalid.
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—trueon success,falseif the player ID is invalid.
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—trueif paused,falseotherwise.
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 (0if none configured).number— payout interval in minutes.
local amount, intervalMinutes = exports["sky_jobs_base"]:getGradeSalary("ambulance", 3)
print(("Grade 3 earns $%d every %d minutes"):format(amount, intervalMinutes))
The pause state is stored in memory and automatically cleared when the player disconnects. No database changes are needed.