๐Exports & Usage
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 t
๐ฅ๏ธ 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) โ Playerโs server IDsentence(number) โ Sentence length in monthscharges(table/string) โ List or string of chargeslifer(boolean) โ Whether the player is a liferserviceType(string) โ"prison"or"community_service"previousSentence(number, optional) โ For sentence stackingfine(number, optional) โ Optional fine to apply
๐ ReleasePrisonerExternally Releases a prisoner or marks them as escaped.
exports['dynyx_prison']:ReleasePrisonerExternally(citizenid, jailbreak)Parameters:
citizenid(string) โ Playerโs unique identifierjailbreak(boolean) โtrueif escaped,falseif released normally
โ๏ธ ModifyPrisonerSentenceExternally Sets a new sentence time for a prisoner.
Parameters:
citizenid(string) โ Playerโs unique identifiernewTime(number) โ New sentence time in months
๐ GetRemainingPrisonSentence Returns the current time remaining for a prisoner.
Returns:
(number) Time remaining in months
0if prisoner not found
โ IsPlayerJailed Checks if a player is currently serving a prison sentence.
Returns:
(boolean)
trueif jailed,falseif not
๐ ๏ธ IsPlayerCommunityService Checks if a player is currently serving community service.
Returns:
(boolean)
trueif serving community service,falseif not
๐จ IsPlayerEscaped (new) Checks if a player has escaped from prison.
Returns:
(boolean)
trueif escaped,falseif not
๐งโ๐ป Client Exports
These can be used from client-side scripts.
๐ 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.
๐ก 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