Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
pluginvariables.c
Go to the documentation of this file.
1 class PluginVariables extends PluginBase
2 {
3  void PluginVariables()
4  {
5  m_Id = 0;
6  m_Variables = new map<int, string>;
7  // ("variable name")
8  RegisterVariable("varNote");
9  RegisterVariable("varColor");
10 
11  }
12 
13  void ~PluginVariables()
14  {
15  }
16 
17  void RegisterVariable(string name)
18  {
19  m_Id++;
20  m_Variables.Set(m_Id,name);//REWORK.V maybe have 2 maps, one with key
21 
22  }
23 
24  int m_Id;
25  ref map<int, string> m_Variables;
26 
27  string GetName(int id)
28  {
29  return m_Variables.Get(id);
30  }
31 
32  int GetID(string name)
33  {
34  return m_Variables.GetKeyByValue(name);
35  }
36 }
GetName
proto native owned string GetName()
Definition: syncedvalue.c:117
PluginBase
Definition: pluginadminlog.c:1
map
map
Definition: controlsxboxnew.c:3
GetID
int GetID()
Get the ID registered in SEffectManager.
Definition: effect.c:534
m_Id
class GetServerModListResult m_Id
GetServersResultRow the output structure of the GetServers operation that represents one game server.
name
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo