Skip to main content
Resources and database

Written lessons and reference material are currently in English.

On this page
Module A1 · Server setup from zero

Install, update, disable, and remove any script

Most beginners install a script by dragging the folder in, typing ensure, and hoping. When it works it feels like luck. When it breaks they have no idea why. This lesson replaces luck with a method. The mechanics are simple: a script is a folder, you drop it in resources, you add one line to server.cfg, you restart. The trouble is always the same short list: a wrong folder name, a missing dependency, or the wrong load order. You will install one script the right way, learn the order of operations that makes every other install predictable, and then learn how to disable, remove, and update a script without losing your settings or your data. Dependencies first, resource second, database third, load order fourth, console last.

You'll build
A clean install of one real script and its dependencies, dropped into resources/[scripts], with its SQL imported and its load order set correctly in server.cfg - plus the safe, repeatable way to update, disable, or remove any script later.
Time
~30 minutes
You need
A local FiveM server you can restart (the one you build in this track is fine), a database tool like HeidiSQL pointed at your MariaDB, a text editor, and your framework and oxmysql/ox_lib already running (Track B Frameworks, or the recipe from Step 03).
You'll learn
Read the docs and fxmanifest for deps, framework, and config -> install dependencies FIRST -> drop the resource in and set its config to your framework -> import its .sql in HeidiSQL -> ensure it AFTER its deps -> restart and read the console -> disable or fully remove a script -> update one safely without losing your settings or your data. One repeatable checklist for ANY script.
BEFORE YOU START

The mental model: install bottom-up

A script almost never stands alone. It calls into other resources. Those resources must already be running, and must have registered their exports (the functions a resource hands out for other resources to call), before your script asks for them. So you do not install top-down, the script you want first. You install bottom-up: the things at the base of the stack first, the script that sits on top of them last.

Here is the order, drawn as a stack. Read it from the bottom.

code
 ┌─────────────────────────────┐
 install LAST │ qs_lockpick │ the script you actually want
 │ needs: oxmysql, ox_lib, │
 │ a framework │
 ├─────────────────────────────┤
 │ es_extended / qb-core │ framework (player data, jobs)
 │ needs: oxmysql, ox_lib │
 ├─────────────────────────────┤
 │ ox_lib │ shared library (UI, callbacks)
 ├─────────────────────────────┤
 install FIRST │ oxmysql │ database layer -> MariaDB
 └─────────────────────────────┘
 loads top-down in server.cfg,
 so write deps ABOVE the script

In server.cfg the load order is the top-to-bottom order of your ensure lines. An ensure line tells the server to start that resource. So the resource that everyone depends on, oxmysql, gets ensured first. Your script gets ensured last. If you flip that, your script boots before oxmysql exists and you get attempt to call a nil value the instant it starts. That one rule prevents most install failures.

Note the names. oxmysql, ox_lib, ox_target, and ox_inventory are Overextended community resources, not Cfx.re built-ins. Your database engine is MariaDB. A framework is the big base resource that owns player data, money, and jobs. The three you will meet are ESX (es_extended), QBCore (qb-core), and Qbox (qbx_core, the modern ox-based fork). They have separate official repositories. Install the framework and exact dependencies named by the script's current documentation.

Keep reading the full lesson

Sign in to start, then unlock every step of this lesson and the full FiveM School with a membership.

Still ahead in this lesson
  • Build it
  • How it works
  • Common mistakes
  • What you can do now
  • Try it yourself

The remainder of Install, update, disable, and remove any script is available to FiveM School members.

Open the full lesson to mark it complete.