Agency Docs
QBESXStandalone

Agency-Banking Installation

Une banque complète pour FiveM qui fonctionne sous QBCore, Qbox, ESX ou entièrement en standalone.

v1.3.1Payant6 Pages

01Installation

  1. 1Placez Agency-Banking dans votre dossier resources
  2. 2Ajoutez ensure Agency-Banking dans server.cfg, après oxmysql et votre framework
  3. 3Démarrez la resource : toutes les tables et colonnes sont créées automatiquement, agency_banking.sql ne sert qu'à une installation manuelle
  4. 4Adaptez config.lua : langue, design, framework, comptes standalone, durées des dépôts à terme et emplacements
  5. 5Optionnel : add_ace group.admin agency.banking allow pour les droits admin comme /openbank
  6. 6Mise à jour depuis une ancienne version : sauvegardez vos valeurs de config, utilisez le nouveau config.lua et redémarrez la resource. Comptes, cartes et dépôts restent dans la base de données.

02Dépendances

  • oxmysql (requis)
  • QBCore, Qbox ou ESX (optionnel, détecté automatiquement, fonctionne en standalone sans)
  • qb-target ou ox_target (optionnel, sinon marqueurs avec [E])
  • agency-phone (optionnel, partage le wallet standalone et fournit les cours en direct)
  • Agency-Notify (optionnel)

03Fichier SQL

Optionnel : la ressource crée ces tables elle-même au démarrage. N'importez ce fichier que si vous préparez la base de données à la main :

-- ============================================================================= -- Agency Banking: database schema -- ----------------------------------------------------------------------------- -- You do NOT have to import this file. The resource creates every table and -- every missing column by itself on start (MariaDB and MySQL 8). -- It is here for servers that prefer to set up the database by hand. -- ============================================================================= CREATE TABLE IF NOT EXISTS `agency_transactions` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `identifier` VARCHAR(60) NOT NULL, `type` VARCHAR(50) NOT NULL, -- deposit, withdraw, transfer, fixed_deposit, card_added, ... `amount` DECIMAL(15,2) NOT NULL, `target_identifier` VARCHAR(60) DEFAULT NULL, `reason` VARCHAR(255) DEFAULT NULL, `date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `identifier` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `agency_cards` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `identifier` VARCHAR(60) NOT NULL, `card_number` VARCHAR(16) NOT NULL, `card_pin` VARCHAR(4) NOT NULL, `card_type` VARCHAR(50) DEFAULT 'Visa', `card_color` VARCHAR(50) DEFAULT 'ultra-blue', `is_active` TINYINT(1) DEFAULT 1, `card_name` VARCHAR(50) DEFAULT 'Main Account', `card_holder` VARCHAR(50) DEFAULT 'Card Holder', PRIMARY KEY (`id`), KEY `identifier` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `agency_fixed_deposits` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `identifier` VARCHAR(60) NOT NULL, `amount` DECIMAL(15,2) NOT NULL, `interest_rate` FLOAT NOT NULL, `duration_days` INT(11) NOT NULL, `start_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `end_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `is_claimed` TINYINT(1) DEFAULT 0, `source` VARCHAR(16) NOT NULL DEFAULT 'bank', -- 'bank' = paid out by the bank, 'phone' = a copy of an Agency Phone wallet deposit `external_ref` VARCHAR(64) DEFAULT NULL, -- the phone's own id for a 'phone' deposit PRIMARY KEY (`id`), KEY `identifier` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `agency_atm_pins` ( `identifier` VARCHAR(60) NOT NULL, `pin` VARCHAR(4) NOT NULL, PRIMARY KEY (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- Standalone only (no QBCore / Qbox / ESX): balance and cash per Rockstar licence. CREATE TABLE IF NOT EXISTS `agency_bank_accounts` ( `identifier` VARCHAR(60) NOT NULL, `bank` DECIMAL(15,2) NOT NULL DEFAULT 0, `cash` DECIMAL(15,2) NOT NULL DEFAULT 0, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- Standalone and ESX only: the stock and crypto portfolio. The same table Agency -- Phone and Agency Pad use; on QBCore / Qbox the portfolio lives in the -- character's metadata instead. CREATE TABLE IF NOT EXISTS `agency_phone_settings` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `identifier` VARCHAR(60) NOT NULL, `setting_key` VARCHAR(60) NOT NULL, `setting_value` TEXT DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `identifier_key` (`identifier`, `setting_key`), KEY `identifier` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- Agency Companion app (created by server/companion.lua as well). CREATE TABLE IF NOT EXISTS `agency_banking_cmp_meta` ( `k` VARCHAR(64) NOT NULL PRIMARY KEY, `v` TEXT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `agency_banking_cmp_devices` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `identifier` VARCHAR(60) NOT NULL, `player_name` VARCHAR(80) DEFAULT NULL, `token_hash` CHAR(64) NOT NULL, `device_name` VARCHAR(64) DEFAULT NULL, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `last_seen` TIMESTAMP NULL DEFAULT NULL, `revoked` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE KEY `token_hash` (`token_hash`), KEY `identifier` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Toujours bloqué après cette page ? Notre support prend le relais.