Skip to main content
TRACK B·YOUR FIRST RESOURCE·Verified June 2026 · Lua 5.4 · ox_lib 3.x
Learning with an AI assistant?
Copies this lesson plus 2026 ground rules (no lua54 'yes', Cfx.re Portal, correct callback signatures) as a ready-to-paste mentor prompt.

Anatomy of a resource

A FiveM resource is nothing more than a folder with a label card inside it. The label card is a file called fxmanifest.lua. It tells the server three things: what this folder is, which files belong to it, and which side each file runs on. In this lesson you build that folder by hand, one file at a time, and watch it start.

You'll build
A working resource named qu_hello: a folder with a manifest and three script files that each print on the correct side.
Time
~15 minutes
You need
Your server's resources folder open, txAdmin running, and the F8 console ready in game.
You'll learn
What fxmanifest.lua is, every line it needs, and how FiveM decides which file runs where.
BEFORE YOU START
fx_version 'cerulean'
game 'gta5'
CLIENT
client.lua
config.lua
SERVER
config.lua
server.lua
Click a manifest line to toggle it. Notice config.lua is a shared_script, so it loads on both sides; client and server files never cross.

Build it, one file at a time

Make the resource folder

An empty folder the server can find.

Inside your resources folder, make a new folder named exactly:

code
resources/qu_hello

The folder name is the resource name. Keep it lowercase with no spaces. You type this same name in server.cfg later, so spell it the same everywhere.

Create the manifest file

FiveM now recognises the folder as a resource.

Inside qu_hello, create a new file named exactly:

code
fxmanifest.lua

This is the label card. Without it, FiveM ignores the folder. The name must be exactly fxmanifest.lua, not manifest.lua, and not the old __resource.lua.

Write the manifest, line by line

The server knows which files to load and where.

Open fxmanifest.lua and type this. Each line is explained underneath.

code
fx_version 'cerulean'
game 'gta5'

author 'you'
description 'My first resource'

shared_script 'config.lua'
client_script 'client.lua'
server_script 'server.lua'
  • fx_version 'cerulean': the manifest format version. cerulean is the current one.
  • game 'gta5': which game this runs on. gta5 is FiveM. (rdr3 is RedM.)
  • shared_script: runs on both the server and every client. Use it for config and constants only.
  • client_script: runs on each player's PC. Drawing, key presses, NUI.
  • server_script: runs once on the server. Database, money, anything players must not control.

Create the three script files

Each side has one file with one print.

Still inside qu_hello, create three more files and put one print in each, so you can see where it runs.

code
-- config.lua  (shared)
print('[qu_hello] shared loaded')
code
-- client.lua
print('[qu_hello] hello from your CLIENT')
code
-- server.lua
print('[qu_hello] hello from the SERVER')

Your folder now looks like this:

code
resources/qu_hello/
  fxmanifest.lua
  config.lua
  client.lua
  server.lua

Tell the server to start it

The resource starts when the server boots.

Open your server.cfg file (it sits next to the resources folder). Add this line near the other ensure lines:

code
ensure qu_hello

ensure means "start this resource, and restart it if it was already running". The name after it must match the folder name exactly.

Restart and read the proof

You see your three prints split across two consoles.

Save every file. Then, in the live server console (or the txAdmin Live Console, reached from the txAdmin web panel on port 40120), type:

code
ensure qu_hello

Use ensure. It starts the resource if it is stopped and restarts it if it is already running, so it always works.

Now watch both consoles. The client lines only show once you are in the game world. Join your own server first: open Direct Connect in the FiveM client and connect to 127.0.0.1:30120. Until you are connected, only the two server-console lines appear. That is expected, because there is no client running yet.

The shared line prints on both sides. The server line prints only on the server. The client line prints only on your screen. That split is the whole point of the three script types.

Keep reading the full lesson

Sign in to start, then unlock every step of this lesson and the full FiveM School with a membership.

Still ahead in this lesson
  • If something went wrong
  • What you can do now
  • Try it yourself

The remainder of Anatomy of a resource is available to FiveM School members.