added restriction check so not displaying average hour if not restricted

This commit is contained in:
jenz 2023-12-11 13:48:12 +01:00
parent 7290cccb9d
commit 6959ce819c

View File

@ -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);