2016-04-10 15:25:24 +00:00
|
|
|
/*
|
|
|
|
Author: IT07
|
|
|
|
|
|
|
|
Description: checks the side of given unit and returns it
|
|
|
|
|
|
|
|
Params:
|
|
|
|
_this: STRING - unit classname
|
|
|
|
|
|
|
|
Returns: SIDE - unit's side
|
|
|
|
*/
|
|
|
|
|
2016-04-13 20:28:31 +00:00
|
|
|
private ["_return"];
|
2016-04-10 15:25:24 +00:00
|
|
|
if (_this isEqualType "") then
|
|
|
|
{
|
2016-04-13 20:28:31 +00:00
|
|
|
private ["_cfg"];
|
2016-04-10 15:25:24 +00:00
|
|
|
_cfg = configFile >> "CfgVehicles" >> _this >> "faction";
|
|
|
|
if not isNull _cfg then
|
|
|
|
{
|
2016-04-16 11:11:18 +00:00
|
|
|
scopeName "isNull";
|
2016-04-13 20:28:31 +00:00
|
|
|
private ["_faction"];
|
2016-04-10 15:25:24 +00:00
|
|
|
_faction = getText _cfg;
|
2016-04-16 11:11:18 +00:00
|
|
|
if (_faction isEqualTo "BLU_G_F") then
|
2016-04-10 15:25:24 +00:00
|
|
|
{
|
2016-04-16 11:11:18 +00:00
|
|
|
_return = WEST;
|
|
|
|
breakOut "isNull";
|
|
|
|
};
|
|
|
|
if (_faction isEqualTo "CIV_F") then
|
|
|
|
{
|
|
|
|
_return = civilian;
|
|
|
|
breakOut "isNull";
|
|
|
|
};
|
|
|
|
if (_faction isEqualTo "IND_F") then
|
|
|
|
{
|
|
|
|
_return = independent;
|
|
|
|
breakOut "isNull";
|
|
|
|
};
|
|
|
|
if (_faction isEqualTo "IND_G_F") then
|
|
|
|
{
|
|
|
|
_return = resistance;
|
|
|
|
breakOut "isNull";
|
|
|
|
};
|
|
|
|
if (_faction isEqualTo "OPF_F") then
|
|
|
|
{
|
|
|
|
_return = EAST;
|
2016-04-10 15:25:24 +00:00
|
|
|
};
|
|
|
|
};
|
2016-04-16 11:11:18 +00:00
|
|
|
_return
|
2016-04-10 15:25:24 +00:00
|
|
|
};
|