For the complete documentation index, see llms.txt. This page is also available as Markdown.

Exports

openMenu()

Trigger this export to open the multi job menu.

exports['av_multijob']:openMenu()

setJob(playerId,job,grade,onDuty)

Assigns a job to the specified player and sets it as current. It automatically checks the configured job limit, granting the job only if the player hasn't reached their maximum allowed jobs.

params:

  • playerId:number|string Player server id or Player Framework identifier

  • job:string Job name

  • grade:number Job grade

  • onDuty:boolean Duty status

returns:

  • response:boolean

local playerId = 3
-- playerId could also be the player framework identifier:
-- playerId = "char1:abc1234567687"
local job = "police"
local grade = 0
local onDuty = false
local applied = exports['av_multijob']:setJob(playerId,job,grade,onDuty)
print(applied)

deleteJob(playerId,job)

Removes the job from the specified player.

params:

  • playerId: number|string Player server id or Player Framework identifier.

  • job:string Job to remove

returns:

  • response: boolean

addJob(playerId,job,grade)

Adds the specified job and grade to the player without changing their currently active job.

params:

  • playerId: number|string Player server id or Player Framework identifier.

  • job:string Job name

  • grade:number Job grade

returns:

  • response:boolean

setJobGrade(playerId,job,grade)

Updates the specified player job grade to the new desired rank.

params:

  • playerId:number|string Player server id or Player Framework identifier.

  • job:string Job name

  • grade:number Job grade

returns:

  • response:boolean

getJobPlayer(job)

Returns a table with all job employees.

params:

  • job:string Job name

returns:

  • employees:table[] An array of employees, where each entry contains the following data:

    • identifier:string Player identifier

    • name:string Player full name

    • grade:number Player grade

Last updated