|Description:||IMPORTANT: This function only works when VBS is started with the -gateway switch.|
Sends script commands as strings through the active adaptors to connected clients. If the Script Datum ID matches in the settings files, the script is executed by the other Gateway clients.
|Syntax:||[command, datumID] call Gateway_SendCommand|
When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.
// Runs the hint script command to display 'hello world' on connected client [ " hint 'hello world'; " ] call Gateway_SendCommand;
// Displays the position of the connected player, which should be different for each client [ " hintC format[ '%1', position player ]; " ] call Gateway_SendCommand;
// Displays the position of the sending player [ format[ "hintC %1", position player ] ] call Gateway_SendCommand;
// Displays the position of the sending player with datum ID 5 [ format[ "hintC %1", position player ], 5 ] call Gateway_SendCommand;
|Multiplayer:||The function returns nil, if not used in multiplayer or when Gateway is not active (the |
- Gateway 1.2 only supports sending the first command. MAK RTI using RPR1 only supports sending the first command. There is no character limit, but network traffic may impose limitations.