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.
- Setup Git, Node.js, and pnpm.
- Download and setup MariaDB 11.4+ (opens in a new tab).
- Run the following commands in your CLI (e.g. Terminal, Command Prompt).
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
.
- Default:
ox:characterSlots
- Default:
1
- Sets the number of character slots available for character selection resources (e.g. ox_charselect).
- Default:
ox:plateFormat
- Default:
"........"
- See SET_DEFAULT_VEHICLE_NUMBER_PLATE_TEXT_PATTERN (opens in a new tab).
- Default:
ox:deathSystem
- Default:
true
- Enables the built-in death and respawn system.
- Default:
ox:characterSelect
- Default:
true
- Enables built-in character registration, and uses that character when joining.
- Default:
ox:spawnLocation
- Default:
[-258.211, -293.077, 21.6132, 206.0]
- Sets the default spawn location for newly created characters.
- Default: