> 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_fraudsystem/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)
```
