Last active
April 25, 2020 14:06
-
-
Save commy2/f681d4329542371c44efdfc5e0af38b2 to your computer and use it in GitHub Desktop.
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
// init.sqf | |
["weaponMode", { | |
params ["_unit", "_newWeaponMode", "_oldWeaponMode"]; | |
private _weapon = currentMuzzle _unit; | |
if (_newWeaponMode != "Single") then { | |
private _weapons = ["arifle_MX_F", "hlc_rifle_CQBR"]; | |
private _cfgWeapons = configFile >> "CfgWeapons"; | |
if (_weapons findIf {_weapon isKindOf [_x, _cfgWeapons]} != -1) then { | |
[_unit, _weapon, "Single"] call CBA_fnc_selectWeapon; | |
}; | |
}; | |
}, true] call CBA_fnc_addPlayerEventHandler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment