⚙️Configuration

⚙️ Configuration Guide

0Bug_Atm is easy to configure through its main configuration file and localization files. This guide will walk you through every option.


📁 Configuration Files

File
Purpose

zr-config/zr-config.lua

Main configuration (interaction, security, framework, standalone overrides)

zr-locales/en.json

English translations

zr-locales/es.json

Spanish translations

zr-locales/fr.json

French translations


🎯 Basic Configuration (zr-config/zr-config.lua)

General Settings

Config.Debug = false                     -- Enable debug prints
Config.Language = 'en'                   -- Language: 'en', 'es', 'fr'

PIN & Security

Config.PinLength = 4                     -- PIN digit length
Config.MaxAttempts = 3                   -- Max failed PIN attempts before lockout
Config.LockDuration = 30                -- Lockout duration in seconds

Bank Card Item - Follow the BANK_CARD_SETUP.md

External Banking (Optional)

If you want the ATM to open your existing banking UI (e.g., qb-banking) instead of the built-in system:


🎮 Interaction System

0Bug_Atm supports two interaction modes. Choose the one that fits your server:

Mode
Description
Requires

'target'

Use a target system (ox_target, qb-target, or custom)

A target resource

'textui'

Use ox_lib TextUI (proximity-based, press E)

ox_lib

Setting the Interaction Type

ATM Prop Models


🎯 Target System Setup

Only used when Config.InteractionType = 'target'

By default, the script auto-detects ox_target and qb-target. You can also add any custom target system by editing the Config.SetupTargetSystem function:

Parameters available in your custom setup:

Parameter
Type
Description

models

table

ATM prop model hashes

onSelect

function

Call this to open the ATM

canInteract

function

Returns true if player can interact

distance

number

Interaction distance in meters


📱 TextUI Setup (ox_lib)

Only used when Config.InteractionType = 'textui' Requires ox_lib to be installed and started.

Players walk up to an ATM and press [E] to interact — no target system needed.


🖥️ Framework Auto-Detection

The script automatically detects your framework. No manual setup needed for:

  • QBCore (qb-core)

  • QBox (qbx_core)

  • ESX (es_extended)

  • Standalone (no framework — uses config overrides below)


💻 Standalone / Custom Framework Overrides

If you use QBCore, QBox, or ESX — these are IGNORED. Only edit these if your framework is detected as standalone.

These functions let you plug in any custom money system, identifier system, or character system for standalone setups.

💰 Get Player Bank Balance

💵 Get Player Cash

➕ Add Money to Player

➖ Remove Money from Player

🆔 Get Player Identifier

👤 Get Player Display Name


🌍 Localization (zr-locales/)

Change any text displayed in the ATM UI by editing the language JSON files:

Available languages:

File
Language

zr-locales/en.json

English

zr-locales/es.json

Spanish

zr-locales/fr.json

French

Set the language in the config:


✅ Testing Your Configuration

After making changes:

  1. Save your config files

  2. Restart the resource:

  3. Check console for any errors

  4. Test in-game:

    • Walk up to an ATM

    • Verify interaction works (target eye or TextUI prompt)

    • Test PIN setup, withdraw, deposit

    • Check if balance updates correctly


🛠️ Common Issues

Issue
Cause
Solution

No interaction at ATM

Wrong InteractionType or missing target resource

Verify config matches your setup

TextUI not showing

ox_lib not installed

Install ox_lib and ensure it starts before 0Bug_Atm

Target eye not showing

Target resource not started

Ensure ox_target or qb-target starts before 0Bug_Atm

Balance always 0 (standalone)

Override functions not implemented

Edit Config.GetPlayerBalance and other overrides

Money not adding/removing

Override returns false

Ensure Config.AddMoney / Config.RemoveMoney return true

Framework not detected

0Bug_Atm loaded before framework

Fix load order in server.cfg


💾 Backup Reminder

Always backup your config files before making major changes:

  • zr-config/zr-config.luazr-config/zr-config.lua.backup

  • zr-locales/*.json → backup copies


Configuration complete! Your ATM system is ready to go. 🎉

Last updated