Create a basic FiveM script from zero
Every FiveM resource starts with three things: a folder, a manifest, and a script. This lesson builds the simplest possible resource - one that prints to console, responds to a chat command, and detects a key press. By the end you understand the skeleton that every other lesson builds on.
Build it
Create the folder and manifest
resources/qu_first_script/
fxmanifest.lua
client.lua
fx_version 'cerulean'
game 'gta5'
client_script 'client.lua'
Restart the resource: ensure qu_first_script in server console or txAdmin Live Console.
Print to console on resource start
-- Runs once when the resource starts
CreateThread(function()
print('Hello from my first script!')
end)
Open F8 in-game. Restart the resource with ensure qu_first_script. You should see your message.