Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
soundsetmap.c
Go to the documentation of this file.
2 {
3  ref static map<int, string> m_SoundSetMapIDByID = new map<int, string>;
4  ref static map<string, int> m_SoundSetMapIDByName = new map<string, int>;
5 
6  static void Init()
7  {
8  string path = "CfgSoundSets";
9 
10  int soundCount = GetGame().ConfigGetChildrenCount(path);
11 
12  for (int i = 1; i < soundCount; i++)
13  {
14  string soundClassName;
15  GetGame().ConfigGetChildName(path, i, soundClassName);
16  m_SoundSetMapIDByID.Insert(i,soundClassName);
17  m_SoundSetMapIDByName.Insert(soundClassName,i);
18  //PrintString(soundClassName);
19  }
20  }
21 
22  static string GetSoundSetName(int id)
23  {
24  return m_SoundSetMapIDByID.Get(id);
25  }
26 
27  static int GetSoundSetID(string name)
28  {
29  return m_SoundSetMapIDByName.Get(name);
30  }
31 
32 }
GetGame
proto native CGame GetGame()
SoundSetMap
Definition: soundsetmap.c:1
map
map
Definition: controlsxboxnew.c:3
name
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
path
string path
Definition: optionselectormultistate.c:135