Getting started
What you get, where to download it, and how to start any SAF script on your server.
On this page
Editions
Every script is sold in two editions. Both have the same features and the same config.
| Standard | Open source | |
|---|---|---|
| Code | Core protected by Cfx.re escrow | Every file readable and editable |
| Always open | config.lua, bridge/, custom/ | Everything |
| Delivery | Cfx.re Keymaster | Download link from the store |
| Runs on | Servers whose license key belongs to the Cfx.re account that bought it | Any of your servers |
| Best for | Dropping in and staying updated without touching code | Changing how the script works inside |
The parts you need to fit a script to your server (options, framework hooks, permissions) are open in both. Pick open source only if you want to change the core.
Getting your download
Standard (escrowed)
- At checkout, log in to the store with the Cfx.re account that owns your server's license key.
- After payment, open keymaster.fivem.net and log in with that same account.
- Go to Granted Assets. The script is listed there. Download the zip.
- Unzip it into your server's
resourcesfolder.
An escrowed resource only starts on a server whose license key is on the account that owns the asset. If the console says the server lacks the entitlement, see the FAQ.
Open source
You get a download link by email right after checkout. The same link is in your purchase history on the
store. Unzip it into your resources folder.
Requirements
- A current FiveM server build. Update your artifacts if a script fails to start on an old one.
- One of the supported frameworks below, or none (standalone).
- OneSync for SAF Traffic and SAF Anticheat. It is on by default on current servers.
Frameworks
Each script detects the framework on its own. You can also set Config.Framework by hand.
| Script | Qbox | QBCore | ESX | ND Core | ox_core | Standalone |
|---|---|---|---|---|---|---|
| SAF TV | Yes | Yes | Yes | Yes | Yes | Yes |
| SAF Scenes | Yes | Yes | Yes | Yes | Yes | Yes |
| SAF HUD | Yes | Yes | Yes | Standalone | Standalone | Yes |
| SAF Weather | Yes | Yes | Yes | Yes | Yes | Yes |
| SAF Pursuit | Yes | Yes | Yes | Yes | Yes | Yes |
| SAF Garage | Yes | Yes | Yes | Yes | Yes | Yes |
| SAF Traffic | Yes | Yes | Yes | Yes | Yes | Yes |
| SAF Anticheat | Yes | Yes | Yes | Yes | Yes | Yes |
"Standalone" means SAF HUD runs in its standalone mode there. To use your framework's loaded state and staff groups, point the open bridge functions at it. See SAF HUD custom servers.
Inventories
SAF TV and SAF Scenes use items. They work with ox_inventory, qb-inventory, ps-inventory, lj-inventory,
qs-inventory, codem-inventory, core_inventory, tgiann-inventory, jaksam_inventory, origen_inventory, the ESX
default inventory, or no inventory at all. Item files for each are in the script's install/ folder.
Other resources
| Script | Needs | Optional |
|---|---|---|
| SAF TV | Nothing | ox_target or qb-target |
| SAF Scenes | ox_lib, oxmysql | |
| SAF HUD | Nothing | A postal map file |
| SAF Weather | Nothing | ox_lib |
| SAF Pursuit | Nothing | ox_lib |
| SAF Garage | Nothing | oxmysql, a fuel script, a keys script, ox_lib |
| SAF Traffic | OneSync | ox_lib, SAF Weather |
| SAF Anticheat | OneSync | oxmysql, screenshot-basic |
Ensure order
Start SAF scripts after everything they talk to: your framework, then the libraries and database, then your inventory and target, then the SAF scripts.
# framework and libraries
ensure oxmysql
ensure ox_lib
ensure qbx_core
# inventory and target
ensure ox_inventory
ensure ox_target
# SAF Scripts
ensure saf-hud
ensure saf-scenes
ensure saf-tvEach script prints the framework and inventory it found when it starts. Check the server console after the first start.
Permissions
Staff features use ACE permissions. Each script's Installation page lists its own, for example:
add_ace group.admin hud.manage allow
add_ace group.admin tv.staff allow
add_ace group.admin scenes.staff allowMost scripts also count framework admin groups (admin, god, superadmin) as staff. You can replace the
permission check with your own staff system in custom/.
The custom folder
Every script loads custom/ last:
| Folder | Use it for |
|---|---|
custom/shared/ | Changing Config values |
custom/client/ | Replacing client Bridge.* functions |
custom/server/ | Replacing server Bridge.* functions |
Updates never ship anything in custom/, so your changes survive every update. For example:
Config.Units = 'kmh'
Config.SOE.prefix = ''function Bridge.IsStaff(src)
return exports['my-admin']:IsAdmin(src)
endUpdating
- Download the new version from the same place as before.
- Replace every file in the resource folder except
custom/and the data files the script writes, such asplaced.json,state.jsonorroads.json. - Restart the resource and read the changelog for config options that were added.
Next
Pick a script from the sidebar and open its Installation page.