PiTyUs.Hire me

Frameworks

What ox_core is and how scripts use it

An overview of ox_core, Overextended's FiveM framework: its TypeScript codebase and Lua/JS APIs, users and characters, OxPlayer, groups, bank accounts with addBalance and transferBalance, persistent vehicles, the ox stack, and when to choose it over ESX, QBCore or Qbox.

Updated 10 min readBy PiTyUs · FiveM developer

Overview

ox_core is the framework from Overextended, the team behind ox_lib, ox_inventory, ox_target and oxmysql. It is written in TypeScript, keeps the core small, and leaves inventory, targeting and UI to the other ox resources. It is less common than ESX or QBCore, but popular with developers who want a clean, typed base.

Core concepts

ConceptWhat it is
UserThe person (identified by their identifiers), with a userId
CharacterA playable character with a charId
GroupJobs, gangs and other organisations with grades
AccountBank accounts for characters and groups, with roles and permissions
VehicleOwned, persistent vehicles with a VIN

Using ox_core from Lua

server.lualua
local Ox = require '@ox_core.lib.init'

RegisterCommand('payday', function(source)
    local player = Ox.GetPlayer(source)
    if not player or not player.charId then return end

    local account = Ox.GetCharacterAccount(player.charId)
    if account then
        account.addBalance({ amount = 500, message = 'Payday' })
    end
end, false)

The require form needs lua54 'yes' and ox_lib (which provides require for resource paths). OxPlayer methods such as getGroup(filter) check group membership and grade.

Accounts

MethodDoes
addBalance({ amount, message })Adds money
removeBalance({ amount, overdraw, message })Removes money
transferBalance({ toId, amount, ... })Moves money between accounts
depositMoney / withdrawMoneyMoves cash (inventory money) in and out
createInvoice(data)Bills another account

JavaScript and TypeScript

Because the core is TypeScript, JS resources are first-class: install @overextended/ox_core from npm and import its functions with full types. See TypeScript scripts.

When to choose ox_core

  • You are building a server mostly from your own scripts and want a small, typed core.
  • Your team writes TypeScript.
  • You accept a smaller catalogue of ready-made resources than ESX or QBCore/Qbox offer.

Framework comparisons for beginners are in ESX vs QBCore vs Qbox.

Frequently asked questions

What is ox_core?

Overextended’s FiveM framework, written in TypeScript, managing users, characters, groups, accounts and vehicles.

How do I use ox_core in Lua?

local Ox = require '@ox_core.lib.init' with ox_lib started and lua54 'yes' in the manifest.

Does ox_core have its own inventory?

No. It uses ox_inventory for items and cash.

Is ox_core better than Qbox?

Neither is better in general. ox_core is smaller and typed; Qbox has a larger ecosystem through QBCore compatibility.

Need this built, not just explained?

Ten years of FiveM work, from Lua to NUI

Custom resources, React NUI, ESX / QBCore / Qbox integration, OneSync performance audits and security reviews — plus the websites and SEO around your server brand.

Related guides