Skip to main content
sh-society is a RedM business and job society management resource for VORP and RSG servers. It gives each configured job a society panel for employees, ranks, permissions, payroll, ledger money, invoices, storage, storefronts, advertisements, map blips, themes, and optional Discord webhook settings. Staff can manage all societies from an admin panel, while players can use public job center hiring and bill payment windows.

Requirements

Installation

1

Place the resource

Copy the folder into your server resources directory and keep the folder name as sh-society.
2

Start dependencies first

Ensure oxmysql, your framework, and your inventory resource before sh-society.
For RSG:
3

Install the database tables

Import sql/install.sql into your database before first use. The script also creates and migrates its tables at startup when oxmysql is ready, but importing the SQL file first makes setup failures easier to spot.
4

Configure the resource

Edit config.lua for framework mode, locale, interaction mode, commands, admin access, payroll, storage, stores, job center, Discord webhooks, and theme presets. Edit crafting_config.lua if you want society crafting.
5

Grant admin access

If ACE admin checks are enabled, grant the configured ACE permission:
6

Restart and create societies

Restart the resource, open /socadmin as an authorized admin, create a society for each framework job, then test /society with a character assigned to that job.
Society job names must match your framework job names exactly. A player can only open the normal society panel when their current job has a matching society row.

Framework Support

auto checks started resources in this order: The bridge handles character IDs, player names, groups, job changes, money, inventory items, stash access, and item transfers for supported framework and inventory combinations.

Commands

Core Configuration

Interaction modes: When using target mode:

Admin Access

Admins can create, edit, list, and delete societies. Admins also bypass society-level rank permission checks.

Society Settings

Each society stores:

Rank Permissions

New societies receive default ranks and permission rows automatically. Rank indexes greater than or equal to boss_grade are treated as boss ranks and get all permissions. Lower ranks use these individual permission flags:

Features

Staff with admin access can create, update, and delete societies. A society links a framework job to a business label, public job center state, entry grade, boss grade, payroll interval, tax percent, theme, blips, storage data, and webhook data.
Bosses can hire, fire, and change ranks from the society panel. Hiring sends a target player an offer that expires after Config.Society.HireOfferTimeoutSeconds. The target must be within Config.Society.HireDistance. Firing assigns Config.Society.UnemployedJob at grade 0.
Boss ranks are determined by boss_grade, while lower ranks can receive specific permissions. Rank names, salaries, permission flags, and rank count are stored per society.
Each society has its own ledger balance, tax reserve balance, and transaction history. Deposits marked as income reserve tax_percent into tax_balance and add the net amount to the spendable balance. Withdrawals and payroll come out of the spendable balance.
Online society employees are paid by rank salary on each society’s interval. Payroll withdraws from the society ledger first; if the ledger is short, that employee’s payout is skipped. Configured public jobs from the job center are paid directly by the server and do not require a society ledger.
Employees with employee.invoice.create can bill nearby players. Invoice targets are limited to nearby online characters and cannot be the issuer. Players can open /bills or use /bills pay <invoiceId>. Paid invoices deposit income into the issuing society ledger.
Bosses with boss.storage.manage can place a society storage marker. Employees with employee.storage can open the stash only while near the configured marker. Storage uses stash ids in the format society_stash_<society_id>.
Bosses can create in-world storefronts, place markers, pick props from Config.Store.PropList, add stock from inventory, set prices, set categories, and configure buy orders for player sell-back. Stores validate distance server-side before purchases or sales.
Bosses can create advertisement boards with title, description, image URL, enabled state, prop model, heading, and placed coordinates. Advertisement props stream to nearby players and can be viewed in-world.
Societies support public/job blips stored in sh_society_blips. Bosses can place, label, enable, disable, and delete blips from the panel. Clients refresh job blips periodically.
The job center NPC displays configured public jobs and societies marked public. Public job switching uses a persistent per-character cooldown in sh_society_job_cooldowns. Config-only public jobs remove existing society employee records before applying the new framework job.
Society crafting is configured in crafting_config.lua and is disabled by default. Enable Config.Crafting.Enabled, define recipes in Config.CraftingRecipes[jobName], then place the station from the society UI. Only jobs with recipes can place or use a crafting station.
Global webhooks can route event types to separate Discord channels. Bosses can optionally configure a society-specific webhook from the UI when Config.IngameWebhook.Enabled = true. Audit rows are also written to sh_society_audit.

Payroll Configuration

Society payroll uses each rank’s salary from sh_society_ranks. Public job payroll uses salary values from Config.JobCenter.DefaultPublicJobs when no real society exists for that job name.

Billing Configuration

Invoice payment removes Config.Billing.Currency from the payer, marks the invoice paid, and deposits the amount into the society ledger as income.

Job Center Configuration

Public job center entries come from two sources:

Storage Configuration

Storage location, label, slots, and weight are stored per society in storage_json.

Store Configuration

Store rows are stored in sh_society_stores. Store catalogs and buy-order catalogs are JSON columns, so each store can maintain its own stock, prices, categories, and buy-back rules.

Crafting Configuration

Crafting is in crafting_config.lua.
Example recipe:
Supported recipe aliases include: Set consume = false on an ingredient when the item should be required but not removed.

Discord Webhooks

Webhook URLs must use Discord webhook URL formats such as https://discord.com/api/webhooks/.... The script rate-limits webhook sending per bucket to avoid burst spam.

Server Exports

Use these exports from other server resources:
Example:

Database Tables

Deleting a society from the admin panel also deletes that society’s ranks, rank permissions, employees, ledger, ledger transactions, blips, stores, and adverts. Invoices and audit rows are not deleted by the society delete function.

Security Notes

The NUI API router validates action permissions, applies a per-source per-action cooldown, and logs denied actions to audit/security paths. Store, storage, crafting, advert, and invoice actions also perform server-side distance and payload checks.

Troubleshooting