mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
884ae78704
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
30 lines
648 B
Plaintext
30 lines
648 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: commy2
|
|
* Unit joins a fire team.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
* 1: Team <STRING>
|
|
* 2: Display hint <BOOL> (default: false)
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [player, "YELLOW", false] call ace_interaction_fnc_joinTeam
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit", "_team", ["_displayHint", false, [false]]];
|
|
|
|
_unit assignTeam _team;
|
|
|
|
// display message
|
|
if (_displayHint && {_unit == ACE_player}) then {
|
|
private _team = localize format ["str_team_%1", _team];
|
|
private _message = format [LLSTRING(JoinedTeam), _team];
|
|
[_message] call EFUNC(common,displayTextStructured);
|
|
};
|