forked from UNLOZE/sm-plugins
fixing handle and index errors, also added so mapgroup restrictions are respected
This commit is contained in:
@@ -324,13 +324,6 @@ public Action Command_Addmap(int client, int args)
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
int GroupRestriction = GetMapGroupRestriction(mapname);
|
||||
if(RestrictionsActive && GroupRestriction >= 0)
|
||||
{
|
||||
CPrintToChat(client, "[NE] %t", "Map Nominate Group Error", GroupRestriction);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
}
|
||||
|
||||
NominateResult result = NominateMap(mapname, true, 0);
|
||||
@@ -603,13 +596,6 @@ public Action Command_Nominate(int client, int args)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
int GroupRestriction = GetMapGroupRestriction(mapname, client);
|
||||
if(RestrictionsActive && GroupRestriction >= 0)
|
||||
{
|
||||
CPrintToChat(client, "[NE] %t", "Map Nominate Group Error", GroupRestriction);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
NominateResult result = NominateMap(mapname, false, client);
|
||||
|
||||
if (result == Nominate_InvalidMap)
|
||||
@@ -903,7 +889,6 @@ public int Handler_MapSelectMenu(Menu menu, MenuAction action, int param1, int p
|
||||
GetMapCooldownTime(map) > GetTime() ||
|
||||
GetMapTimeRestriction(map) ||
|
||||
GetMapPlayerRestriction(map) ||
|
||||
GetMapGroupRestriction(map, param1) >= 0 ||
|
||||
GetMapVIPRestriction(map, param1)))
|
||||
{
|
||||
PrintToChat(param1, "[NE] You cant nominate this map right now.");
|
||||
@@ -972,7 +957,6 @@ public int Handler_MapSelectMenu(Menu menu, MenuAction action, int param1, int p
|
||||
GetMapCooldownTime(map) > GetTime() ||
|
||||
GetMapTimeRestriction(map) ||
|
||||
GetMapPlayerRestriction(map) ||
|
||||
GetMapGroupRestriction(map, param1) >= 0 ||
|
||||
GetMapVIPRestriction(map, param1)))
|
||||
{
|
||||
return ITEMDRAW_DISABLED;
|
||||
@@ -1075,15 +1059,6 @@ public int Handler_MapSelectMenu(Menu menu, MenuAction action, int param1, int p
|
||||
return RedrawMenuItem(display);
|
||||
}
|
||||
|
||||
//2023 edit for multiple nominations
|
||||
/*
|
||||
int GroupRestriction = GetMapGroupRestriction(map, param1);
|
||||
if(RestrictionsActive && GroupRestriction >= 0)
|
||||
{
|
||||
Format(display, sizeof(display), "%s (%T)", buffer, "Map Group Restriction", param1, GroupRestriction);
|
||||
return RedrawMenuItem(display);
|
||||
}
|
||||
*/
|
||||
|
||||
if(RestrictionsActive && VIPRestriction)
|
||||
{
|
||||
@@ -1167,7 +1142,6 @@ public int Handler_AdminMapSelectMenu(Menu menu, MenuAction action, int param1,
|
||||
GetMapCooldownTime(map) > GetTime() ||
|
||||
GetMapTimeRestriction(map) ||
|
||||
GetMapPlayerRestriction(map) ||
|
||||
GetMapGroupRestriction(map, param1) >= 0 ||
|
||||
GetMapVIPRestriction(map, param1)))
|
||||
{
|
||||
PrintToChat(param1, "[NE] You cant nominate this map right now.");
|
||||
|
||||
Reference in New Issue
Block a user