{"name":"netId","operator":null,"title":"netId","type":"command","url":"https://community.bistudio.com/wiki/netId","revid":364973,"updated":"2024-07-04T17:25:50Z","groups":["Multiplayer"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.63"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Get the unique ID of an object or a group.","syntaxes":[{"syntax":"netId objOrGroup","since":null,"effect":null,"exec":null,"params":[{"name":"objOrGroup","type":"Object or Group","optional":false,"default":null,"description":null,"types":["Object","Group"],"since":null,"text":"objOrGroup: Object or Group"}],"returns":{"type":"String","types":["String"],"description":null,"text":"String"},"form":"unary","operator":null,"left":null,"right":{"text":"objOrGroup","types":["Object","Group"]}}],"examples":[{"text":"```sqf\n_playerNetId = netId player;\n```","code":["_playerNetId = netId player;"]}],"multiplayer":"- In singleplayer: Arma 3 v2.18 returns a net ID (different from BIS_fnc_netId's output), before that it returned an empty string in single player (see BIS_fnc_netId and BIS_fnc_objectVar)\n- In multiplayer: works as described","problems":null,"aliases":[],"see_also":["objectFromNetId","groupFromNetId","BIS_fnc_objectFromNetId","BIS_fnc_netId","BIS_fnc_groupFromNetId","BIS_fnc_objectVar"],"notes":[{"user":"Demellion","date":"2018-10-19T13:40:00Z","text":"Even if the returned value is in format of **owner:uniqueid**, it doesn't follow the current ownership of an object (owner for example).\n\nThis command keeps the **original owner** of a created object."}],"categories":["Arma 2: Operation Arrowhead: Scripting Commands","Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Introduced with Arma 3 version 0.50","Scripting Commands"]}