wait_for
Polls FiveM state every 250 ms until one condition matches: NUI focus, NUI text/selector, server or client log regex, or resource start/stop state. Use it to synchronize test steps with the game.
Instructions
Wait until exactly one condition holds, polling every 250 ms: nuiFocused, nui (text or selector present/absent in a resource's NUI), serverLog or clientLog (regex on new lines), or resourceState.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "wait_for"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nui | No | ||
| player | No | ||
| server | No | ||
| clientLog | No | ||
| serverLog | No | ||
| timeoutMs | No | ||
| nuiFocused | No | ||
| resourceState | No |