2015-08-31 04:51:06 +00:00
|
|
|
/*
|
|
|
|
DMS_FindSuppressor
|
|
|
|
Taken from WAI
|
2015-08-31 20:28:01 +00:00
|
|
|
Modified by eraser1 & Defent
|
2015-08-31 04:51:06 +00:00
|
|
|
|
|
|
|
Usage:
|
|
|
|
_weaponClassName call DMS_FindSuppressor;
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2015-08-31 20:28:01 +00:00
|
|
|
private["_weapon","_result","_ammoName","_rnd338","_rnd93"];
|
2015-08-31 04:51:06 +00:00
|
|
|
|
|
|
|
_result = "";
|
|
|
|
_weapon = _this;
|
|
|
|
|
|
|
|
// Zafir accepts no suppressors :(
|
|
|
|
if (_weapon=="LMG_Zafir_F") exitWith {""};
|
|
|
|
|
2015-08-31 20:28:01 +00:00
|
|
|
_rnd338 = ["muzzle_snds_338_black","muzzle_snds_338_green","muzzle_snds_338_sand"];
|
|
|
|
_rnd93 = ["muzzle_snds_93mmg","muzzle_snds_93mmg_tan"];
|
2015-08-31 04:51:06 +00:00
|
|
|
|
|
|
|
_ammoName = getText (configFile >> "cfgWeapons" >> _weapon >> "displayName");
|
|
|
|
|
|
|
|
|
2015-08-31 20:28:01 +00:00
|
|
|
switch (_ammoName) do {
|
2015-08-31 04:51:06 +00:00
|
|
|
|
2015-08-31 20:30:09 +00:00
|
|
|
case ((_ammoName find "6.5") > -1): {
|
|
|
|
if (_ammoName find "LMG_Mk200" > -1) then {
|
|
|
|
_result = "muzzle_snds_H_MG";
|
|
|
|
} else {
|
|
|
|
_result = "muzzle_snds_H";
|
|
|
|
};
|
|
|
|
};
|
2015-08-31 04:51:06 +00:00
|
|
|
|
2015-08-31 20:28:01 +00:00
|
|
|
case ((_ammoName find "5.56") > -1): {_result = "muzzle_snds_M";};
|
|
|
|
|
|
|
|
case ((_ammoName find "7.62") > -1): {_result = "muzzle_snds_H";};
|
2015-08-31 04:51:06 +00:00
|
|
|
|
2015-08-31 20:28:01 +00:00
|
|
|
case ((_ammoName find ".45") > -1): {_result = "muzzle_snds_acp";};
|
2015-08-31 04:51:06 +00:00
|
|
|
|
2015-08-31 20:49:54 +00:00
|
|
|
case ((_ammoName find "9 mm") > -1): {_result = "muzzle_snds_L";};
|
2015-08-31 20:28:01 +00:00
|
|
|
|
2015-08-31 20:58:30 +00:00
|
|
|
case ((_ammoName find ".338") > -1): {_result = _rnd338 call BIS_fnc_selectRandom;};
|
2015-08-31 20:28:01 +00:00
|
|
|
|
2015-08-31 20:52:01 +00:00
|
|
|
case ((_ammoName find "9.3 mm") > -1): {_result = _rnd93 call BIS_fnc_selectRandom;};
|
2015-08-31 20:28:01 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
_result
|