-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added cScripts and loadout chat command to give you cscripts version …
…and loadout name (#1211)
- Loading branch information
1 parent
821eb42
commit 3ff55ca
Showing
3 changed files
with
42 additions
and
0 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
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,30 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: CPL.Brostrom.A | ||
* This function return a units current loadouts displayname. | ||
* | ||
* Arguments: | ||
* 0: Unit <Object> | ||
* | ||
* Return Value: | ||
* Loadout name <STRING> | ||
* | ||
* Example: | ||
* [player] call cScripts_fnc_gear_getLoadoutDisplayName; | ||
* [cursorObject] call cScripts_fnc_gear_getLoadoutDisplayName; | ||
* | ||
*/ | ||
|
||
params [["_unit", objNull, [objNull]]]; | ||
|
||
private _loadout = [_unit] call EFUNC(gear,getLoadoutName); | ||
|
||
private _missionConfig = missionConfigFile >> "CfgLoadouts" >> _loadout; | ||
private _displayName = getText (_missionConfig >> "displayName"); | ||
|
||
if (_displayName == "") then { | ||
private _config = configFile >> "CfgLoadouts" >> _loadout; | ||
_displayName = getText (_config >> "displayName"); | ||
}; | ||
|
||
_displayName |
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