BIS fnc getFactions: Difference between revisions
Jump to navigation
Jump to search
m (template:command argument fix) |
m (template:command argument fix) |
||
Line 16: | Line 16: | ||
* [[Object]] - returns index of the object side | * [[Object]] - returns index of the object side | ||
* [[Array]] - [[side]] of the first element is returned, others are ignored | * [[Array]] - [[side]] of the first element is returned, others are ignored | ||
|= | |PARAMETER1= | ||
| | | | ||
Line 24: | Line 24: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>[[call]] [[BIS_fnc_getFactions]]; {{codecomment|// returns all factions}}</code> |= | |x1= <code>[[call]] [[BIS_fnc_getFactions]]; {{codecomment|// returns all factions}}</code> |EXAMPLE1= | ||
|x2= <code>[] [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// same as ''Example 1''}}</code> |= | |x2= <code>[] [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// same as ''Example 1''}}</code> |EXAMPLE2= | ||
|x3= <code><nowiki>[</nowiki>[[player]]] [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// returns index of player's faction}}</code> |= | |x3= <code><nowiki>[</nowiki>[[player]]] [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// returns index of player's faction}}</code> |EXAMPLE3= | ||
|x4= <code>["BLU_F"] [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// returns index of given faction}}</code> |= | |x4= <code>["BLU_F"] [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// returns index of given faction}}</code> |EXAMPLE3= | ||
|x5= <code><nowiki>[[]]</nowiki> [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// will return all faction sides}}</code> |= | |x5= <code><nowiki>[[]]</nowiki> [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// will return all faction sides}}</code> |EXAMPLE4= | ||
|x6= <code><nowiki>[[</nowiki>[[player]]]] [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// will return player's side}}</code> |= | |x6= <code><nowiki>[[</nowiki>[[player]]]] [[call]] [[BIS_fnc_getFactions]]; {{codecomment|// will return player's side}}</code> |EXAMPLE5= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 14:30, 7 April 2019
Description
- Description:
- Gets list and sides of current factions.
- Execution:
- call
- Groups:
- Uncategorised
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