# remoteExec ## Category Multiplayer ## Arity **Binary** — ` remoteExec [commandName, target, isJip]`. ``` remoteExec // [commandName, target, isJip] ``` ## Description Schedules remote execution of a command on target machines. The left operand is passed as arguments. The right operand is an array: - `commandName` — string name of the command/function to execute - `target` — who executes it: - `0` = everyone - `2` = server only - `-2` = everyone except server - Client ID = specific client - `isJip` — boolean: should Join-In-Progress clients also execute? Uses `spawn` semantics (async). The command must be registered on the target machine. **Placeholder/stub** — full networking implementation is the host's responsibility. ## How It Works Fires the host's remote execution event. The host must implement the actual network transport (UDP/TCP, serialization, client tracking). The command name and args are serialized and sent to target machines. ## Usage ```sqf // Execute everywhere [params] remoteExec ["fn_process", 0, false]; // Execute on server only [data] remoteExec ["fn_saveToDB", 2, false]; // Execute everywhere except server [notification] remoteExec ["fn_showHint", -2, false]; // Execute on specific client [message] remoteExec ["fn_displayChat", _clientId, false]; ``` > **Note**: Full networking requires host implementation. See `docs/multiplayer.md`. ## Thread Safety Depends on host implementation. The stub is thread-safe. ## See Also - [remoteExecCall](remoteExecCall.md) — remote exec with call semantics - [publicVariable](publicVariable.md) — broadcast variable - [spawnOn](spawnOn.md) — cross-scheduler spawn (local only)