/
SN1054NGC
/
DayZ_Projects_cpp
Обзор
Документация
Войти
/
SN1054NGC
/
DayZ_Projects_cpp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
scripts/4_world/plugins/pluginbase/pluginvariables.c
36 строк
559 B
SN1054NGC
Initial DayZ mod project commit
26 ноя 2025, 01:03
26 ноя 2025, 01:03
fddb039
Код
Авторство
О чём код?
class PluginVariables extends PluginBase { void PluginVariables() { m_Id = 0; m_Variables = new map<int, string>; // ("variable name") RegisterVariable("varNote"); RegisterVariable("varColor"); } void ~PluginVariables() { } void RegisterVariable(string name) { m_Id++; m_Variables.Set(m_Id,name);//REWORK.V maybe have 2 maps, one with key } int m_Id; ref map<int, string> m_Variables; string GetName(int id) { return m_Variables.Get(id); } int GetID(string name) { return m_Variables.GetKeyByValue(name); } }