What are FiveM Resources?
Resources are the building blocks of FiveM servers. Each resource is a self-contained package that provides specific functionality to the server and its players.
Standard Resource Structure
my-resource/
fxmanifest.lua
client/
main.lua
server/
main.lua
shared/
config.lua
html/
index.htmlfxmanifest.lua
The manifest file defines resource metadata and script assignments:
fx_version 'cerulean'
game 'gta5'
client_scripts {
'client/main.lua'
}
server_scripts {
'server/main.lua'
}
shared_scripts {
'shared/config.lua'
}
ui_page 'html/index.html'
files {
'html/index.html',
'html/style.css',
'html/script.js'
}
dependency 'qb-core'Script Types
Run on each player game client. Used for UI, input handling, and local game logic.
Run on the game server. Used for database access, validation, and server-side logic.
Run on both client and server. Typically used for configuration and utility functions.
NUI (NativeUI)
The html/ directory contains web-based UI files. The ui_page field in the manifest specifies the entry point. NUI interfaces communicate with client scripts via JavaScript messaging.