Agency Docs
QBESXStandalone

Agency-Shops Installation

Every 24/7, LTD, Rob's Liquor, hardware store, Ammu-Nation and gas station on the map in one script for FiveM.

v1.0.0Paid5 PagesFrom October 19, 2026, 20:00 CEST

01Installation

  1. 1Extract Agency-Shops into your resources folder
  2. 2Make sure OneSync is enabled on your server
  3. 3Add ensure Agency-Shops to server.cfg, after your framework, your inventory and oxmysql
  4. 4Start the server: the database tables are created on the first start (install/agency_shop.sql is only needed if your database user may not create tables)
  5. 5Add add_ace group.admin agency.shop allow to give admins the /ashops panel
  6. 6Running qb-shops, esx_shops or the ox_inventory shops? Remove their 24/7 entries, or two cashiers stand behind the same counter
  7. 7Running qb-storerobbery or a similar script? Switch one of them off, or set Config.Robbery.Enabled = false
  8. 8Running a fuel script with its own pumps? Switch off its pump interaction, or set Config.GasStations.Enabled = false
  9. 9Standalone: fill in Config.Standalone for money and items (see the config page)
  10. 10Optional: put your Discord webhook addresses into config_server.lua, which is never sent to players

02Dependencies

  • oxmysql (required)
  • OneSync (required)
  • QBCore, QBox or ESX (optional, runs standalone without one)
  • An inventory (optional: ox_inventory, qs-inventory or the one of your framework, found automatically)
  • Agency Phone (optional, adds Agency Pay as a way to pay)
  • Agency-Notify (optional, otherwise the shop shows its own messages)
  • ox_target or qb-target (optional, otherwise the key prompt is used)
  • ps-dispatch or cd_dispatch (optional, for robbery and shoplifting alerts, otherwise a built-in alert is used)
  • A fuel script (optional: LegacyFuel, ox_fuel, cdn-fuel, ps-fuel, lc_fuel, Renewed-Fuel, okokGasStation or qs-fuelstations, otherwise the built-in fuel system runs)

03SQL File

Optional: the resource creates these tables on its own when it starts. Import this file only if you set up the database by hand:

-- ============================================================================= -- AGENCY SHOP - database tables -- Created automatically on start (Config.AutoApplySql = true). Run this file by -- hand only if your database user may not create tables. -- ============================================================================= CREATE TABLE IF NOT EXISTS `agency_shop_owned` ( `id` VARCHAR(64) NOT NULL, `kind` VARCHAR(16) NOT NULL DEFAULT 'store', `owner` VARCHAR(80) NOT NULL, `owner_name` VARCHAR(120) NOT NULL DEFAULT '', `name` VARCHAR(60) NULL DEFAULT NULL, `balance` INT NOT NULL DEFAULT 0, `prices` LONGTEXT NULL, `stock` LONGTEXT NULL, `staff` LONGTEXT NULL, `fuel` INT NOT NULL DEFAULT 0, `fuel_prices` LONGTEXT NULL, `sales_total` INT NOT NULL DEFAULT 0, `revenue_total` BIGINT NOT NULL DEFAULT 0, `last_sale` TIMESTAMP NULL DEFAULT NULL, `bought_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `owner` (`owner`) ); CREATE TABLE IF NOT EXISTS `agency_shop_orders` ( `id` INT NOT NULL AUTO_INCREMENT, `shop` VARCHAR(64) NOT NULL, `kind` VARCHAR(16) NOT NULL DEFAULT 'goods', `items` LONGTEXT NULL, `crates` INT NOT NULL DEFAULT 0, `litres` INT NOT NULL DEFAULT 0, `cost` INT NOT NULL DEFAULT 0, `fee` INT NOT NULL DEFAULT 0, `status` VARCHAR(16) NOT NULL DEFAULT 'open', `courier` VARCHAR(80) NULL DEFAULT NULL, `courier_name` VARCHAR(120) NULL DEFAULT NULL, `eta` INT NULL DEFAULT NULL, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `shop` (`shop`), KEY `status` (`status`) ); CREATE TABLE IF NOT EXISTS `agency_shop_points` ( `id` INT NOT NULL AUTO_INCREMENT, `shop` VARCHAR(64) NOT NULL, `kind` VARCHAR(16) NOT NULL, `x` DOUBLE NOT NULL, `y` DOUBLE NOT NULL, `z` DOUBLE NOT NULL, `h` DOUBLE NOT NULL DEFAULT 0, `category` VARCHAR(40) NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `shop` (`shop`) ); CREATE TABLE IF NOT EXISTS `agency_shop_ledger` ( `id` INT NOT NULL AUTO_INCREMENT, `shop` VARCHAR(64) NOT NULL, `kind` VARCHAR(24) NOT NULL, `amount` INT NOT NULL DEFAULT 0, `note` VARCHAR(160) NULL DEFAULT NULL, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `shop` (`shop`) ); -- What admins change with /ashops: catalogs and store settings, laid over config.lua. CREATE TABLE IF NOT EXISTS `agency_shop_overrides` ( `kind` VARCHAR(16) NOT NULL, `id` VARCHAR(64) NOT NULL, `data` LONGTEXT NULL, `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`kind`, `id`) ); -- Every sale of an owned store or station, line by line: the owner's analytics. CREATE TABLE IF NOT EXISTS `agency_shop_sales` ( `id` INT NOT NULL AUTO_INCREMENT, `shop` VARCHAR(64) NOT NULL, `sale` VARCHAR(24) NOT NULL, `item` VARCHAR(64) NOT NULL, `qty` INT NOT NULL DEFAULT 0, `amount` INT NOT NULL DEFAULT 0, `account` VARCHAR(16) NOT NULL DEFAULT 'cash', `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `shop_time` (`shop`, `created_at`) );

+Good to know

Agency-Shops works right after the ensure line. Four points are worth a look before the first start: the start order, the database, admin access and other shop, robbery or fuel scripts.

Start Order and OneSync
Put ensure Agency-Shops after your framework, your inventory and oxmysql in server.cfg. OneSync has to be on, and oxmysql is required.
Database
The tables agency_shop_owned, agency_shop_orders, agency_shop_points, agency_shop_ledger, agency_shop_overrides and agency_shop_sales are created on the first start. install/agency_shop.sql is only needed when your database user may not create tables, and Config.AutoApplySql = false turns the automatic step off.
Admin Access
Admins are players with the ACE agency.shop, group.admin or group.superadmin, or a group from Config.Admin.Groups. add_ace group.admin agency.shop allow gives the /ashops panel to your admin group. On standalone servers Config.Standalone.admins lists licences.
Other Shop Scripts
Remove the 24/7 entries of qb-shops, esx_shops or the ox_inventory shops, or two cashiers stand behind the same counter. Switch off qb-storerobbery and similar scripts, or set Config.Robbery.Enabled = false. For a fuel script with its own pumps, switch off its pump interaction or set Config.GasStations.Enabled = false.

?Frequently asked questions

Where do the Discord webhooks go?

Into config_server.lua, for Ownership, Register, Deliveries, Shoplift and Robbery. That file is never sent to players.

Do I need Agency Phone?

No. When agency-phone runs, Agency Pay is offered at the checkout and at the pump on its own. Without it players pay with cash or card.

Still stuck after this page? Our support team takes it from here.