now cooldowns should be respected god dammnit

This commit is contained in:
jenz 2024-10-12 17:18:09 +02:00
parent 65932af8db
commit d35258404d
2 changed files with 9 additions and 2 deletions

View File

@ -2729,8 +2729,11 @@ public int Native_GetMapCooldown(Handle plugin, int numParams)
public int Native_GetMapCooldownTime(Handle plugin, int numParams)
{
//just respecting map cooldown time should not be so much work dx
/*
if(!InternalAreRestrictionsActive(false))
return 0;
*/
int len;
GetNativeStringLength(1, len);

View File

@ -1064,8 +1064,11 @@ Menu BuildMapMenu(const char[] filter, int client)
}
if (g_bClientsIgnoring[client])
{
if (GetMapCooldownTime(map) > GetTime())
{
continue;
}
if(AreRestrictionsActive() && (
GetMapCooldownTime(map) > GetTime() ||
GetMapTimeRestriction(map) ||
GetMapPlayerRestriction(map) ||
GetAveragePlayerTimeOnServerMapRestriction(map) > 0 ||
@ -1251,6 +1254,7 @@ public int Handler_MapSelectMenu(Menu menu, MenuAction action, int param1, int p
{
return ITEMDRAW_DISABLED;
}
if(!CheckCommandAccess(param1, "sm_nominate_ignore", ADMFLAG_KICK, true) && !Leader_Is(param1))
{
if(AreRestrictionsActive() && (
@ -1446,7 +1450,7 @@ public int Handler_AdminMapSelectMenu(Menu menu, MenuAction action, int param1,
if(!CheckCommandAccess(param1, "sm_nominate_ignore", ADMFLAG_KICK, true))
{
if(AreRestrictionsActive() && (
GetMapCooldownTime(map) > GetTime() ||
GetMapCooldownTime(map) > GetTime() || //this one is fine cause its admin nomination.
GetMapTimeRestriction(map) ||
GetMapPlayerRestriction(map) ||
GetAveragePlayerTimeOnServerMapRestriction(map) > 0 ||