Update Mapchooser Time restrictions

Time till nomination calculation might still be off. (restriction itself
works fine)
This commit is contained in:
zaCade
2017-10-15 16:20:53 +02:00
parent b92e95b79e
commit 6fc8146d7f
4 changed files with 43 additions and 51 deletions
@@ -271,10 +271,7 @@ public Action Command_Addmap(int client, int args)
int TimeRestriction = GetMapTimeRestriction(mapname);
if(TimeRestriction)
{
if(TimeRestriction < 0)
CPrintToChat(client, "[NE] %t", "Map Nominate MinTime Error", TimeRestriction * -1);
else
CPrintToChat(client, "[NE] %t", "Map Nominate MaxTime Error", TimeRestriction);
CPrintToChat(client, "[NE] %t", "Map Nominate Time Error", RoundToFloor(float(TimeRestriction / 60)), TimeRestriction % 60);
return Plugin_Handled;
}
@@ -476,10 +473,7 @@ public Action Command_Nominate(int client, int args)
int TimeRestriction = GetMapTimeRestriction(mapname);
if(TimeRestriction)
{
if(TimeRestriction < 0)
CPrintToChat(client, "[NE] %t", "Map Nominate MinTime Error", TimeRestriction * -1);
else
CPrintToChat(client, "[NE] %t", "Map Nominate MaxTime Error", TimeRestriction);
CPrintToChat(client, "[NE] %t", "Map Nominate Time Error", RoundToFloor(float(TimeRestriction / 60)), TimeRestriction % 60);
return Plugin_Handled;
}
@@ -778,10 +772,7 @@ public int Handler_MapSelectMenu(Menu menu, MenuAction action, int param1, int p
int TimeRestriction = GetMapTimeRestriction(map);
if(TimeRestriction)
{
if(TimeRestriction < 0)
Format(display, sizeof(display), "%s (%T)", buffer, "Map Time Restriction", param1, "+", TimeRestriction * -1);
else
Format(display, sizeof(display), "%s (%T)", buffer, "Map Time Restriction", param1, "-", TimeRestriction);
Format(display, sizeof(display), "%s (%T)", buffer, "Map Time Restriction", param1, "+", RoundToFloor(float(TimeRestriction / 60)), TimeRestriction % 60);
return RedrawMenuItem(display);
}
@@ -930,10 +921,7 @@ public int Handler_AdminMapSelectMenu(Menu menu, MenuAction action, int param1,
int TimeRestriction = GetMapTimeRestriction(map);
if(TimeRestriction)
{
if(TimeRestriction < 0)
Format(display, sizeof(display), "%s (%T)", buffer, "Map Time Restriction", param1, "+", TimeRestriction * -1);
else
Format(display, sizeof(display), "%s (%T)", buffer, "Map Time Restriction", param1, "-", TimeRestriction);
Format(display, sizeof(display), "%s (%T)", buffer, "Map Time Restriction", param1, "+", RoundToFloor(float(TimeRestriction / 60)), TimeRestriction % 60);
return RedrawMenuItem(display);
}