sh-courthouse is a courthouse companion resource for sh-policemdt. It adds a dedicated courthouse NUI and Fine Desk NPC for legal roleplay workflows: warrant review, citizen fine payments, fine disputes, jail appeals, small claims, court hearings, summons delivery, case participants, docket entries, and judicial rulings.
The resource supports VORP and RSG framework identity/job detection, stores courthouse case data in MySQL, and uses sh-policemdt as the source of truth for MDT people, fines, jail records, and approved warrants.
Requirements
- RedM server using
fx_version 'cerulean' oxmysqlsh-policemdtinstalled and started- VORP (
vorp_core) or RSG (rsg-core/rsg-core-main) - Optional:
sh-telegramfor in-character court notices, summons, and receipts
sh-policemdt is a hard dependency. sh-courthouse reads MDT people/fines/jail records and calls MDT bridge exports for fine payments, fine changes, jail sentence changes, and approved warrant creation.Installation
Install the resource
sh-courthouse.Check dependencies
oxmysql, your framework, and sh-policemdt are installed. Enable sh-telegram only if you want courthouse notices delivered through telegrams.Add ensure order
oxmysql, sh-policemdt, optional sh-telegram, then sh-courthouse.Configure framework and roles
config.lua, then map your server job names or job types to courthouse roles in Config.Access.Configure Fine Desk
sh-policemdt is not also spawning a duplicate fine payment NPC.Start and test
/courthouse on a judge character, review the counters, and test a fine payment through the Fine Desk NPC.Framework Support
Set the framework inconfig.lua:
auto checks for vorp_core, rsg-core, or rsg-core-main. You can force vorp or rsg if your server runs both or if auto detection chooses the wrong framework.
Core Config
Config.ServerYear is used when building court case numbers. For example, case prefixes include CRT, WRT, JAT, FDT, SCL, CVL, BSD, PRP, and HRG.
Config.SHHousing and Config.SHLicenses are present for future integrations. They do not currently add property dispute or license suspension behavior by themselves.Opening the Courthouse
The courthouse NUI opens with/courthouse by default:
/courthouse only when citizen actions are enabled. The Fine Desk NPC is separate and can still be used for fine payment when the courthouse Fine Desk is enabled.
Role-Based Access
sh-courthouse uses role flags instead of one grade threshold. Map your framework job names to one or more courthouse roles:
Main Workflows
Warrant Review
Warrant Review
sh-policemdt submits warrant requests through the SubmitWarrantRequestFromMDT export. Courthouse staff can view pending requests, but only judges can approve or deny them. Approved requests call back into sh-policemdt to create the actual MDT warrant.Fine Desk Payments
Fine Desk Payments
sh-policemdt. Citizens can pay one fine or pay all outstanding fines. Payment receipts can be sent through sh-telegram and logged to the FinePayments webhook.Fine Disputes
Fine Disputes
upheld, reduced, or dismissed. Reduced and dismissed outcomes call MDT bridge exports to update or void the MDT fine.Small Claims
Small Claims
Jail Appeals
Jail Appeals
sh_mdt_jail_records. Judges can approve or deny appeals. Approved appeals adjust the active jail sentence through the MDT bridge.Court Calendar & Summons
Court Calendar & Summons
Case Detail & Trials
Case Detail & Trials
Fine Desk NPC
Configure the Fine Desk NPC inconfig.lua:
Config.PayFineNPC.Enabled = true and the MDT bridge reports that courthouse fine desk handling is enabled.
sh-telegram Integration
Enable telegram delivery inconfig.lua:
sh-telegram is running, courthouse notices can be delivered as telegram notifications and persisted inbox messages. This is used for summons, fine receipts, warrant updates, dispute rulings, appeal rulings, small claim notices, and hearing updates.
If sh-telegram is disabled or unavailable, the resource falls back to courthouse notifications where supported.
Discord Webhooks
Enable Discord webhook logging per event type:Database Tables
On resource start,sh-courthouse creates these courthouse tables if they do not exist:
sh-policemdt tables such as sh_mdt_people, sh_mdt_fines, and sh_mdt_jail_records.
Integration Notes
sh-courthouse expects these bridge exports from sh-policemdt:
sh-policemdt first, then restart sh-courthouse.
Troubleshooting
The resource stops after starting
The resource stops after starting
sh-courthouse./courthouse says a staff role is required
/courthouse says a staff role is required
Config.Access for the active framework. Job names are matched against the player’s framework job name, and RSG can also use job type allowlists when configured.Fine Desk NPC does not appear
Fine Desk NPC does not appear
Config.PayFineNPC.Enabled = true, sh-policemdt is started, and MDT courthouse fine desk handling is enabled. The client polls the server every 15 seconds for Fine Desk availability.Fine payments, fine disputes, warrants, or appeals fail
Fine payments, fine disputes, warrants, or appeals fail
sh-policemdt is running and includes the courthouse bridge exports expected by this resource.Summons do not reach players
Summons do not reach players
Config.SHTelegram = true, sh-telegram is started, and users have telegram records.