13 {
14 string cfgPath =
"CfgVehicles " +
GetName() +
" AnimEvents SoundWeapon";
15
17
19
20 if (soundCount <= 0)
21 {
22 cfgPath =
"CfgWeapons " +
GetName() +
" AnimEvents SoundWeapon";
24 }
25
26 if (soundCount <= 0)
27 {
28 cfgPath =
"CfgMagazines " +
GetName() +
" AnimEvents SoundWeapon";
30 }
31
32 if (soundCount <= 0)
33 {
34 cfgPath =
"CfgAmmo " +
GetName() +
" AnimEvents SoundWeapon";
36 }
37
38 for (int i = 0; i < soundCount; i++)
39 {
40 string soundName;
42 string soundPath = cfgPath + " " + soundName + " ";
43 AnimSoundEvent soundEvent = new AnimSoundEvent(soundPath);
44 if (soundEvent.IsValid())
46 }
47 }
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
proto native owned string GetName()
ref map< int, ref AnimSoundEvent > m_AnimSoundEvents
proto native CGame GetGame()