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

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.

/societyaddrank [job]

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.

/societyaddrank [job]

job: the job id of the society

Exports

generateJobRanks(jobname)

---@info Server-side
---@param jobname string The name of the job
exports.brew_society:generateJobRanks(jobname) -- 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 used and available when you have syn_shops for vorp in use and enabled the config option UseSyncShops.

--@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.

getUserDuty(source)

--@info Server-side
--@param source integer -- The source ID of the user
--@return boolean -- true if the user is on duty, false otherwise
exports.brew_society:getUserDuty(source)

Returns true if the user is on duty, false otherwise and if an source doesnt exist it will return nil.

setUserDutyStatus(source, status)

--@info Server-side
--@param source integer -- The source ID of the user
--@param status boolean -- true or false to set the duty status
exports.brew_society:setUserDutyStatus(source, status)

Sets the duty status for the user.

setLoanForJob(job, jobgrade,loan)

--@info Server-side
--@param job string -- The name of the job
--@param jobgrade int -- The grade of the job
--@param loan double -- The loan amount
exports.brew_society:setLoanForJob(job, jobgrade,loan)

Sets the loan for a grade of a job.

getLoanForJob(job, jobgrade)

--@info Server-side
--@param job string -- The name of the job
--@param jobgrade int -- The grade of the job
--@return double -- The loan amount or nil if the job or jobgrade doesnt exist
exports.brew_society:getLoanForJob(job, jobgrade)

Returns the loan for a grade of a job.