4 {
5 bool is_female = source.ConfigGetBool("woman");
6
7
8 string path_class = "CfgActionSounds " + sound_name;
9 string path_sound = path_class + " sounds";
10
12 {
13 string path_sound_female = path_class + "_female" + " sounds";
14
15 if(is_female &&
GetDayZGame().ConfigIsExisting(path_sound_female))
16 {
17 path_sound = path_sound_female;
18 }
19
20 g_Game.ConfigGetTextArray(path_sound,CachedObjectsArrays.ARRAY_STRING);
21 int rnd_index = Math.RandomInt(0,CachedObjectsArrays.ARRAY_STRING.Count());
22 string sound_class = CachedObjectsArrays.ARRAY_STRING.
Get(rnd_index);
23 SoundOnVehicle sound_object =
g_Game.CreateSoundOnObject(source, sound_class, distance, looped);
24 return sound_object;
25 }
26 else
27 {
28 return g_Game.CreateSoundOnObject(source, sound_name, distance, looped);
29 }
30 }
proto string Get(int index)
Gets n-th character from string.