Documentation Index
Fetch the complete documentation index at: https://docs.landminentester.de/llms.txt
Use this file to discover all available pages before exploring further.
Brew Society: Comprehensive Society Management
Brew Society is the most advanced and flexible UI based society system on the market.
Features
- Create and manage societies with ease
- Permissions for each grade
- Transaction history in the society menu where bills and loans also getting displayed
- Storage can be upgraded with building stages
- Create societies with just one command
- Place a wardrobe and storage as sperate points
- Server owner can enable opening blips so that society blips can be toggled between red and green
- Paycheck system that can set to daily or every x minutes which the owner of the company can set
- Add paychecks that doesnt get removed from a society ledger instead gets generated
- Paychecks dont get added to your inventory, instead you go to paycheck stations and collect your paycheck there
- Fully UI based
- Note system in society menu
- Billing system
- Aritcle management system that will later can be used to write bills in a sperate addon script
- Block that users that are not unemployed cant be hired until they quit their old job
- Same database structure to still use syn shops with company management - This could get changed in the future due to updates of syn_shops
Create a new society
Easiest method:
Step 1: use open creator command
This opens a custom ui where you can create the society, with ranks and permissions and all other settings.
You need to be whitelisted in the steamid list!
Step 1: create the society
This adds the society to the database and local storage.
/createsociety [job] [useBlip] [blip] [maxSize] [useDirect] [label]
job: the job id of the society
useBlip: true or false if the blip should be displayed
blip: the blip texture hashname of the society check
—> For the Texture Hashnames check: https://github.com/femga/rdr3_discoveries/tree/master/useful_info_from_rpfs/textures/blips !
maxSize: the max size of the storage of the society to what it can be upgraded
useDirect: true or false if the direct payment should be used
label: the label of the society can be multiple words
Step 2: add ranks to the society
This creates 4 ranks 0 to 3 and rank 3 is the owner of the society will all permissions. Those can be edited later.
job: the job id of the society
Step 3: Optional - Add more ranks to the society
if you want to add more ranks you can do so by using the command, when there are already ranks created, it only creates one new rank without any permissions on rank 4:
Give yourself rank 3 after adding all ranks you want and edit the permissions so that 3 is maybe not anymore the boss and for example rank 4 is the new boss.
job: the job id of the society
Translation
To translate the society script you need to edit the lang file in the language folder, the index.html in the html folder and also the translation.js in the html folder.
Commands
All commands are gated by Config.CommandSystem feature flags (and additional feature flags like Config.UseSynShops, Config.OpeningBlips, Config.UseBellStation, or Config.Debug). This document lists each command, its purpose, arguments, permissions, and notes.
Notation:
<int> integer argument
<string> string argument
- Optional arguments shown in brackets
[arg]
- Boss-only refers to society rank with
isBoss = true
/createsociety <job> <useBlip> <blipSprite> <maxStorageSize> <useDirectPayment> <placementRange> <label...>
Config flag: Config.CommandSystem.createSociety.enabled
-- Creates a new society at the player's current coordinates.
-- Args (all required):
-- job (string) -- internal job name
-- useBlip ("true"|"false") -- enable blip
-- blipSprite (number) -- blip sprite id
-- maxStorageSize (number) -- maximum storage size
-- useDirectPayment ("true"|"false") -- direct payment mode
-- placementRange (number) -- allowed distance for placing storage/wardrobe
-- label (string...) -- society label (remaining args concatenated)
-- Example:
-- /createsociety brewery true 189 500 true 25 Brewery Company
Creates the base ledger entry and initializes local society data. All arguments must be present.
/addrank <job>
Config flag: Config.CommandSystem.addRank.enabled
-- Adds a new rank to the specified society (default template) or initializes defaults if first time.
-- Arg: job (string)
-- Example: /addrank brewery
Appends a new rank with default permissions; creates starter ranks if society did not have any.
/toggleblip
Config flags: Config.OpeningBlips AND Config.CommandSystem.toggleblip.enabled
Permission: Player must have toggleBlip permission in current job rank.
-- Toggles company blip color between DARK_RED and LIGHT_GREEN for your society.
Switches color of the active society blip, then updates clients.
/placestorage
Config flag: Config.CommandSystem.placeStorage.enabled
Permission: Boss-only (isBoss = true) within placementRange radius of boss coordinates.
-- Places the society storage access point at your current position (if within placementRange).
Stores encoded coordinates in ledger and sends update.
/placewardrobe
Config flag: Config.CommandSystem.placeWardrobe.enabled
Permission: Boss-only; same distance/range rules as /placestorage.
-- Places the society wardrobe access point at your current position.
Stores encoded coordinates and distributes data.
/writebill
Config flag: Config.CommandSystem.writebill.enabled
Permission: Must have writeBills permission in current society.
Interactive flow: opens bill creator, then target player accepts/refuses.
-- Initiates bill creation flow via UI callbacks.
Generates a bill if target accepts, writes to DB and ledger when paid later.
/duty
Config flag: Config.CommandSystem.duty.enabled
-- Toggles your duty status (on/off). No arguments.
Flips duty state; broadcasts feedback via notifications.
/hireplayer <targetId>
Config flag: Config.CommandSystem.hirePlayer.enabled
Permission: Must have hirePlayer permission.
Additional logic: Can be blocked if target already has a job (Config.BlockHiringPlayerWithJob).
-- Sends a hire offer to target player. On accept, assigns them your job grade 0.
-- Arg: targetId (int)
-- Example: /hireplayer 27
Updates DB, fires job change event, and sends success/refusal notifications.
/setjob <targetId> <job> <jobgrade>
Config flag: Config.CommandSystem.setJob.enabled
Admin/privileged usage implied (registered with restricted flag = true).
-- Force-sets job and grade for target player.
-- Args:
-- targetId (int)
-- job (string)
-- jobgrade (int)
-- Example: /setjob 12 brewer 2
Directly updates character job/grade in DB and triggers change event.
/opencreator
Config flag: Config.CommandSystem.openCreator.enabled
Access: Steam identifier must be in Config.AccessSteamIdsForCreator.
-- Opens the society creation UI (NUI) for authorized users.
Client UI is opened if access is validated.
/listcalls
Config flags: Config.UseBellStation AND Config.CommandSystem.listCalls.enabled
-- Opens UI listing active bell station calls.
Triggers client event to open calls list interface.
/checkdutystatus <targetId>
Config flag: Config.CommandSystem.checkDutyStatus.enabled
Restricted (registered with admin flag = true).
-- Checks a player's duty status and shows a notification.
-- Arg: targetId (int)
-- Example: /checkdutystatus 42
Uses exported duty logic; returns true/false in notification.
Debug-Only Commands (require Config.Debug = true)
Provided for development/testing.
-- Resets (unlocks) the menu lock for specified source.
/checkJobSalary <job>
-- Prints salaries for all ranks of the job.
/setLoanForJob <job> <jobgrade> <loan>
-- Sets salary/loan for a specific job grade.
/initScriptbyPlayers
-- Broadcasts client initialization event to all players.
Permission Summary
Permissions checked against current player’s society rank:
toggleBlip for /toggleblip
isBoss (rank flag) for placement commands
writeBills for /writebill
hirePlayer for /hireplayer
Other commands rely on config flags or admin registration (restricted = true).
Notes
- Society range placement uses
placementRange from society ledger and compares against boss coordinates.
- Bill creation uses a confirmation modal
- Hiring respects blocking config to prevent hiring players already employed.
- Creator UI access uses SteamID whitelist.
- Debug commands should not be exposed in production.
Exports
generateJobRanks(society)
--@info Server-side
--@param society table -- { job = string, grades = { { salary=number, isBoss=boolean }, ... } }
exports.brew_society:generateJobRanks({
job = "police",
grades = {
{ salary = 0, isBoss = false },
{ salary = 2, isBoss = false },
{ salary = 5, isBoss = true },
}
}) -- generates the job ranks in database for the specified job
Generates the job ranks for the specified job in the database.
insertIntoSocietyShops(society, slots, name, coords, rank, blip)
This function is only available when you use syn_shops for VORP and enable the config option Config.UseSynShops.
--@info Server-side
--@param society string -- The society name to create the shop for
--@param slots int -- The number of slots the shop will have
--@param name string -- The name of the shop that will be displayed
--@param coords string -- The coordinates of the shop as {x, y, z}
--@param rank int -- The rank to manage the shop
--@param blip string -- "true" or "false" if the blip should be displayed
exports.brew_society:insertIntoSocietyShops(society, slots, name, coords, rank, blip)
Inserts a new shop into the society_shops table in the database.
insertIntoSociety(job, ledger, storageLimit, storageCoords, wardrobeCoords, daily)
--@info Server-side
--@param job string -- Society/job name
--@param ledger number -- Starting ledger amount
--@param storageLimit number -- Initial storage limit
--@param storageCoords string|json -- Storage access coords (JSON string)
--@param wardrobeCoords string|json -- Wardrobe access coords (JSON string)
--@param daily number -- Daily payout toggle (0/1)
exports.brew_society:insertIntoSociety("police", 0, 100, json.encode({x=1,y=2,z=3}), json.encode({x=4,y=5,z=6}), 0)
Creates a base entry in society_ledger and in-memory state.
setLoanForJob(job, jobgrade, loan)
--@info Server-side
--@param job string -- Society/job name
--@param jobgrade integer -- Grade index
--@param loan number -- Salary/loan amount
exports.brew_society:setLoanForJob("police", 2, 10)
Updates the salary for the given job grade.
getUserDuty(source)
--@info Server-side
--@param source integer -- The source ID of the user
--@return boolean -- true if on duty, false otherwise (defaults to false)
exports.brew_society:getUserDuty(source)
-- alias (case variant):
exports.brew_society:GetUserDuty(source)
Returns the current duty status for a player; defaults to false if unknown.
setUserDutyStatus(source, duty)
--@info Server-side
--@param source integer -- The source ID of the user
--@param duty boolean -- New duty state
exports.brew_society:setUserDutyStatus(source, true)
-- alias (case variant):
exports.brew_society:SetUserDutyStatus(source, true)
Sets a player’s duty status in memory.
--@info Server-side
--@param society string -- Society name
--@return table|boolean -- { lock = boolean, _source = number|nil } or false
exports.brew_society:GetMenuLock("police")
Gets the current menu lock state for a society, or false if none.
--@info Server-side
--@param source integer -- Player source
exports.brew_society:ResetMenuLockServer(source)
Releases the menu lock if this player currently holds it.
GenerateSocietySettings()
--@info Server-side
--@return table -- Societies data keyed by job name
exports.brew_society:GenerateSocietySettings()
Builds and returns a snapshot of all societies (label, limits, coords, blips).
CreateBill(sender, receiver, amount, description)
--@info Server-side
--@param sender integer -- Sender source
--@param receiver integer -- Receiver source
--@param amount number -- Bill amount
--@param description string -- Description
exports.brew_society:CreateBill(sender, receiver, 100, "Service fee")
Creates a bill if players are within range; writes to DB and updates state.
AddRank(source, society, gradeSettings?)
--@info Server-side
--@param source integer -- Caller source (for feedback)
--@param society string -- Society name
--@param gradeSettings table?|nil -- Optional complete rank definition
exports.brew_society:AddRank(source, "police", { job="police", jobgrade=4, jobLabel="Sergeant", salary=5, isBoss=false })
Adds a new rank. If omitted, a default rank is appended.
CreateSociety(...)
--@info Server-side
-- Note: Export exists in this build, but no implementation is provided.
-- Prefer the NUI/callback path `brew_society:Callback:createSocietyFromNui`.
Placeholder export in this version.
AddToLedger(job, money)
--@info Server-side
--@param job string -- Society/job name
--@param money number -- Amount to add (negative subtracts)
exports.brew_society:AddToLedger("police", -500)
Adjusts the society ledger (DB and memory); negative values subtract.
GetLedeger(job)
--@info Server-side
--@param job string -- Society/job name
--@return number -- Current ledger balance (0 if missing)
exports.brew_society:GetLedeger("police")
Returns the current ledger amount.
AddTransaction(job, amount, description)
--@info Server-side
--@param job string -- Society/job name
--@param amount number -- Transaction amount (negative or positive)
--@param description string -- Description text
--@return boolean -- true on success
exports.brew_society:AddTransaction("police", -100, "Storage upgrade fee")
Inserts a transaction row and updates in-memory history. Shows the entry in the society menu as transaction
getPlayerDutyStatus()
--@info Client-side
-- Note: Get duty status of local player that triggers it.
exports.brew_society:getPlayerDutyStatus()
Client helper uses a callback to receive the duty status of the calling player