Radioman 6 Posted March 9, 2013 (edited) I'm needing to get the player object of a client who just connected dynamically. I'm thinking that I could use the "ObjectfromnetID" function, but I need to get the netID first. The only way I see on the A3 scripting commands BIKI page is to run "NetID" object, but I don't have the object, because that's what I'm trying to get.... Ideas? [90099] New: Added MP only scripting functions netId / objectFromNetId / groupFromNetId. ^ Added to Arma 2, but I can't find any additional notes on this build besides this.... Edited March 9, 2013 by Radioman Share this post Link to post Share on other sites
squeeze 22 Posted March 30, 2013 (edited) getting the player object from OnPlayerConnected can be a timing issue. this works for me on a server/client machine in 3 _cycles, just under 1 sec. init.sqf onPlayerConnected "nul=[_name, _uid] execVM ""Server\SQU_onPlayerConnected.sqf"""; SQU_onPlayerConnected.sqf _name = _this select 0; _uid = _this select 1; _clientId = -1; _cycles = 0; while{_clientId == -1}do { { if (getPlayerUID _x == _uid) exitWith { _clientId = owner _x; }; } forEach playableUnits; _cycles = _cycles + 1; sleep .02; }; diag_log format["JIP: _cycles = %1",_cycles]; _clientID publicVariableClient "SQU_valuesArray"; Edited March 30, 2013 by Squ33z3 Share this post Link to post Share on other sites
killzone_kid 1329 Posted March 30, 2013 I'm needing to get the player object of a client who just connected dynamically. I'm thinking that I could use the "ObjectfromnetID" function, but I need to get the netID first. The only way I see on the A3 scripting commands BIKI page is to run "NetID" object, but I don't have the object, because that's what I'm trying to get....Ideas? ^ Added to Arma 2, but I can't find any additional notes on this build besides this.... Probably not. As of version Arma2 1.04, _id will return a number in float format, something like 1.4253e+10. objectfromnetid expects string as per description. Share this post Link to post Share on other sites