-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't use 'apply retroactively' for non init events
- Loading branch information
Showing
2 changed files
with
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* ---------------------------------------------------------------------------- | ||
Function: CBA_fnc_itemType | ||
Description: | ||
A function used to return the kind of an item. | ||
Parameters: | ||
_item - Any kind of item, weapon or magazine class name <STRING> | ||
Returns: | ||
_type - Description of the item. <STRING> | ||
Example: | ||
(begin example) | ||
currentWeapon player call CBA_fnc_itemType; // pistol | ||
(end) | ||
Author: | ||
commy2 | ||
---------------------------------------------------------------------------- */ | ||
#include "script_component.hpp" | ||
SCRIPT(getItemConfig); | ||
|
||
params [["_weapon", "", [""]]]; | ||
|
||
private _result = configNull; | ||
|
||
{ | ||
private _config = configFile >> _x >> _weapon; | ||
|
||
if (isClass _config) exitWith { | ||
_result = _config; | ||
}; | ||
} forEach ["CfgWeapons", "CfgMagazines", "CfgGlasses"]; | ||
|
||
_result |
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