12 {
14 return true;
15
17
18 if (
GetGame().ServerConfigGetInt(
"enableCfgGameplayFile" ))
19 m_PRAFiles = CfgGameplayHandler.GetPlayerRestrictedAreaFiles();
20 else
22
24 return true;
25
26 string worldName;
28
30 {
31 PlayerRestrictedAreaInstance area = new PlayerRestrictedAreaInstance();
32
33 string errorMessage,
path;
34
36 if (!JsonFileLoader<PlayerRestrictedAreaInstance>.LoadFile(
path, area, errorMessage))
37 {
39 path =
string.
Format(
"dz/worlds/%1/ce/%2", worldName, filename);
40
41 if (!JsonFileLoader<PlayerRestrictedAreaInstance>.LoadFile(
path, area, errorMessage))
42 {
44 continue;
45 }
46 }
47
48 if (area != null)
49 m_Data.m_Areas.Insert(area);
50 }
51
53
54 return true;
55 }
proto void GetWorldName(out string world_name)
static ref CfgPlayerRestrictedAreaJsonData m_Data
static ref TStringArray m_PRAFiles
static bool m_Initialized
proto native CGame GetGame()
proto bool FileExist(string name)
Check existence of file.
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.