Installing a FiveM resource
Most “this script is broken” reports are one of four things, and none of them are the script. This covers what actually goes wrong and how to spot it.
Dependencies come first
Almost every modern FiveM resource is built on a handful of shared libraries. If they aren't installed, the resource won't start — and the error usually names the library rather than the script, which is why it's easy to misread.
- A framework —
qbx_core(QBox) orqb-core(QBCore). This is what owns players, jobs and money. - ox_lib — menus, notifications, callbacks. Nearly universal now.
- oxmysql — the database layer. Anything that remembers something between restarts needs it.
- A target resource —
ox_targetorqb-target, for interacting with things in the world. - An inventory —
ox_inventory,qb-inventoryorqs-inventory, if the script uses items.
A resource that says it supports “QBox or QBCore” usually detects which you run at startup. One that hard-depends on a specific framework will refuse to start on the other, and its fxmanifest.lua will say so in its dependencies block. Worth checking before you install.
The folder name matters
A resource's folder name is its identity. Exports, events and config references all use it, so renaming the folder breaks it in ways that look unrelated.
This catches people out because GitHub's “Download ZIP” button does not give you the right folder name. It unpacks to cipher-trucking-master or cipher-trucking-2.1.1, not cipher-trucking. Either rename it, or download the packaged zip from the release page — every Cipher release attaches one that unpacks correctly.
Start order is not optional
FiveM starts resources in the order server.cfg lists them. A resource that starts before something it depends on will fail — and the error often points at the dependent script, not the missing dependency.
ensure oxmysql ensure ox_lib ensure ox_target ensure qbx_core # everything that depends on the above goes after it ensure cipher-trucking ensure cipher-admin
If you use ensure inside a resource category or a start for a whole folder, the order within that folder is not guaranteed. Listing dependencies explicitly, first, is the reliable approach.
The database
Scripts that remember anything need tables. There are two approaches, and it's worth knowing which you're dealing with:
- A SQL file to import. Run it once against your database before first start. If you later update the script, check the release notes for new statements — a missing column is the single most common “it broke after updating”.
- Self-provisioning. The resource creates and migrates its own tables on start. Nothing to import, and updates handle themselves.
Back up before importing anything. It takes a minute and saves an evening.
Read config.lua before you open the server
A resource starting without errors doesn't mean it's configured for your server. Coordinates, job names, item names and integration settings are all things that are valid but wrong by default.
Two categories cause the most trouble because they fail silently — nothing errors, the feature just doesn't work:
- Vehicle keys. If a script spawns a vehicle and your keys resource isn't configured, the vehicle appears but the engine won't start.
- Appearance and inventory. Point these at the wrong resource and the relevant buttons do nothing at all.
The config generator covers both for the scripts that have them.
Check it actually loaded
Watch the console during startup rather than assuming. A well-behaved resource announces itself — a version line, a database confirmation, a detected framework.
[cipher-trucking] database ready — 9 tables verified [cipher-trucking] bridge loaded (qbox)
You can also check state directly:
ensure cipher-trucking refresh restart cipher-trucking
Reading a console error
FiveM errors look noisy but the useful part is consistent. Take:
SCRIPT ERROR: @cipher-admin/server/main.lua:260: attempt to index a nil value (global 'Framework')
@cipher-admin/server/main.lua:260— which resource, which file, which line.attempt to index a nil value— something that should exist doesn't.(global 'Framework')— the name of the thing that's missing. This is the part that tells you what to fix.
A missing global usually means a file that defines it never loaded — most often because an update was copied file by file and a new folder was missed. When in doubt, replace the whole resource folder rather than the files you think changed.
Errors point at the symptom, not the cause. The line that errors is where something broke, not where it went wrong. A nil global at line 260 is a loading problem, not a problem with line 260.
Updating without breaking things
- Back up the resource folder and your database.
- Read the release notes for schema changes or new config keys.
- Save your
config.luasomewhere before overwriting. - Replace the whole folder, not individual files.
- Re-apply your config, restart, and read the console.
Next
Per-script setup guides · Config generator · FAQ · Ask in Discord