{"name":"BIS_fnc_getFactions","operator":null,"title":"BIS fnc getFactions","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_getFactions","revid":327746,"updated":"2022-07-13T11:00:20Z","groups":["Sides"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Gets list and sides of current factions.","syntaxes":[{"syntax":"[parameter] call BIS_fnc_getFactions","since":null,"effect":null,"exec":null,"params":[{"name":"parameter","type":null,"optional":false,"default":null,"description":"- Nothing or empty Array - returns all factions\n- Object - returns index of the object side\n- Array - side of the first element is returned, others are ignored","types":[],"since":null,"text":"parameter:\n- Nothing or empty Array - returns all factions\n- Object - returns index of the object side\n- Array - side of the first element is returned, others are ignored"}],"returns":{"type":"- Array of Strings","types":["Array","String"],"description":"Array of Sides - Number - an index","text":"- Array of Strings\n- Array of Sides\n- Number - an index"}}],"examples":[{"text":"```sqf\ncall BIS_fnc_getFactions; // returns all factions\n```","code":["call BIS_fnc_getFactions; // returns all factions"]},{"text":"```sqf\n[] call BIS_fnc_getFactions; // same as Example 1\n```","code":["[] call BIS_fnc_getFactions; // same as Example 1"]},{"text":"```sqf\n[player] call BIS_fnc_getFactions; // returns index of player's faction\n```","code":["[player] call BIS_fnc_getFactions; // returns index of player's faction"]},{"text":"```sqf\n[\"BLU_F\"] call BIS_fnc_getFactions; // returns index of given faction\n```","code":["[\"BLU_F\"] call BIS_fnc_getFactions; // returns index of given faction"]},{"text":"```sqf\n[[]] call BIS_fnc_getFactions; // will return all faction sides\n```","code":["[[]] call BIS_fnc_getFactions; // will return all faction sides"]},{"text":"```sqf\n[[player]] call BIS_fnc_getFactions; // will return player's side\n```","code":["[[player]] call BIS_fnc_getFactions; // will return player's side"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["faction","side"],"notes":[],"categories":["Arma 2: Functions","Arma 2: New Functions","Arma 2: Operation Arrowhead: Functions","Arma 3: Functions","Function Group: Sides","Functions","Introduced with Arma 2 version 1.00","Take On Helicopters: Functions"],"docblock":null,"filled_from_docblock":[]}