copy Copy chevron-down
๐งฑ Prison V2๐ Exports & UsageDynyx Prison includes a set of exports that let developers interact with the system from other scripts. These exports allow jail logic, sentence modification, community service, and UI actions to be t
๐ฅ๏ธ Server Exports
These exports should be used from server-side scripts only.
๐ AddPrisonerExternally
Jails a player and adds them to the prison system.
Copy exports[ ' dynyx_prison ' ]: AddPrisonerExternally (serverId, sentence, charges, lifer, serviceType, previousSentence, fine, officerSr) serverId (number)
Playerโs server ID.
sentence (number)
Sentence length in months.
charges (table | string)
List or string describing the charges.
lifer (boolean)
Whether the player is a lifer.
serviceType (string)
"prison" or "community_service".
previousSentence (number, optional)
Used for sentence stacking.
fine (number, optional)
Optional fine to apply.
officerSrc (number)
Server ID of the officer/player performing the arrest.
๐ ReleasePrisonerExternally
Releases a prisoner normally or marks them as escaped.
citizenid (string)
Playerโs unique citizen identifier.
jailbreak (boolean)
true if the player escaped
false if released normally.
officerSrc (number)
Server ID of the officer/player authorizing the release.
โ๏ธ ModifyPrisonerSentenceExternally
Sets a new sentence time for a prisoner.
Parameters:
citizenid (string) โ Playerโs unique identifier
newTime (number) โ New sentence time in months
๐
GetRemainingPrisonSentence
Returns the current time remaining for a prisoner.
Returns:
(number) Time remaining in months
๐งฑ GetPrisonCellData
Returns prisoner's cell data.
Returns :
number (number) โ Prisonerโs assigned cell number
coords (vector3) โ Prisonerโs cell coordinates
โ
IsActivePrisoner
This Here you go โ same format as your docs , just cleaned up with an accurate description based on the actual function logic.
โ
IsActivePrisoner
Checks if a player is currently an active prisoner .
Returns true only if the player is jailed and is not escaped and not in community service .
(boolean) true if the player is actively imprisoned
(boolean) false if the player is not jailed, has escaped, or is in community service
IsPlayerJailed(citizenid)
IsPlayerCommunityService(citizenid)
IsPlayerEscaped(citizenid)
โ
IsPlayerJailed
Checks if a player is currently serving a prison sentence.
Returns:
(boolean) true if jailed, false if not
๐ ๏ธ IsPlayerCommunityService
Checks if a player is currently serving community service.
Returns:
(boolean) true if serving community service, false if not
๐จ IsPlayerEscaped
Checks if a player has escaped from prison.
Returns:
(boolean) true if escaped, false if not
๐งโ๐ป Client Exports
These can be used from client-side scripts.
๐ฅ SendPlayerToInfirmary
Sends the player to a random infirmary bed, plays the healing sequence, and optionally revives the player.
Parameters
chargePlayer (boolean)
true โ Charges the player for treatment (if enabled in config)
false โ Free treatment (recommended for death/respawn systems)
Primarily used by ambulance or respawn systems to send incarcerated players who die to the prison infirmary.
๐ OpenPrisonManageUI
Opens the prison staff UI to view or manage prisoners.
Requires the player to have a valid staff job.
๐จ OpenPrisonJobsUI
Opens the inmate job selection UI.
๐จ OpenCorrectionsTabletUI
Opens the correctional job tablet UI.
๐ก Tips
You can use these in custom commands, MDTs, police scripts, admin menus, or integrated job systems.
All server-side exports use live data โ no need to restart the script after changes.