Ox Core

Ox Core

A modern FiveM framework, designed to properly support features like OneSync, statebags, and server-side entities.

txAdmin recipe

If you're looking to quickly install and setup ox_core, try using our recipe (opens in a new tab).

Installation

We strongly recommend referring to Guides to setup necessary development tools.

Install all resource dependencies.

Download the latest release (opens in a new tab) or build the source code.

git clone https://github.com/overextended/ox_core.git
cd ox_core
pnpm i
pnpm build

Install optional dependencies.

These resources aren't strictly required, but they are strongly recommended.

Using ox_core in your resources

Lua

You can import ox_core definitions by loading @ox_core/lib/init.lua into your resource.

This can be a client_script or server_script, if preferred.

shared_script '@ox_core/lib/init.lua'

JavaScript

To use ox_core with your JavaScript resources you'll need to use our npm package, providing full support for TypeScript and Intellisense.

To get started, try our fivem-typescript-boilerplate (opens in a new tab) and install the ox_core package.

pnpm i @overextended/ox_core

Config

Resource configuration is handled using convars (opens in a new tab).

Replicated

These convars should use the setr command to be read by clients.

  • ox:debug
    • Default: false
    • Enables debug messages and commands. Also allows players to have the same identifiers. Enabled by default when using pnpm watch.
  • ox:characterSlots
    • Default: 1
    • Sets the number of character slots available for character selection resources (e.g. ox_charselect).
  • ox:plateFormat
  • ox:deathSystem
    • Default: true
    • Enables the built-in death and respawn system.
  • ox:characterSelect
    • Default: true
    • Enables built-in character registration, and uses that character when joining.
  • ox:spawnLocation
    • Default: [-258.211, -293.077, 21.6132, 206.0]
    • Sets the default spawn location for newly created characters.