Jump to content
Sign in to follow this  
sammael

Remove all smoke grenades

Recommended Posts

I try to make simply mod to remove ALL smoke grenades from AI. Or disable use of them.  I think this code is wrong..

class CfgPatches
{

{
	private _unit = _x;
	if (side _unit == east) then {
		{
			private _magazine = _x;
			if ("smoke" in (toLower (getText (configfile >> "CfgMagazines" >> _magazine >> "DisplayName")))) then {
				_unit removeMagazineGlobal _magazine;
			};
		} forEach (magazines _unit);
	};
} forEach allUnits;
{
	private _unit = _x;
	if (side _unit == west) then {
		{
			private _magazine = _x;
			if ("smoke" in (toLower (getText (configfile >> "CfgMagazines" >> _magazine >> "DisplayName")))) then {
				_unit removeMagazineGlobal _magazine;
			};
		} forEach (magazines _unit);
	};
} forEach allUnits;
{
	private _unit = _x;
	if (side _unit == resistance) then {
		{
			private _magazine = _x;
			if ("smoke" in (toLower (getText (configfile >> "CfgMagazines" >> _magazine >> "DisplayName")))) then {
				_unit removeMagazineGlobal _magazine;
			};
		} forEach (magazines _unit);
	};
} forEach allUnits;
};

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×