2015-01-11 19:32:51 +00:00
|
|
|
// by commy2
|
2015-01-11 23:13:47 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 19:32:51 +00:00
|
|
|
|
|
|
|
private ["_unit", "_team", "_message"];
|
|
|
|
|
|
|
|
_unit = _this select 0;
|
|
|
|
_team = _this select 1;
|
|
|
|
|
2015-01-11 23:13:47 +00:00
|
|
|
_unit setVariable [QGVAR(assignedFireTeam), _team, true];
|
|
|
|
[_unit, format ["{_this assignTeam '%1'}", _team]] call EFUNC(core,execRemoteFnc);
|
2015-01-11 19:32:51 +00:00
|
|
|
|
2015-01-12 04:20:02 +00:00
|
|
|
if (_unit == ACE_player) then {
|
2015-01-11 19:32:51 +00:00
|
|
|
_message = if (_team == "MAIN") then {
|
2015-01-12 04:20:02 +00:00
|
|
|
localize "STR_ACE_Interaction_LeftTeam";
|
2015-01-11 19:32:51 +00:00
|
|
|
} else {
|
2015-01-12 04:20:02 +00:00
|
|
|
_team = localize format ["STR_ACE_Interaction_Team%1", _team];
|
|
|
|
format [localize "STR_ACE_Interaction_JoinedTeam", _team];
|
2015-01-11 19:32:51 +00:00
|
|
|
};
|
|
|
|
|
2015-01-11 23:13:47 +00:00
|
|
|
[_message] call EFUNC(core,displayTextStructured);
|
2015-01-11 19:32:51 +00:00
|
|
|
};
|