Updating
Update Eleven Comercios on your FiveM server without losing data: download from Keymaster, keep your config.lua and texts, back up the database and restart.
Updates are downloaded from Keymaster, just like the first time (the general steps are in Update a script). Your businesses, orders, recipes and levels live in the database and aren't lost when you swap the files.
Steps
- Back up. Save the database (at least the
comercios_*tables, see Database), both yourconfig.luafiles and, if you edited them, thelocales/folders. - Download the new version from Keymaster with your Cfx.re account.
- Stop the server.
- Replace the
eleven-comerciosandeleven-comercios-adminfolders with the new ones (if Keymaster shows three resources, downloadeleven-comerciosandeleven-comercios-admin; you only needeleven-comercios-itemswhen it brings new items). - Restore your configuration. Compare your old
config.luawith the new one and carry your values over. Don't paste the old file on top blindly: there may be new keys. Do the same with any texts you changed inlocales/: new versions can add keys (missing ones fall back to English). - If the update brings new items, add them to
ox_inventory/data/items.luaand copy their images. - Start the server. New tables and columns are created automatically: don't import any
.sqlby hand. Data files already recorded incomercios_migrationsdon't run again, so your catalogs aren't overwritten.
Warning
Don't update with the server running or hot-restart with ensure. Both resources register stashes, points and NPCs on start and call each other: restart the whole server.
What to keep
| What | Where |
|---|---|
| Businesses, orders, levels, recipes, wholesalers, licenses, vehicles, points | Database (comercios_*). |
| Contents of storages, counters, lockers, carts | ox_inventory's database tables. |
| Your configuration | Both config.lua files. |
| Your translations | The locales/ folders, if you edited them. |
Changes and requests
The code is escrowed: only config.lua, locales/ and the items snippet can be edited. If you need a change or a new feature, open a ticket on our Discord.
If something fails
See Troubleshooting and, for Keymaster errors, the Install with Keymaster guide.