For the complete documentation index, see llms.txt. This page is also available as Markdown.

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)

-- 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)

Last updated