Jail System

JailPlayer

Use following export to jail some player.

exports['p_policejob']:JailPlayer(officerId, data)
  • officerId: number

    • Existing officer id

  • data: table

    • player: number

    • jail: number

    • fine: number

    • reason: string

    • offenses?: { [string]: offenseData }

offenseData

  • fine: number

  • label: string

  • jail: number

  • count: number

Return:

  • state: boolean or nil

Offenses are only required to display it properly in our Police MDT.


JailPlayers

Use following export to jail few players at the same time.

exports['p_policejob']:JailPlayers(officerId, data)
  • officerId: number

    • Existing officer id

  • data: table

    • players: { [index]: { identifier: string } }

    • jail: number

    • fine: number

    • reason: string

    • offenses?: { [string]: offenseData }

offenseData

  • fine: number

  • label: string

  • jail: number

  • count: number

Return:

  • state: boolean or nil

Offenses are only required to display it properly in our Police MDT.


Jail Command

Use following command to jail player [required permissions in config]

/jail targetId months
  • targetId: number

    • Existing player server id

  • months: number

    • Amount of months in jail


Unjail Player

Use following export to unjail player.

exports['p_policejob']:UnJailPlayer(playerId, targetId)
  • playerId: number or nil

    • Existing player server id

  • targetId: number

    • Existing player server id in jail


Unjail Command

Use following command to unjail player [required permissions in config].

/unjail targetId
  • targetId: number

    • Existing player server id in jail


Shorten Jail

Use following export to shorten player jail.

exports['p_policejob']:ShortenJailPlayer(playerId, targetId, months)
  • playerId: number or nil

    • Existing player server id

  • targetId: number

    • Existing player server id in jail

  • months: number

    • Amount of months to shorten


Shorten Jail Command

Use following command to shorten jail player [required permissions in config].

/shortjail targetId months
  • targetId: number

    • Existing player server id in jail

  • months: number

    • Amount of months to shorten


inJail

Check if player is currently in jail.

Player(playerId).state.inJail
  • playerId: number

    • Existing player server id

Return:

  • state: boolean

getPlayerJudgment

Check player remaining amount of months in jail.

exports['p_policejob']:getPlayerJudgment(playerId)
  • playerId: number

    • Existing player server id

Return:

  • months: number or 0

Last updated