> ## Documentation Index
> Fetch the complete documentation index at: https://lationscripts.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Banking - Installation

> Step by step instructions to install this resource

<Steps>
  <Step title="Install (or update) dependencies" stepNumber={1}>
    <Warning>
      Verify all dependencies below are started *before* this script in your `server.cfg`.
    </Warning>

    <Columns cols={2}>
      <Card title="oxmysql" icon="arrow-up-right-from-square" href="https://github.com/CommunityOx/oxmysql/releases/latest">
        Download oxmysql
      </Card>

      <Card title="ox_lib" icon="arrow-up-right-from-square" href="https://github.com/CommunityOx/ox_lib/releases/latest">
        Download ox\_lib
      </Card>
    </Columns>
  </Step>

  <Step title="Remove the bank you are replacing">
    <Warning>
      Stopping it is not enough. Delete it from your resources folder, or rename the folder, so that nobody can start it again beside this one.
    </Warning>

    This resource answers the exports of `Renewed-Banking`, `qb-banking`, `qb-management` and `okokBanking`, so the scripts that used them keep working. Two resources cannot provide the same name, so the one you are replacing has to go.

    | Framework | Remove                              |
    | --------- | ----------------------------------- |
    | ESX       | your bank UI, usually `esx_banking` |
    | QBCore    | `qb-banking`                        |
    | Qbox      | `Renewed-Banking`                   |

    On any framework, remove `okokBanking` if you run it.
  </Step>

  <Step title="Create a new subfolder">
    <Info>
      This is an optional step, but is *highly recommended*.
    </Info>

    If you haven't already, create a new subfolder named `[lation]` in your server's root resources directory. Unzip (*extract*) this script into the newly created `[lation]` subfolder.
  </Step>

  <Step title="Add ACE permissions">
    Everything is configured from the in-game admin panel, which is gated behind an ACE permission. Open your `server.cfg` and add:

    ```text theme={null}
    add_ace group.admin lation_banking.admin allow
    ```

    <Warning>
      If you are on the Qbox framework, the recommended place to paste the above permission is inside the `permissions.cfg` file instead of `server.cfg`.
    </Warning>
  </Step>

  <Step title="Update server.cfg & perform a full restart">
    Start this resource after your framework, `oxmysql` and `ox_lib`, and before every script that uses society money.

    ```cfg theme={null}
    ensure lation_ui         # optional
    ensure ox_lib
    ensure oxmysql
    ensure qbx_core          # your framework core
    ensure lation_interact   # optional
    ensure lation_banking
    ensure [standalone]      # shops, phones, boss menus, job scripts
    ```

    Finally, perform a full server restart. Failure to perform a full restart after installation will cause errors.
  </Step>
</Steps>

<Note>
  Once completed, use the command `/bankadmin` in-game to get started! There is no config file: tables are created and defaults seeded on first start, so the resource works before you change anything.
</Note>

<Danger>
  Upon completion, do not delete any `.sql` files inside the resource or you will experience errors.
</Danger>
