Skip to main content
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'
  • oxmysql
  • sh-policemdt installed and started
  • VORP (vorp_core) or RSG (rsg-core / rsg-core-main)
  • Optional: sh-telegram for 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

1

Install the resource

Place the folder in your server resources directory and keep the folder name as sh-courthouse.
2

Check dependencies

Make sure oxmysql, your framework, and sh-policemdt are installed. Enable sh-telegram only if you want courthouse notices delivered through telegrams.
3

Add ensure order

Start the framework, oxmysql, sh-policemdt, optional sh-telegram, then sh-courthouse.
server.cfg
4

Configure framework and roles

Edit config.lua, then map your server job names or job types to courthouse roles in Config.Access.
5

Configure Fine Desk

Set the Fine Desk NPC locations and make sure sh-policemdt is not also spawning a duplicate fine payment NPC.
6

Start and test

Start the resource, open /courthouse on a judge character, review the counters, and test a fine payment through the Fine Desk NPC.
You do not need to import a separate courthouse SQL file. On resource start, sh-courthouse creates its courthouse tables automatically with CREATE TABLE IF NOT EXISTS. The MDT tables still come from sh-policemdt.

Framework Support

Set the framework in config.lua:
config.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.lua
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:
config.lua
Staff users get the courthouse ledger interface. Citizens can use /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:
config.lua
Job names are normalized to lowercase. Make sure your configured job names match the framework job names exactly after lowercasing.

Main Workflows

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.
The Fine Desk tab and NPC load unpaid fines from 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.
Citizens and legal counsel can dispute a fine. Judges decide disputes as upheld, reduced, or dismissed. Reduced and dismissed outcomes call MDT bridge exports to update or void the MDT fine.
Citizens, judges, clerks, and legal counsel can file small claims against an MDT person profile. Judges can deny a claim or approve it and immediately schedule a hearing.
Citizens and legal counsel can file appeals against jail records from sh_mdt_jail_records. Judges can approve or deny appeals. Approved appeals adjust the active jail sentence through the MDT bridge.
Judges and clerks can schedule hearings, update hearing status, and issue summons. Summons can target all involved parties, plaintiff, defendant, a participant role, or a specific involved person ID.
Staff can open case details, view participants, notes, hearings, and timeline entries. Judges and clerks manage case phases and participants. Judges record rulings. Judges, clerks, lawyers, prosecutors, and defenders can add docket entries.

Fine Desk NPC

Configure the Fine Desk NPC in config.lua:
config.lua
The NPC only becomes available when Config.PayFineNPC.Enabled = true and the MDT bridge reports that courthouse fine desk handling is enabled.
If sh-policemdt also has a fine payment NPC enabled, disable the MDT NPC to avoid duplicate fine desk prompts. The comment in this resource references Config.PayFinesNPC / Config.PayFineNPC depending on the MDT version, so check your sh-policemdt config for the exact key.

sh-telegram Integration

Enable telegram delivery in config.lua:
config.lua
When enabled and 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:
config.lua

Database Tables

On resource start, sh-courthouse creates these courthouse tables if they do not exist: The resource also reads from 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: If the courthouse UI opens but actions fail with bridge errors, restart sh-policemdt first, then restart sh-courthouse.

Troubleshooting

Confirm the folder is named exactly sh-courthouse.
Check 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.
Confirm 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.
Confirm sh-policemdt is running and includes the courthouse bridge exports expected by this resource.
Confirm involved parties are attached to the case with MDT person IDs. For telegram delivery, confirm Config.SHTelegram = true, sh-telegram is started, and users have telegram records.