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
SocietyFramework
to'esx_addonaccount'
in casino's config.luainsert
'society_casino'
row in the MYSQL tables:addon_account
andaddon_account_data
qb-management, qb-bossmenu
install the "casino" job in your /shared/jobs.lua
set
SocietyName
to'casino'
, andSocietyFramework
to'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
SocietyName
to'casino'
andSocietyFramework
to'qb-banking'
in casino's config.luainsert
'casino'
row in the MYSQL table:bank_accounts
(type job)
renewed-banking
set
SocietyFramework
toRenewed-Banking
in casino's config.luainsert
'society_casino'
in the MYSQL table:bank_accounts_new
okokbanking
insert your society name in the MYSQL table:
okokbanking_societies
if 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_accounts
set
SocietyFramework
to710-Management
in 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:
2. To add money to the society fund:
3. To retrieve money from the society fund:
To edit the society settings, look into file config.lua
Enabling Society Account
Whether 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)
When 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)
To halt all Casino payouts (Trade In Chips at the Cashier) when your society account is empty , use the example setting above.
Last updated