BIS fnc sideName: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
Line 1: Line 1:
 
<syntaxhighlight lang=javascript>/*
{{Function|= Comments
Author: Karel Moricky
____________________________________________________________________________________________
 
| arma3 |= Game name
 
|1.00|= Game version
____________________________________________________________________________________________
 
| <pre>/*


Description:
Description:
Line 20: Line 12:
*/
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
private ["_sideID","_sideName"];
____________________________________________________________________________________________
_sideID = [_this,0,sidelogic,[sidelogic,0]] call bis_fnc_param;
 
if (typename _sideID != typename 0) then {_sideID = _sideID call bis_fnc_sideID;};
| <!-- [] call [[BIS_fnc_sideName]]; --> |= Syntax
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also
 
}}
 
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
 
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
_sideName = [
[[Category:Function Group: Sides|{{uc:sideName}}]]
"STR_EAST",
[[Category:Functions|{{uc:sideName}}]]
"STR_WEST",
[[Category:{{Name|arma3}}: Functions|{{uc:sideName}}]]
"STR_GUERRILA",
"STR_CIVILIAN",
"STR_DN_UNKNOWN",
"STR_DISP_CAMPAIGN_ENEMY",
"STR_DISP_CAMPAIGN_FRIENDLY",
"STR_LOGIC",
"STR_EMPTY",
"STR_AMBIENT_LIFE"
] select _sideID;
localize _sideName;
</syntaxhighlight>

Revision as of 17:25, 21 November 2013

/*
	Author: Karel Moricky

	Description:
	Returns side name

	Parameter(s):
	0: SIDE or NUMBER - either side or side ID

	Returns:
	STRING
*/

private ["_sideID","_sideName"];
_sideID = [_this,0,sidelogic,[sidelogic,0]] call bis_fnc_param;
if (typename _sideID != typename 0) then {_sideID = _sideID call bis_fnc_sideID;};

_sideName = [
	"STR_EAST",
	"STR_WEST",
	"STR_GUERRILA",
	"STR_CIVILIAN",
	"STR_DN_UNKNOWN",
	"STR_DISP_CAMPAIGN_ENEMY",
	"STR_DISP_CAMPAIGN_FRIENDLY",
	"STR_LOGIC",
	"STR_EMPTY",
	"STR_AMBIENT_LIFE"
] select _sideID;
localize _sideName;