remoteExecutedOwner: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
|arma3 | |arma3 | ||
|1.70 | |1.70 | ||
|arg | |arg= | ||
|eff | |eff= | ||
|serverExec= |Exec= | |serverExec= |Exec= | ||
|gr1 = Multiplayer | |gr1 = Multiplayer | ||
| Returns the [[Multiplayer_Scripting#Machine_network_ID | machine network ID]] of the client that initiated [[Remote Execution]]. If used in SP or outside of remote executed context, the command returns 0. | | Returns the [[Multiplayer_Scripting#Machine_network_ID | machine network ID]] of the client that initiated [[Remote Execution]]. If used in SP or outside of remote executed context, the command returns 0. | ||
{{Informative | To check if the context is remote executed, use [[isRemoteExecuted]] or [[isRemoteExecutedJIP]].}} | {{Informative | To check if the context is remote executed, use [[isRemoteExecuted]] or [[isRemoteExecutedJIP]].}} | ||
| [[remoteExecutedOwner]] | | [[remoteExecutedOwner]] | ||
| [[Number]] | | [[Number]] | ||
|x1= <code>_callerRE = [[remoteExecutedOwner]];</code> | |x1= <code>_callerRE = [[remoteExecutedOwner]];</code> | ||
|x2= Send request to the server and get immediate response: | |x2= Send request to the server and get immediate response: | ||
Line 33: | Line 33: | ||
[[remoteExec]] ["call", [[remoteExecutedOwner]]]; {{cc|server response to the sender}} | [[remoteExec]] ["call", [[remoteExecutedOwner]]]; {{cc|server response to the sender}} | ||
} | } | ||
[[remoteExec]] ["call", 2]; {{cc|send request to server}}</code> | [[remoteExec]] ["call", 2]; {{cc|send request to server}}</code> | ||
| [[isRemoteExecuted]], [[isRemoteExecutedJIP]], [[remoteExec]], [[remoteExecCall]], [[canSuspend]], [[publicVariableClient]], [[admin]], [[owner]], [[clientOwner]], [[groupOwner]], [[didJIPOwner]] | | [[isRemoteExecuted]], [[isRemoteExecutedJIP]], [[remoteExec]], [[remoteExecCall]], [[canSuspend]], [[publicVariableClient]], [[admin]], [[owner]], [[clientOwner]], [[groupOwner]], [[didJIPOwner]] | ||
}} | }} | ||
Revision as of 01:25, 18 January 2021
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.
- 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.