Hello,
When we remoteExec a script on the server, we can use remoteExecutedOwner to get the id of the player which initiated Remote Execution call.
If I want to get the player object associated to this id, I need to loop through the whole player list and compare owner _x to remoteExecutedOwner.
_unit = objNull; { if (owner _x isEqualTo remoteExecutedOwner) exitWith {_unit = _x}; } foreach playableUnits; diag_log name _unit;
Another solution is to provide the player in the script parameters like
[param1, param2, player] remoteExec ["myScript", 2]; // client side
params ["_param1", "_param2", "_unit"]; // server side diag_log name _unit;
And another solution could be to store all ids and objects within the onPlayerConnected event, in a global variable serverside...
As these solutions are not optimal, I think that it would be useful to have a command, to directly get the player object associated with a client ID.