# Installation

{% hint style="danger" %}
You need ***msk\_core***! - [*Download it here*](https://github.com/MSK-Scripts/msk_core)
{% endhint %}

1. Upload the `msk_banking` folder.
2. Insert ensure `msk_banking` in your `server.cfg`
3. Please configure the `config.lua` before starting the Script!
4. Add the items you configured in `config.lua` to your inventory or database
5. Restart your Server.

The SQL will be created automatically.

## es\_extended

Please go to `es_extended/server/classes/player.lua` line `~168`.\
You have to see this: `function self.setAccountMoney(accountName, money)`

Please add the following lines as you can see at the picture if it's not already added: <https://prnt.sc/qM3gulnXHqti>

```lua
TriggerEvent('esx:setAccountMoney', self.source, accountName, money)
TriggerEvent('esx:addAccountMoney', self.source, accountName, money)
TriggerEvent('esx:removeAccountMoney', self.source, accountName, money)
```

## esx\_addonaccount

Please go to `esx_addonaccount/server/main.lua`

***If you don't have a function like the following then please redownload\*\*\*\* ****`esx_addonaccount`**** \*\*\*\*from ESX Github and replace all files!!!***

{% code title="addonaccount.lua" lineNumbers="true" %}

```lua
function AddSharedAccount(society, amount)
    if type(society) ~= 'table' or not society?.name or not society?.label then return end
    -- society.name = job_name/society_name
    -- society.label = label for the job/account
    -- amount = if the shared account should start with x amount

    -- addon account:
    local account = MySQL.insert.await('INSERT INTO `addon_account` (name, label, shared) VALUES (?, ?, ?)', {
        society.name, society.label, 1
    })
    if not account then return end

    -- if addon account inserted, insert addon account data:
    local account_data = MySQL.insert.await('INSERT INTO `addon_account_data` (account_name, money) VALUES (?, ?)', {
        society.name, (amount or 0)
    })
    if not account_data then return end
	
    -- if all data inserted successfully to sql:
    SharedAccounts[society.name] = CreateAddonAccount(society.name, nil, (amount or 0))
end
```

{% endcode %}

## Jobs

If you want to use Societyaccounts, then please add all jobs to `Config.Society` so that the script works as expected :)

## Bankcard Prop

If you want to use a Bankcard Prop, we already integrated a script for that! Just download the prop and set the following config option to `true`. If you don't want to use it, set it to `false`.

```lua
Config.Animation = {
    useBankcardProp = true
}
```

You will need this: <https://forum.cfx.re/t/free-props-wallet-props-cards-and-key-car/5039912>
