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.
🪑 LoadDecorForPrisoner
Loads and spawns a prisoner’s saved cell decorations for their assigned cell.
Sets the prisoner as active for decor syncing, clears any existing net data, pulls their saved decor from storage, and spawns each prop into the correct cell. If a decor item is marked as storage, it will also generate/assign a stashId for ownership tracking.
🧹 ClearPrisonerCellProps
Clears a prisoner’s active cell props and stops decor syncing for that prisoner.
local cleared = exports['dynyx_prison']:ClearPrisonerCellProps(citizenKey)
Removes all synced decor/net data for the given citizen key and unregisters them as an active prisoner for cell decoration.
Returns:
(boolean)true if cleared successfully
(boolean)false if citizenKey is missing/invalid
💡 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.