📖Exports & Usage
Here’s a clean and professional GitBook-style page for your Dynyx Prison Script documentation titled:
📦 Server Exports
Dynyx 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 triggered manually or integrated into external tools such as MDTs, admin menus, or jobs.
🖥️ Server Exports
These exports should be used from server-side scripts only.
🔒 AddPrisonerExternally
Jails a player and adds them to the prison system.
exports['dynyx_prison']:AddPrisonerExternally(serverId, sentence, charges, lifer, serviceType, previousSentence, fine)
Parameters:
serverId
number
Server ID of the player
sentence
number
Sentence time (in months)
charges
string
Reason or charges for jail
lifer
bool
Is this player jailed for life?
serviceType
string
"prison"
or "community_service"
previousSentence
bool
Adds to sentence if true (for lifers)
fine
number
Fine amount to apply
🔓 ReleasePrisonerExternally
Releases a prisoner or marks them as escaped.
exports['dynyx_prison']:ReleasePrisonerExternally(citizenid, jailbreak)
Parameters:
citizenid
string
Citizen ID of the prisoner
jailbreak
bool
Set true
to flag as escaped
✏️ ModifyPrisonerSentenceExternally
Sets a new sentence time for a prisoner.
exports['dynyx_prison']:ModifyPrisonerSentenceExternally(citizenid, newTime)
Parameters:
citizenid
string
Citizen ID of the prisoner
newTime
number
New sentence time in months
📅 GetRemainingPrisonSentence
Returns the current time remaining for a prisoner.
local time = exports['dynyx_prison']:GetRemainingPrisonSentence(citizenid)
Returns:
number
: Time remaining in months0
if prisoner not found
🧑💻 Client Exports
These can be used from client-side scripts.
📋 OpenPrisonManageUI
Opens the prison staff UI to view or manage prisoners.
exports['dynyx_prison']:OpenPrisonManageUI()
Requires the player to have a valid staff job.
🔨 OpenPrisonJobsUI
Opens the inmate job selection UI.
exports['dynyx_prison']:OpenPrisonJobsUI()
💡 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.
Last updated