{"name":"remoteExecutedOwner","title":"remoteExecutedOwner","type":"command","url":"https://community.bistudio.com/wiki/remoteExecutedOwner","revid":365035,"updated":"2024-07-14T12:57:10Z","groups":["Multiplayer"],"status":"ok","games":{"arma3":"1.70"},"since":"arma3 1.70","arma3_since":"1.70","description":"Returns the machine network ID of the client that initiated Remote Execution.\n\n> [!IMPORTANT]\n> Running this command\n>\n> - in a Single Player environment\n> - outside of a remote-executed context\n> - in a remote-executed context received from a Headless Client\n>\n> will return **0** by design. To check if the context is remote executed, use isRemoteExecuted or isRemoteExecutedJIP.","syntaxes":[{"syntax":"remoteExecutedOwner","params":[],"returns":{"type":"Number","type_expr":"Number","description":"returns zero in the specific cases listed in the Description"},"form":"nullary"}],"examples":[{"code":["private _callerRE = remoteExecutedOwner;"]},{"text":"Send request to the server and get immediate response:\n\n```sqf\n{\n    // in this scope, the remoteExecutedOwner equals clientOwner of the sender\n    // so using it as target in remoteExec will send response right back at him\n    [\n        time, // mission time value on the server\n        {\n            hint format\n            [\n                \"Request received!\\nMission time value on the server is: %1\",\n                _this\n            ];\n        }\n    ]\n    remoteExec [\"call\", remoteExecutedOwner]; // server response to the sender\n}\nremoteExec [\"call\", 2]; // send request to server\n```","code":["{\n\t// in this scope, the remoteExecutedOwner equals clientOwner of the sender\n\t// so using it as target in remoteExec will send response right back at him\n\t[\n\t\ttime, // mission time value on the server\n\t\t{\n\t\t\thint format\n\t\t\t[\n\t\t\t\t\"Request received!\\nMission time value on the server is: %1\",\n\t\t\t\t_this\n\t\t\t];\n\t\t}\n\t]\n\tremoteExec [\"call\", remoteExecutedOwner]; // server response to the sender\n} \nremoteExec [\"call\", 2]; // send request to server"]}],"see_also":["isRemoteExecuted","isRemoteExecutedJIP","remoteExecutedJIPID","remoteExec","remoteExecCall","canSuspend","publicVariableClient","admin","owner","clientOwner","groupOwner","didJIPOwner"],"notes":[{"user":"Demellion","date":"2017-09-11T09:31:00Z","text":"Always be sure to check if the remoteExecutedOwner is not equal to 0 when sending a remoteExec/remoteExecCall packet back, as this will result in sending packet to ANYONE (0):\n\n```sqf\nif (remoteExecutedOwner isEqualTo 0) exitWith {}; // invalid RE owner\n_gearArray remoteExecCall ['someGearFunction', remoteExecutedOwner];\n```\n\nWill prevent from code being accidentally sent to everyone on the server."}],"categories_extra":["Arma 3: Remote Execution"]}