r_scripts Docs.
  • Introduction
  • Paid Resources
    • r_notify
      • Installation
      • Configuration
      • API
    • r_trapphone
      • Dependencies
      • Installation
      • Configuration
      • Common Errors
    • r_killfeed
      • Dependencies
      • Installation
      • Configuration
    • r_prison
      • Dependencies
      • Installation
      • Configuration
      • API
        • Client
        • Server
    • r_lottery
      • Dependencies
      • Installation
      • Configuration
    • r_blackmarket
      • Dependencies
      • Installation
      • Configuration
    • r_storageunits
      • Dependencies
      • Installation
      • Configuration
    • r_buddies
      • Dependencies
      • Installation
      • Configuration
  • Free Resources
    • r_bridge
      • Dependencies
      • Compatibilities
      • Installation
      • Configuration
    • r_communityservice
      • Dependencies
      • Installation
      • Configuration
    • r_drugsales
      • Dependencies
      • Installation
      • Configuration
    • r_energydrinks
      • Dependencies
      • Installation
      • Configuration
    • r_moneywash
      • Dependencies
      • Installation
      • Configuration
    • r_whippets
      • Dependencies
      • Installation
      • Configuration
Powered by GitBook
On this page
  • JailPlayer
  • ReleaseInmate
  • ReleaseInmateOffline
  • EditInmateSentence
  • IsInmate
  • GetInmateInfo
  • SetLockdown
  • ReleaseLockdown
  • IsInmateLockdown
  • AddCanteen
  • RemoveCanteen
  1. Paid Resources
  2. r_prison
  3. API

Server

These are all the server side exports you can utilize in other resources.

JailPlayer

local target = 1 -- ID 1
local time = 10 -- 10 minutes
local bail = 10000 -- $10000 (0 or nil for no bail)

exports.r_prison:JailPlayer(target, time, bail)
  • Returns true or false, indicating whether the target was successfully jailed.


ReleaseInmate

local target = 1 -- ID 1

exports.r_prison:ReleaseInmate(target)
  • Client invoking must have ACE or police job!

  • Returns true or false, indicating whether the target was successfully released.


ReleaseInmateOffline

local charId = "EFR16E1B"

exports.r_prison:ReleaseOfflineInmate(charId)
  • Returns true or false, indicating whether the offline character's sentence was cleared.


EditInmateSentence

local target = 1 -- ID 1
local time = 15 -- 15 minutes

exports.r_prison:EditInmateSentence(target, time)
  • Returns true or false, indicating whether the target's sentence was changed.


IsInmate

local target = 1 -- ID 1

exports.r_prison:IsInmate(target)
  • Returns true or false, indicating whether the target is an inmate.


GetInmateInfo

local target = 1 -- ID 1

exports.r_prison:GetInmateInfo(target)
  • Returns a table of inmate information if the target is an inmate.


SetLockdown

local target = 1 -- ID 1
local time = 5 -- 5 minutes

exports.r_prison:SetLockdown(target, time)
  • Target must be an inmate.

  • Returns true or false, indicating whether the target was successfully placed in lockdown.


ReleaseLockdown

local target = 1 -- ID 1

exports.r_prison:ReleaseLockdown(target)
  • Returns true or false, indicating whether the target was successfully released from lockdown.


IsInmateLockdown

local target = 1 -- ID 1

exports.r_prison:IsInmateLockdown(target)
  • Returns true or false, indicating whether the target is in lockdown.


AddCanteen

local target = 1 -- ID 1
local amount = 500 -- $500

exports.r_prison:AddCanteen(target, amount)
  • Target must be an inmate.

  • Returns true or false, indicating whether the target's canteen balance has been updated.


RemoveCanteen

local target = 1 -- ID 1
local amount - 250 -- $250

exports.r_prison:RemoveCanteen(target, amount)
  • Target must be an inmate.

  • Returns true or false, indicating whether the target's canteen balance has been updated.

Last updated 6 months ago