Run a FiveM client (F8) console command
client_commandRuns a local console command in a running FiveM client's F8 console over devcon without focusing the game window, then returns the console output.
Instructions
Type a LOCAL console command into the running Legacy client's F8 console over devcon — no screen focus needed, nothing is typed into the game window. This is the process's console context (connect, quit, tooling commands), NOT the chat command layer: commands registered with RegisterCommand are chat commands and live in a different system (run them through server_command, which has console privileges, or drive the chat UI with the M2 input tools). Waits until output goes quiet and returns the lines the client console printed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Command text, e.g. 'connect localhost:30120' | |
| timeoutMs | No | Max ms to wait for output (default 5000) | |
| waitForOutput | No | Set false to fire without waiting (long-loading maps, blocking commands) |