Mastering the console is the fastest way to transform your FiveM server from a basic playground into a fully moderated community space. While scripts provide the framework, it is the direct interaction through fivem / commands that allows administrators to manage player behavior, troubleshoot issues, and dynamically shape the world in real-time. This guide breaks down the essential commands, execution methods, and best practices for anyone looking to take control of their server.
Understanding Server Authority and Client Execution
The foundation of effective command usage lies in understanding the distinction between server and client execution. In the FiveM architecture, the server is the ultimate authority, managing game state and rules, while clients are the individual players' machines. Because of this separation, not all commands work everywhere. Server-side scripts can trigger events and modify the game state for everyone, whereas client-side scripts can only affect the person running the command or their immediate local environment. Using the wrong context results in failure, making it critical to know which commands require admin privileges on the server console versus those executed in-game by a player.
The In-Game Admin Command Structure
Most servers utilize a permission framework like ESX or QBCore, which gates access to specific functions based on a player's job or group rank. For example, a police officer might have access to /jail or /handcuff, while a civilian does not. These in-game commands usually follow a consistent syntax: a forward slash, the command name, and then any required arguments like a player ID or reason text. The efficiency of these systems relies on the underlying fivem / commands handled by the server script, which validates the player's permissions before executing the action. This ensures that the server remains stable and that only authorized users can enforce rules.
Essential Server Console Commands
While in-game commands are useful for players, the server console is where the true power resides. Accessing the console allows an administrator to restart services, ban persistent troublemakers, and monitor resource performance without relying on player permissions. The following list details the critical commands that form the backbone of server maintenance:
start [resource]: Used to manually start a resource if it fails to load automatically or after a stop command.
stop [resource]: Immediately halts a running resource, which is useful for troubleshooting a specific script that is causing lag or crashes.
restart [resource]: The standard procedure for applying configuration changes or script updates without fully rebooting the server.
ban [id] [time] [reason]: The definitive moderation tool that prevents a specific player from ever connecting to the server again.
exec [file.cfg]: Runs a configuration file directly on the server, allowing for rapid deployment of settings changes.
setvar [name] [value]: Dynamically changes server variables, such as gravity or weather cycles, without editing files.
Managing Players and Sessions
Active player management is a daily task for server administrators, and the console provides specific tools for handling sessions. If a player is experiencing a timeout or a stuck animation, kicking them from the server is often the quickest fix. Similarly, identifying who is currently online helps regulate population limits and community engagement. These actions are executed with precision using specific identifiers, ensuring that the correct session is targeted without disrupting the entire server population.
playerid [nameOrId]: Kicks a specific player by their numeric ID or partial name match.
players: Lists all currently connected players, displaying their IDs, endpoints, and identifiers.
stop: Gracefully shuts down the server, closing all connections and saving data where applicable.