remoteExecutedOwner: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Added link to https://community.bistudio.com/wiki/Multiplayer_Scripting#Machine_network_ID)
mNo edit summary
Line 6: Line 6:
|eff=  |Multiplayer Effects=
|eff=  |Multiplayer Effects=
|serverExec= |Exec=
|serverExec= |Exec=
|gr1 = Multiplayer |GROUP1=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 50: Line 52:
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Arma 3: Remote Execution]]
[[Category:Arma 3: Remote Execution]]
[[Category:Command Group: Multiplayer|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->

Revision as of 14:21, 18 September 2020

Hover & click on the images for description

Description

Description:
Returns the machine network ID of the client that initiated Remote Execution. If used in SP or outside of remote executed context, the command returns 0.
To check if the context is remote executed, use isRemoteExecuted or isRemoteExecutedJIP.
Groups:
Multiplayer

Syntax

Syntax:
remoteExecutedOwner
Return Value:
Number

Examples

Example 1:
_callerRE = remoteExecutedOwner;
Example 2:
Send request to the server and get immediate response: { // in this scope, the remoteExecutedOwner equals clientOwner of the sender // so using it as target in remoteExec will send response right back at him [ time, // mission time value on the server { hint format [ "Request recieved!\nMission time value on the server is: %1", _this ]; } ] remoteExec ["call", remoteExecutedOwner]; // server response to the sender } remoteExec ["call", 2]; // send request to server

Additional Information

See also:
isRemoteExecutedisRemoteExecutedJIPremoteExecremoteExecCallcanSuspendpublicVariableClientadminownerclientOwnergroupOwnerdidJIPOwner

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Bottom Section

Posted on September 11, 2017 - 09:31 (UTC)
Demellion
NOTE: 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): if (remoteExecutedOwner isEqualTo 0) exitWith {}; // invalid RE owner _gearArray remoteExecCall ['someGearFunction', remoteExecutedOwner]; Will prevent from code being accidentally sent to everyone on the server.