added restriction check so not displaying average hour if not restricted
This commit is contained in:
parent
7290cccb9d
commit
6959ce819c
@ -470,7 +470,7 @@ public Action Command_Addmap(int client, int args)
|
||||
}
|
||||
|
||||
int AverageHourRestricted = GetAveragePlayerTimeOnServerMapRestriction(mapname);
|
||||
if (AverageHourRestricted > 0)
|
||||
if (RestrictionsActive && AverageHourRestricted > 0)
|
||||
{
|
||||
PrintToChat(client, "%s requires +%i hours average. Use sm_houravg to check average.", mapname, AverageHourRestricted);
|
||||
return Plugin_Handled;
|
||||
@ -762,7 +762,7 @@ public Action Command_Nominate(int client, int args)
|
||||
}
|
||||
|
||||
int AverageHourRestricted = GetAveragePlayerTimeOnServerMapRestriction(mapname);
|
||||
if (AverageHourRestricted > 0)
|
||||
if (RestrictionsActive && AverageHourRestricted > 0)
|
||||
{
|
||||
PrintToChat(client, "%s requires +%i hours average. Use sm_houravg to check average.", mapname, AverageHourRestricted);
|
||||
return Plugin_Handled;
|
||||
@ -1370,7 +1370,7 @@ public int Handler_MapSelectMenu(Menu menu, MenuAction action, int param1, int p
|
||||
}
|
||||
|
||||
int AverageHourRestricted = GetAveragePlayerTimeOnServerMapRestriction(map);
|
||||
if (AverageHourRestricted > 0)
|
||||
if (RestrictionsActive && AverageHourRestricted > 0)
|
||||
{
|
||||
Format(display, sizeof(display), "%s (requires +%i hours average.)", map, AverageHourRestricted);
|
||||
return RedrawMenuItem(display);
|
||||
|
Loading…
Reference in New Issue
Block a user