Start, restart, stop: your daily dev loop
FiveM development is mostly one small loop: edit, save, ensure, read the console, test. Beginners often think they need more tricks than that. They do not. This lesson makes that loop feel normal, and teaches the four server commands that drive it so you always know which one to reach for.
Build it
Make the resource folder
Inside your server's resources folder, create this folder:
resources/qu_dev_loop
Create the files
Create this exact file layout:
resources/qu_dev_loop/
fxmanifest.lua
server.lua
Write fxmanifest.lua
Open fxmanifest.lua and paste this:
fx_version 'cerulean'
game 'gta5'
server_script 'server.lua'
Older tutorials add a lua54 'yes' line here. As of June 2025 that setting is deprecated and ignored: Lua 5.4 is now the only Lua runtime, so you leave it out.
Write the lesson code
Open server.lua and paste this:
print('[qu_dev_loop] resource started')
RegisterCommand('dev_loop', function()
print('[qu_dev_loop] command fired')
end, false)
There are two prints on purpose. The first one is at the top level of the file, so it runs the moment the resource starts. That is what proves your restart actually reloaded the code. The second one lives inside a command handler, so it only runs when you type the command.
Start and test it
Open server.cfg and add this line:
ensure qu_dev_loop
Save the file. Because this folder is brand new, the running server has not scanned it yet, so first tell it to look, in the txAdmin Live Console (the server console):
refresh
Then start the resource, also from the server console:
ensure qu_dev_loop
Use ensure, not restart, the first time: the resource has not started yet this session, and restart only reloads a resource that is already running, so it would do nothing here. (Once the resource is already up, restart is the command you use after each edit.) You should see the start line print immediately. Now run the command, also from the server console:
dev_loop
Keep reading the full lesson
Sign in to start, then unlock every step of this lesson and the full FiveM School with a membership.
- How it works
- If something went wrong
- What you can do now
- Try it yourself
The remainder of Start, restart, stop: the dev loop is available to FiveM School members.