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

Client

Client-side events and exports exposed by rcore_prison. Call them from other resources running in the same client.

🔒 Jail Actions

Jail

This export is used when you want to jail target citizen.

The initiator player needs to be in Police job to make it work!

---@param targetPlayerId number
---@param jailTime number - jail time in minutes

local targetPlayerId = 1
local jailTime = 5 -- 5 minutes

exports['rcore_prison']:Jail(targetPlayerId, jailTime)
Unjail

This export is used when you want to jail target citizen.

The initiator player needs to be in Police job to make it work!

---@param targetPlayerId number

local targetPlayerId = 1

exports['rcore_prison']:Unjail(targetPlayerId)
JailByIdentifier

This export is used to jail player by identifier

---@param identifier string
---@param jailTime number - jail time in minutes

exports['rcore_prison']:JailByIdentifier(identifier, jailTime)
JailPlayerByNPC

This export is used when you want to jail player by NPC

---@param targetPlayerId number
---@param netId number - networked ped id, use PedToNet(ped)

local targetPlayerId = 1
local pedId = 321321

-- The peds needs to be networked to make this -> see: modules\base\server\api\sv-jailPlayer.lua

TriggerServerEvent('rcore_prison:server:JailPlayerByNPC', targetPlayerId, PedToNet(pedId))

🔍 Player State

IsPrisoner

This export is used when you want to check if target player is in Prison

IsPlayerInCutScene

This export is used when you want know if player is cutscene (Prolog)

🖥️ Dashboard

Open dashboard

This export is used when you want to open included dashboard

👮 Community Service

rcore_prison:server:StartComs

This event is used to sent player to coms

Last updated