I guess I was wrong, I am no longer getting that error but the timers still carry out past the round end.
PHP Code:
new Handle:WardayStartTimer;
new Handle:WardayExpandTimer;
public wardayfreezetime(Handle:menu, MenuAction:action, client, itemNum)
{
if ( action == MenuAction_Select )
{
switch (itemNum)
{
case 0:
{
WardayStartTimer = CreateTimer(30.0, WardayStart);
new Handle:menu = CreateMenu(wardayexpandtime);
SetMenuTitle(menu, "Warday - Expand Time");
AddMenuItem(menu, "option1", "In 3 Minutes");
AddMenuItem(menu, "option2", "In 4 Minutes");
AddMenuItem(menu, "option3", "In 5 Minutes");
AddMenuItem(menu, "option5", "In 6 Minutes");
SetMenuExitButton(menu, true);
DisplayMenu(menu, client, MENU_TIME_FOREVER);
ServerCommand("sm_freeze @t 30");
PrintToChatAll("[\x07Warden\x01] \x04Warday will start in\x01 \x0730\x01 \x04seconds!\x01");
PrintToChatAll("[\x07Warden\x01] \x04Guards, remember to open the cells before the freezetime is over.\x01");
}
case 1:
{
WardayStartTimer = CreateTimer(45.0, WardayStart);
new Handle:menu = CreateMenu(wardayexpandtime);
SetMenuTitle(menu, "Warday - Expand Time");
AddMenuItem(menu, "option1", "In 3 Minutes");
AddMenuItem(menu, "option2", "In 4 Minutes");
AddMenuItem(menu, "option3", "In 5 Minutes");
AddMenuItem(menu, "option5", "In 6 Minutes");
SetMenuExitButton(menu, true);
DisplayMenu(menu, client, MENU_TIME_FOREVER);
ServerCommand("sm_freeze @t 45");
PrintToChatAll("[\x07Warden\x01] \x04Warday will start in\x01 \x0745\x01 \x04seconds!\x01");
PrintToChatAll("[\x07Warden\x01] \x04Guards, remember to open the cells before the freezetime is over.\x01");
}
case 2:
{
WardayStartTimer = CreateTimer(60.0, WardayStart);
new Handle:menu = CreateMenu(wardayexpandtime);
SetMenuTitle(menu, "Warday - Expand Time");
AddMenuItem(menu, "option1", "In 3 Minutes");
AddMenuItem(menu, "option2", "In 4 Minutes");
AddMenuItem(menu, "option3", "In 5 Minutes");
AddMenuItem(menu, "option5", "In 6 Minutes");
SetMenuExitButton(menu, true);
DisplayMenu(menu, client, MENU_TIME_FOREVER);
ServerCommand("sm_freeze @t 60");
PrintToChatAll("[\x07Warden\x01] \x04Warday will start in\x01 \x0760\x01 \x04seconds!\x01");
PrintToChatAll("[\x07Warden\x01] \x04Guards, remember to open the cells before the freezetime is over.\x01");
}
}
}
else if (action == MenuAction_End )
{
CloseHandle(menu);
}
}
public wardayexpandtime(Handle:menu, MenuAction:action, client, itemNum)
{
if ( action == MenuAction_Select )
{
switch (itemNum)
{
case 0:
{
PrintToChatAll("[\x07Warden\x01] \x04Warday will expand in\x01 \x073\x01 \x04minutes!\x01");
WardayExpandTimer = CreateTimer(180.0, WardayExpand);
}
case 1:
{
PrintToChatAll("[\x07Warden\x01] \x04Warday will expand in\x01 \x074\x01 \x04minutes!\x01");
WardayExpandTimer = CreateTimer(240.0, WardayExpand);
}
case 2:
{
PrintToChatAll("[\x07Warden\x01] \x04Warday will expand in\x01 \x075\x01 \x04minutes!\x01");
WardayExpandTimer = CreateTimer(300.0, WardayExpand);
}
case 3:
{
PrintToChatAll("[\x07Warden\x01] \x04Warday will expand in\x01 \x076\x01 \x04minutes!\x01");
WardayExpandTimer = CreateTimer(360.0, WardayExpand);
}
}
}
else if (action == MenuAction_End )
{
CloseHandle(menu);
}
}
public Action:roundEnd(Handle:event, const String:name[], bool:dontBroadcast)
{
ServerCommand("sm_gravity @all 1");
GravityFreeday = 0;
KillTimer(WardayExpandTimer);
KillTimer(WardayStartTimer);
}