-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89ee0ee
commit 5c6da4b
Showing
9 changed files
with
113 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
PREP(getCallsign); | ||
PREP(getShortDesignation); | ||
PREP(getUnitDesignation); | ||
PREP(setCallsign); | ||
PREP(getBillet); | ||
PREP(getDesignation); | ||
PREP(getUnitCallsign); | ||
PREP(getUnitTeam); | ||
PREP(setUniqCallsign); | ||
PREP(setUnitTeam); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...try/functions/fnc_getShortDesignation.sqf → addons/infantry/functions/fnc_getBillet.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: SGT.Brostrom.A | ||
* This function get team color based on you unit prefix | ||
* | ||
* Arguments: | ||
* 0: Unit <OBJECT> | ||
* | ||
* Return Value: | ||
* Color Name <STRING> | ||
* | ||
* Example: | ||
* [player] call cav_infantry_fnc_getUnitTeam; | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params [["_unit", objNull, [objNull]]]; | ||
|
||
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName"); | ||
_displayName = _displayName splitString " "; | ||
_team = _displayName#0; | ||
_teamUpper = toUpper _team; | ||
|
||
private _color = switch (_teamUpper) do { | ||
case "ALPHA": {"RED"}; | ||
case "BRAVO": {"BLUE"}; | ||
case "CHARLIE": {"GREEN"}; | ||
case "DELTA": {"YELLOW"}; | ||
default {"MAIN"}; | ||
}; | ||
|
||
_color; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: SGT.Brostrom.A | ||
* This function sets your team name based on your units prefix | ||
* | ||
* Arguments: | ||
* 0: Unit <OBJECT> | ||
* | ||
* Return Value: | ||
* Unit Callsign <STRING> | ||
* | ||
* Example: | ||
* [player] call cav_infantry_fnc_setUnitTeam; | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params [["_unit", objNull, [objNull]]]; | ||
|
||
private _color = [_unit] call FUNC(getUnitTeam); | ||
|
||
if (assignedTeam _unit == _color) exitWith {INFO_1("Team color for unit already set %1",_unit);false}; | ||
|
||
[_unit, _color] call ace_interaction_fnc_joinTeam; | ||
|
||
INFO_2("%1 have joind team %2.", _unit, _color); | ||
Check warning on line 26 in addons/infantry/functions/fnc_setUnitTeam.sqf GitHub Actions / hemttpadding a macro argument
Check warning on line 26 in addons/infantry/functions/fnc_setUnitTeam.sqf GitHub Actions / hemttpadding a macro argument
Check warning on line 26 in addons/infantry/functions/fnc_setUnitTeam.sqf GitHub Actions / hemttpadding a macro argument
|
||
|
||
true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters