I want credits too :(

This commit is contained in:
Defent 2015-08-31 22:28:01 +02:00
parent 5aba56c43c
commit b0c2c304e0

View File

@ -1,14 +1,14 @@
/*
DMS_FindSuppressor
Taken from WAI
Modified by eraser1
Modified by eraser1 & Defent
Usage:
_weaponClassName call DMS_FindSuppressor;
*/
private["_weapon","_result","_ammoName"];
private["_weapon","_result","_ammoName","_rnd338","_rnd93"];
_result = "";
_weapon = _this;
@ -16,25 +16,27 @@ _weapon = _this;
// Zafir accepts no suppressors :(
if (_weapon=="LMG_Zafir_F") exitWith {""};
_rnd338 = ["muzzle_snds_338_black","muzzle_snds_338_green","muzzle_snds_338_sand"];
_rnd93 = ["muzzle_snds_93mmg","muzzle_snds_93mmg_tan"];
_ammoName = getText (configFile >> "cfgWeapons" >> _weapon >> "displayName");
if ((_ammoName find "5.56") > -1) then
{
_result = "muzzle_snds_M";
switch (_ammoName) do {
case ((_ammoName find "6.5") > -1): {if (_ammoName find "LMG_Mk200" > -1) then {_result = "muzzle_snds_H";} else {_result = "muzzle_snds_H_MG";};};
case ((_ammoName find "5.56") > -1): {_result = "muzzle_snds_M";};
case ((_ammoName find "7.62") > -1): {_result = "muzzle_snds_H";};
case ((_ammoName find ".45") > -1): {_result = "muzzle_snds_acp";};
case ((_ammoName find "9") > -1): {_result = "muzzle_snds_L";};
case ((_ammoName find "388") > -1): {_result = _rnd338 call BIS_fnc_selectRandom;};
case ((_ammoName find "388") > -1): {_result = _rnd93 call BIS_fnc_selectRandom;};
};
if ((_ammoName find "6.5") > -1) then
{
_result = "muzzle_snds_H";
};
if ((_ammoName find "7.62") > -1) then
{
_result = "muzzle_snds_H";
};
//TODO Add functionality for 9.3 and .338
_result
_result