forked from UNLOZE/sm-plugins
Update Mapchooser Time restrictions
Time till nomination calculation might still be off. (restriction itself works fine)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user