Installation
Install Eleven Comercios on FiveM and Qbox: Keymaster download (one or three resources), ox_inventory items, server.cfg order, language and automatic database.
Before you start
Make sure every requirement is installed and running. Back up your database: the script creates its own tables and sample data, but a backup never hurts.
1. Download the resource
Log in to Keymaster with the Cfx.re account you bought with and download Eleven Comercios (under Granted Assets). If this is your first encrypted script, the Install with Keymaster guide covers the server license key and the artifacts you need.
Depending on how it was delivered to you, Keymaster shows one download with everything or three separate resources: eleven-comercios, eleven-comercios-admin and eleven-comercios-items. If you see three, download all three. Either way you end up with these folders:
eleven-comercios/ # the tablet and gameplay
config.lua
locales/ # in-game and tablet texts (en / es)
sql/schema.sql
eleven-comercios-admin/ # the /comerciosadmin panel
config.lua
locales/ # panel texts (en / es)
sql/ # tables and sample data
ox_inventory_items/ # ships in eleven-comercios-items
items_comercios.lua
images/ # 150 PNG images
ox_inventory_items is not a resource: don't start it or add it to server.cfg. It only holds the items you copy into ox_inventory (step 3).
2. Copy the resources
Copy eleven-comercios and eleven-comercios-admin into your resources folder, for example resources/[comercios]/. Don't rename the folders: the two resources call each other by name.
3. Add the items to ox_inventory
- Open
ox_inventory_items/items_comercios.luaand paste its content inside the table returned byox_inventory/data/items.lua(before the last closing brace). - Copy the 150 images from
ox_inventory_items/images/intoox_inventory/web/images/(143 ingredients and 7 eco variants).
These are the recipe ingredients (c_milk, c_burger, c_tomato…). The full list is in Inventory items.
Tip
If you already have an item with the same name, keep only one. ox_inventory does not allow duplicate keys.
4. Add them to server.cfg
Start the dependencies first and then both resources, the admin panel before the tablet:
ensure ox_lib
ensure oxmysql
ensure qbx_core
ensure ox_inventory
ensure ox_target
ensure object_gizmo
ensure Renewed-Banking
# optional, if you have them (see Requirements): before comercios
# ensure eleven-phone
# ensure eleven-banking
# ensure eleven-housing
# ensure eleven-npc-events
ensure eleven-comercios-admin
ensure eleven-comercios
5. Pick the language
In each resource's config.lua, set the same language:
Config.Locale = 'en' -- 'en' (default) or 'es'
The texts live in locales/ and you can edit them. If a file is missing a key, the English one is used. The sample data in the database ships in Spanish whatever the language: change it from the panel.
6. Grant panel access
The /comerciosadmin panel opens for the groups in Config.AdminGroups (admin by default, i.e. anyone with the group.admin ACE). To give access to a specific person without making them an admin, use the panel's own ACE:
add_ace identifier.license:YOUR_LICENSE eleven-comercios.admin allow
More in Commands and permissions.
Tip
Before you start the server, go through both config.lua files: the tablet key, the per-level caps, multi-job (Config.Employees.SingleJob), the police job for fines and robberies (Config.FleetFines.Payee, Robbery.PoliceJob) and, in the panel's file, the wholesaler's Discord webhook (Config.WholesaleWebhook, off by default). See Business config.lua and Admin panel config.lua.
7. Start the server
Restart the whole server. You don't need to import any .sql. The resources run the .sql files in eleven-comercios/sql and eleven-comercios-admin/sql themselves; don't import them by hand. On first boot each resource creates its comercios_* tables and the panel installs the sample data (a wholesaler with 121 products, 14 stock vehicles and 39 licenses, not assigned to any business). You will see green [eleven-comercios] and [eleven-comercios-admin] lines in the console, with a "Running migration" line for each data file. Each one is applied only once. Details in Database.
Warning
Don't hot-start the resources with ensure the first time. They register stashes, points and NPCs on start; a full restart avoids half-loaded states.
8. First test
- Join with an admin user and type
/comerciosadmin. The panel should open. - Follow Your first business to register a job and open its tablet with HOME.
ox_inventory public vending machines
Eleven Comercios adds its own interaction to the vending machines on the map (Config.Vending). If ox_inventory still has the VendingMachineDrinks shop in data/shops.lua, players will see two options on the same machine. The cleanest fix is to remove that shop from ox_inventory. If you want to keep it on a specific machine, add that machine to Config.Vending.Exclude (see Street, wifi and vending).
Keymaster entitlement error
If the console shows something like You lack the required entitlement to use eleven-comercios, the server is not allowed to load the escrowed resource:
| Cause | Fix |
|---|---|
The sv_licenseKey belongs to another Cfx.re account | Generate the key on the account that bought the script, or buy with the account that owns the key. |
| You uploaded a copy someone else downloaded | Download the resources from your own Keymaster. |
| The purchase has not been assigned yet | Wait a few minutes and fully restart the server. |
More causes and fixes in Install with Keymaster. If it keeps failing, open a ticket on our Discord.
Next steps
- Your first business: register your first job and open its tablet.
- Troubleshooting, if something doesn't start.
- Updating and the general Update a script guide, for when a new version comes out.