BIS fnc getFactions: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| arma2 |Game name= | | arma2 |Game name= | ||
Line 7: | Line 6: | ||
|gr1 = Sides |GROUP1= | |gr1 = Sides |GROUP1= | ||
| Gets list and sides of current factions. |DESCRIPTION= | | Gets list and sides of current factions. |DESCRIPTION= | ||
| [parameter] call [[BIS_fnc_getFactions]] |SYNTAX= | | [parameter] call [[BIS_fnc_getFactions]] |SYNTAX= | ||
Line 24: | Line 21: | ||
* [[Array]] of [[Side|Sides]] | * [[Array]] of [[Side|Sides]] | ||
* [[Number]] - an index |RETURNVALUE= | * [[Number]] - an index |RETURNVALUE= | ||
|x1= <code>[[call]] [[BIS_fnc_getFactions]]; {{codecomment|// returns all factions}}</code> |EXAMPLE1= | |x1= <code>[[call]] [[BIS_fnc_getFactions]]; {{codecomment|// returns all factions}}</code> |EXAMPLE1= | ||
Line 37: | Line 33: | ||
|x6= <code><nowiki>[[</nowiki>[[player]]]] [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// will return player's side}}</code> |EXAMPLE6= | |x6= <code><nowiki>[[</nowiki>[[player]]]] [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// will return player's side}}</code> |EXAMPLE6= | ||
| [[faction]], [[side]] |SEEALSO= | | [[faction]], [[side]] |SEEALSO= |
Revision as of 23:10, 16 January 2021
Description
Syntax
- Syntax:
- [parameter] call BIS_fnc_getFactions
- Parameters:
- parameter:
- Return Value:
Examples
- Example 1:
call BIS_fnc_getFactions; // returns all factions
- Example 2:
[] call BIS_fnc_getFactions; // same as Example 1
- Example 3:
[player] call BIS_fnc_getFactions; // returns index of player's faction
- Example 4:
["BLU_F"] call BIS_fnc_getFactions; // returns index of given faction
- Example 5:
[[]] call BIS_fnc_getFactions; // will return all faction sides
- Example 6:
[[player]] call BIS_fnc_getFactions; // will return player's side
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note