Documentation

Overview

Overview

Native Scripts (FiveM) is a framework-agnostic script collection for FiveM (GTA5) servers. The goal: a single codebase that runs unchanged on ESX, QBCore, Qbox (qbx_core), vRP 1.x and standalone.

Core layer: ns-utils

Unlike the RedM side (which uses a shared ns-lib resource), FiveM scripts use ns-utils — a self-contained utils/ folder copied into each resource. There is no shared dependency to install. On startup it auto-detects the framework, inventory, target, skin and SQL systems and exposes a single Utils.* API:

Utils.OnPlayerLoaded(function(src)
    local player = Utils.GetPlayer(src)   -- framework-agnostic
end)

if Utils.HasItem(src, 'water', 1) then
    Utils.RemoveItem(src, 'water', 1)
    Utils.AddMoney(src, 'cash', 10, 'water_sale')
    Utils.Notify(src, '+$10 (water sold)', 'success')
end

You never branch on the framework name — all of that lives inside utils/.

Server setup

  1. Get any ns-* FiveM script from the nativescripts.com catalog
  2. Drop it into your resources/ folder
  3. Add it to server.cfg:
    ensure ns-loadingscreen
    
  4. Apply the SQL and item registrations from the script's README (if any)
  5. Restart — the console prints the detected stack:
    [ns-loadingscreen][INFO] shared.lua ready (framework=qbx, inv=ox_inventory, target=ox_target, skin=illenium-appearance, sql=oxmysql)
    

Optional dependencies

  • ox_lib — if present, Utils.Notify routes through it for nicer notifications. Otherwise it falls back to the framework-native notify.
  • oxmysql — required only for scripts that use a database (Utils.ExecuteSql).

Detection priority

CategoryPriority (first match wins)
Frameworkqbx_coreqb-corees_extended → vRP (vrp / vRP / vrpex / vrp_ex) → standalone
Inventoryox_inventoryqb-inventoryqs-inventorycodem-inventoryps-inventoryesx_inventoryhudgfx-inventory → vRP built-in
Targetox_targetqb-targetqtarget
Skinillenium-appearancefivem-appearanceqb-clothingesx_skinskinchanger
SQLoxmysqlghmattimysqlmysql-async

Renamed cores can be pointed at explicitly with convars:

setr ns_framework          "vrp"      # qbx | qb | esx | vrp | standalone
setr ns_framework_resource "vrpex"    # vRP only: the actual folder name

vRP 1.x

vRP publishes no exports, so the layer speaks its Proxy event protocol directly — money, inventory, jobs (groups of type job), permissions, identity and the vRP:playerSpawn / vRP:playerLeave lifecycle all map onto the same Utils.* API. Nothing is added to any fxmanifest.lua, so the same build still starts on a non-vRP server. vRP inventory items are defined at runtime, so there is no items.lua entry to add.

Next

Instant Delivery

CFX-key bound licenses delivered to your account seconds after checkout.

Discord Support 24/7

A private channel and personal escalation for every licensee.

Open Source Options

Upgrade any package to a fully open-source license at any time.

Your Cart

· 0
Empty inventory
Browse the store to fill it up.
Browse Catalog