in unloze zones fixing warnings and using onmapinit forward for initializing the global variable to be used by natives
This commit is contained in:
@@ -90,6 +90,7 @@ public int Native_ZoneNameBasedOnIndex(Handle handler, int numParams)
|
||||
{
|
||||
int i = GetNativeCell(1);
|
||||
SetNativeString(2, g_cZones[i], sizeof(g_cZones), true);
|
||||
return 0;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose: Displayes zones
|
||||
@@ -176,6 +177,7 @@ public int MenuHandler1(Menu menu, MenuAction action, int param1, int choice)
|
||||
{
|
||||
delete menu;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
@@ -203,7 +205,7 @@ public Action MenuZoneCounter(int client)
|
||||
public int MenuHandler2(Menu menu, MenuAction action, int param1, int choice)
|
||||
{
|
||||
if (!IsValidClient(param1))
|
||||
return;
|
||||
return 0;
|
||||
float l_fMiddle[MAXZONES][3];
|
||||
float l_fMin1[MAXZONES][3], l_fMax1[MAXZONES][3];
|
||||
if (action == MenuAction_Select)
|
||||
@@ -263,6 +265,7 @@ public int MenuHandler2(Menu menu, MenuAction action, int param1, int choice)
|
||||
//experimental
|
||||
g_iAdminSelectOpion[param1] = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
@@ -440,6 +443,7 @@ public int MenuEditExistingZones(Menu menu, MenuAction action, int param1, int c
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
@@ -465,6 +469,7 @@ public Action cmd_menuFinishZone(int client)
|
||||
menu.AddItem("", "Restart new Zone");
|
||||
menu.ExitButton = true;
|
||||
menu.Display(client, 0);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
@@ -494,6 +499,7 @@ public int MenuHandlerfinishzone(Menu menu, MenuAction action, int param1, int c
|
||||
cmd_menuFinishZone(param1);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose: simple say hook
|
||||
@@ -792,6 +798,12 @@ public bool TraceFilter_NoClients(int entity, int contentsMask, any data)
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose: Mapstart
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnMapInit()
|
||||
{
|
||||
resetZones();
|
||||
ReadZoneFile(); //loading zones a bit earlier for the natives sake.
|
||||
}
|
||||
|
||||
public void OnMapStart()
|
||||
{
|
||||
g_bAdminNewZone = false;
|
||||
|
||||
Reference in New Issue
Block a user