> For the complete documentation index, see [llms.txt](https://docs.menanak47.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.menanak47.com/multi-framework/ak47_banking/exports/client.md).

# Client

​These functions are client-side and can be accessed using the standard FiveM export syntax. They are highly useful for integrating `ak47_banking` into third-party interaction scripts, such as `ox_target`, `qb-target`, or custom radial menus.

#### OpenNearestAtm

Attempts to open the ATM interface for the player. It automatically communicates with the server to check if the player has a valid ATM card in their inventory and if it can be used. If successful, it opens the UI and caches the active card data for the transaction.

| **Parameter** | **Type** | **Description**                              |
| ------------- | -------- | -------------------------------------------- |
| *(None)*      | `N/A`    | This export does not require any parameters. |

Returns: `boolean` (Returns `true` if the ATM UI successfully opened, `false` if they lack a card or the interaction failed)

```lua
-- Example: Opening an ATM via a custom target script or command
local success = exports['ak47_banking']:OpenNearestAtm()

if not success then
    -- The script already notifies the player, but you can add custom logic here
    print("Failed to open ATM: No card found or card cannot be used.")
end
```

#### OpenNearestBank

Checks if the player is currently near one of the configured bank locations (from `Config.BankLocations`). If they are within the allowed distance, it opens the main Bank UI. If they are too far away, it automatically triggers an error notification.

| **Parameter** | **Type** | **Description**                                                                                  |
| ------------- | -------- | ------------------------------------------------------------------------------------------------ |
| `maxDistance` | `number` | *(Optional)* The maximum distance to check for a bank location. Defaults to `5.0` if left blank. |

Returns: `void` (No return value)

```lua
-- Example 1: Opening a bank with the default 5.0 distance
exports['ak47_banking']:OpenNearestBank()

-- Example 2: Using a stricter distance limit (e.g., 2.5) for a specific target zone
exports['ak47_banking']:OpenNearestBank(2.5)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.menanak47.com/multi-framework/ak47_banking/exports/client.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
