Society
Society Info & Settings
When players purchase chips from the Cashier, the money spent is deposited into a shared society account. Conversely, when players trade in their chips for money, the funds are drawn from this account. This setup adds a realistic economic element to your casino.
esx_society, esx_addonaccount
set
SocietyFrameworkto'esx_addonaccount'in casino's config.luainsert
'society_casino'row in the MYSQL tables:addon_accountandaddon_account_data
INSERT INTO `addon_account` (`name`, `label`, `shared`) VALUES ('society_casino', 'society_casino', 1);
INSERT INTO `addon_account_data` (`account_name`, `money`, `owner`) VALUES ('society_casino', 0, NULL);qb-management, qb-bossmenu
install the "casino" job in your /shared/jobs.lua
set
SocietyNameto'casino', andSocietyFrameworkto'qb-management'in casino's config.luainsert
'casino'row in the MYSQL table:management_funds(type boss)
qb-banking 2.0 and higher
install the "casino" job in your /shared/jobs.lua
set
SocietyNameto'casino'andSocietyFrameworkto'qb-banking'in casino's config.luainsert
'casino'row in the MYSQL table:bank_accounts(type job)
renewed-banking
set
SocietyFrameworktoRenewed-Bankingin casino's config.luainsert
'society_casino'in the MYSQL table:bank_accounts_new
okokbanking
insert your society name in the MYSQL table:
okokbanking_societiesif not using addonaccount.insert your society name in Config.Societies list in okokbanking's config file
710-management
create your society in 710-management menu, and make sure it's installed in the MYSQL table:
management_accountsset
SocietyFrameworkto710-Managementin casino's config.lua
custom society resource
If you're using a custom framework/resource, you can manage the casino funds with your own society resource. Modify these three functions in /server/main/society.lua:
1. To deduct money from the society fund:
function RemoveMoneyFromSociety(money)
-- Add your own method to manage society money here
end2. To add money to the society fund:
function GiveMoneyToSociety(money)
-- Add your own method to manage society money here
end3. To retrieve money from the society fund:
function GetMoneyFromSociety()
-- Add your own method to manage society money here
return 10000
endTo edit the society settings, look into file config.lua
Enabling Society Account
EnableSociety = trueWhether you want to use a society account for all Casino payouts/deposits. When disabled, all payouts are directly sent to players without affecting any bank/society accounts.
Limiting Payouts (Empty Society Account)
SocietyEmptyWithdrawPercentage = 35When your society account is empty, you can reduce players payouts. Example code above is a percentage, how much money players get from their chips-to-money transaction.

Disabling Payouts (Empty Society Account)
SocietyEmptyWithdrawPercentage = 0To halt all Casino payouts (Trade In Chips at the Cashier) when your society account is empty , use the example setting above.

Last updated
Was this helpful?