> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_casino/society.md).

# Society

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

1. set `SocietyFramework` to `'esx_addonaccount'` in casino's config.lua
2. insert `'society_casino'` row in the MYSQL tables: `addon_account`and `addon_account_data`

```sql
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

1. install the "casino" job in your /shared/jobs.lua
2. set `SocietyName` to `'casino'`**,** and `SocietyFramework` to `'qb-management'` in casino's config.lua
3. insert `'casino'` row in the MYSQL table: `management_funds` (type boss)

### qb-banking 2.0 and higher

1. install the "casino" job in your /shared/jobs.lua
2. set `SocietyName` to `'casino'` and `SocietyFramework` to `'qb-banking'` in casino's config.lua
3. insert `'casino'` row in the MYSQL table: `bank_accounts` (type job)

### renewed-banking

1. set `SocietyFramework` to `Renewed-Banking` in casino's config.lua
2. insert `'society_casino'` in the MYSQL table: `bank_accounts_new`

### okokbanking

1. insert your society name in the MYSQL table: `okokbanking_societies` if not using addonaccount.
2. insert your society name in Config.Societies list in okokbanking's config file

### 710-management

1. create your society in 710-management menu, and make sure it's installed in the MYSQL table: `management_accounts`
2. set `SocietyFramework` to `710-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:

```lua
function RemoveMoneyFromSociety(money)
    -- Add your own method to manage society money here
end
```

#### 2. To add money to the society fund:

```lua
function GiveMoneyToSociety(money)
    -- Add your own method to manage society money here
end
```

#### 3. To retrieve money from the society fund:

```lua
function GetMoneyFromSociety()
    -- Add your own method to manage society money here
    return 10000
end
```

To edit the society settings, look into file **config.lua**

### **Enabling Society Account**

```
EnableSociety = true
```

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)

```
SocietyEmptyWithdrawPercentage = 35
```

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.

![](/files/Me6K52mEGwrCXl9WS7ei)

### Disabling Payouts (Empty Society Account)

```
SocietyEmptyWithdrawPercentage = 0
```

To halt all Casino payouts (Trade In Chips at the Cashier) when your society account is empty , use the example setting above.

![](/files/blhtzFTQHnPQIhL4cSoH)
