{"name":"setGroupOwner","operator":null,"title":"setGroupOwner","type":"command","url":"https://community.bistudio.com/wiki/setGroupOwner","revid":364895,"updated":"2024-06-29T14:38:33Z","groups":["Multiplayer"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.40"}],"since":{"game":"arma3","name":"Arma 3","version":"1.40"},"arma3_since":"1.40","branch":null,"locality":{"argument":null,"effect":null,"server_exec":true},"exec":null,"description":"Changes the ownership of a group (and all its units) to a given client. The group leader must not be a player. This command only works when called from the server. Returns true if locality was changed. For agents use setOwner command.","syntaxes":[{"syntax":"group setGroupOwner clientID","since":null,"effect":null,"exec":null,"params":[{"name":"group","type":"Group","optional":false,"default":null,"description":null,"types":["Group"],"since":null,"text":"group: Group"},{"name":"clientID","type":"Number","optional":false,"default":null,"description":"the machine network ID of the new owner.","types":["Number"],"since":null,"text":"clientID: Number - the machine network ID of the new owner."}],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"text":"Boolean"},"form":"binary","operator":null,"left":{"text":"group","types":["Group"]},"right":{"text":"clientID","types":["Number"]}}],"examples":[{"text":"```sqf\n_localityChanged = _someGroup setGroupOwner (owner _playerObject);\n```","code":["_localityChanged = _someGroup setGroupOwner (owner _playerObject);"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["owner","setOwner","groupOwner"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Introduced with Arma 3 version 1.40","Scripting Commands","Scripting Commands: Server Execution"]}