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

πŸ›’SHOPS CREATOR

Here check the installation guide

Forge Shops V2

Advanced shop system for FiveM servers.

Created by CodeForge Support Discord: https://discord.gg/UTVssdrXRV

Features

  • Normal shops with buy and sell modes.

  • Reusable item categories through ItemCategories.

  • Weapon shops with a dedicated NUI, stats, tints, components, license checks and optional 3D preview.

  • Illegal shops with configurable police alert chance, delay and cooldown.

  • Business shops with duty, management panel, stock, custom prices, employees, NPC income, invoices and worker deliveries.

  • Target and non-target interaction modes.

  • Proximity-based shop NPC spawning for better performance.

  • Model-based shops for vending machines, coffee machines and other props.

  • Multiple payment methods per shop.

  • Job-restricted shops.

  • Server-side validation for purchases, sales, jobs, distance, stock and inventory actions.

  • Server-side Discord webhook logging.

  • Full translation system in config/translations.lua.

  • Debug mode with startup hints and structured console logs.

  • Open configuration, bridge and hook files for easier server integration.

Requirements

Required:

  • A FiveM server using cerulean.

  • oxmysql.

  • ESX or QBCore/QBOX.

  • A supported inventory system, or the framework fallback.

Supported framework modes:

  • auto

  • esx

  • qb

Supported inventory aliases:

  • auto

  • ox / ox_inventory

  • qb / qb-inventory / qb_inventory

  • ps / ps-inventory / ps_inventory

  • qs / qs-inventory / qs_inventory / quasar

  • core / core_inventory / core-inventory

  • tgiann / tgiann-inventory / tgiann_inventory

  • jaksam / jaksam_inventory / jaksam-inventory

  • esx / esx_default / default

Optional:

  • ox_target or qb-target.

  • forge-notify.

  • neon-boss for the external boss menu option.

  • Society/banking resources depending on Config.Business.SocietyMethod.

  • Dispatch resources if you connect illegal shop alerts to your dispatch system.

Installation

  1. Place the folder in your resources directory.

    Recommended path:

  2. Keep the resource name as forge-shops.

    If you rename the resource, update paths that reference the resource name, especially:

  3. Make sure your dependencies start before this resource.

    Example server.cfg:

  4. Configure your database connection for oxmysql.

  5. Install the database table.

    By default this is automatic:

    If you prefer manual installation, run:

  6. Configure the script in:

    • config/config.lua

    • config/shops.lua

    • config/weaponshops.lua

    • config/illegalshops.lua

    • config/translations.lua

    • config/open_server.lua

    • config/open_client.lua

  7. Restart the server or restart the resource:

Main Configuration

Framework

Set your framework in config/config.lua:

Use auto unless you need to force a framework:

For ESX, check:

Inventory

Set your inventory system:

If auto-detection does not match your server, force it:

Target Mode

Target disabled:

Target enabled with ox_target:

Target enabled with qb-target:

When target is enabled, it is used for shops, business duty, management, boss menu and worker delivery interactions.

Language

Set the active language:

Translations are stored in:

Discord webhook texts are configured separately in config/open_server.lua.

Debug

Enable debug mode while installing or diagnosing:

Disable it in production:

When enabled, the server prints startup hints, including the selected framework, inventory, target system, business status, weapon shop status and Discord logging status.

Payment Methods

Global payment methods are configured in:

Per-shop payment methods:

Examples:

Adding a Normal Shop

Add normal shops in:

Example:

Then add translations in config/translations.lua:

Adding Item Categories

Reusable buy categories are in config/shops.lua:

Use the category in a shop:

Adding Sell Categories

Sell categories define what a shop buys from players:

Use the sell category in a shop:

Restricting a Shop by Job

Add allowedJobs to the shop:

Remove allowedJobs or leave it empty to allow everyone.

Access is validated server-side.

Adding a Weapon Shop

Weapon shops are configured in:

Example:

Weapon shop settings are in:

Important options:

  • Enabled

  • LicenseCheckMode

  • LicenseItem

  • LicenseName

  • GiveMode

  • StackableWeaponItems

  • WeaponImageBase

  • Preview3D

If LicenseCheckMode = 'item', make sure the license item exists in your inventory.

Weapon Categories, Components and Tints

Weapon categories are in:

Each weapon can define:

  • weaponHash

  • itemName

  • image

  • price

  • description

  • tints

  • stats

  • components

Components can define:

  • name

  • hash

  • itemName

  • price

  • image

  • slot

Tint palettes are in:

Adding an Illegal Shop

Illegal shops are configured in:

Example:

Police alert settings are in:

The open server-side hook is:

You can integrate dispatch systems in:

Business Shops

Business shops are normal or weapon shops with:

Business settings are in:

Main features:

  • Worker duty.

  • Management panel.

  • Stock and restock system.

  • Custom item and weapon prices.

  • NPC employee hiring and firing.

  • NPC salaries.

  • Passive NPC income.

  • Invoice sales.

  • Worker order deliveries.

  • Company and worker revenue split.

  • External society/banking integration or built-in balance.

Example:

Business Society Money

Use built-in business balance:

Use external society/banking:

Supported society methods:

  • FORGE

  • QB

  • OKOK

  • ESX

  • FD

  • TGG

  • WASABI

  • CODEM

  • JUSTBANKING

Make sure the required banking/society resource is installed and started.

External Boss Menu

To use neon-boss:

Then configure bossMenuPoint in each business shop.

Model-Based Shops

Model shops are configured with:

Example:

The referenced shop should use:

Discord Webhook Logs

Discord logs are configured server-side only in:

Do not place webhook URLs in client or shared files.

Enable logs:

Use one default webhook:

Or use a different webhook per category:

You can also store webhook URLs in server.cfg using convars:

Then point the category to that convar:

Default categories:

  • purchases

  • sells

  • weapons

  • business

  • illegal

Default log actions:

  • item_purchase

  • item_sell

  • weapon_purchase

  • accessory_purchase

  • invoice_sale

  • worker_sale

  • worker_weapon_sale

  • business_management

  • illegal_alert

Translations

All player-facing and admin-facing text is in:

Set the active language in:

To add a language:

  1. Copy the English language table.

  2. Rename it to your locale code, for example es.

  3. Translate the values, not the keys.

  4. Set Config.Locale to your locale code.

Do not translate:

  • Event names.

  • Export names.

  • Function names.

  • Item names.

  • Weapon hashes.

  • Job names.

  • Permission names.

  • Internal identifiers.

Discord log texts are intentionally configured in config/open_server.lua.

Images

Item images use:

Examples:

Weapon images use:

Image filenames must match the configured item or weapon image names.

Editable Integration Files

These files are intended for configuration and integration:

  • config/config.lua

  • config/translations.lua

  • config/shops.lua

  • config/weaponshops.lua

  • config/illegalshops.lua

  • config/bridge_client.lua

  • config/bridge_server.lua

  • config/open_client.lua

  • config/open_server.lua

Use config/open_server.lua for protected server-side hooks such as:

  • Inventory carry checks.

  • Discord webhook configuration.

  • Illegal shop police alerts.

Troubleshooting

The shop does not open

  • Check that your framework is started before forge-shops.

  • Check Config.Framework.

  • Check that your inventory resource is started.

  • Check Config.Inventory.

  • If using target, check Config.UseTarget and make sure ox_target or qb-target is started.

  • Check allowedJobs on the shop.

  • Check that the player is close enough to the configured coordinates.

Items are not added or removed

  • Check that the item exists in your inventory system.

  • Check Config.Inventory.

  • Enable Config.Debug = true and read the server console.

  • Check inventory weight/capacity rules.

Weapon purchases fail

  • Check Config.WeaponShop.Enabled.

  • Check Config.WeaponShop.GiveMode.

  • If using GiveMode = 'item', make sure weapon items exist in your inventory.

  • If using licenses, make sure the configured license item or framework license exists.

  • Check that weapon components and ammo item names match your inventory.

Business money does not update

  • Check Config.Business.Enabled.

  • Check Config.Business.UseBuiltinBalance.

  • If using external society money, check Config.Business.SocietyMethod.

  • Make sure the society/banking resource required by your selected method is started.

  • Make sure the shop has a valid societyKey.

NPCs appear only nearby

Shop NPCs are spawned by proximity for performance.

Adjust:

Higher values keep NPCs spawned from farther away, but may cost more performance on servers with many shops.

Images are missing

  • Check Config.ItemImageBaseURL.

  • Check Config.WeaponShop.WeaponImageBase.

  • Check that filenames include the configured extension.

  • If you renamed the resource, update NUI paths that contain forge-shops.

Text is missing or shows a translation key

  • Check config/translations.lua.

  • Make sure the key exists in the active language.

  • English is used as fallback when possible.

Support

For support, updates and questions, join:

https://discord.gg/UTVssdrXRV

Last updated