forked from UNLOZE/sm-plugins
(¬‿¬)
This commit is contained in:
@@ -1526,7 +1526,7 @@ public int Handler_MapVoteMenu(Handle menu, MenuAction action, int param1, int p
|
||||
{
|
||||
Format(buffer, sizeof(buffer), "%T", "Custom", param1, map);
|
||||
}
|
||||
else if(GetMapVIPRestriction(map))
|
||||
else if(InternalGetMapVIPRestriction(map))
|
||||
{
|
||||
Format(buffer, sizeof(buffer), "%s (%T)", map, "VIP Nomination", param1);
|
||||
}
|
||||
@@ -2306,6 +2306,7 @@ public int Native_GetMapGroupRestriction(Handle plugin, int numParams)
|
||||
|
||||
public int Native_GetMapVIPRestriction(Handle plugin, int numParams)
|
||||
{
|
||||
int client = GetNativeCell(2);
|
||||
int len;
|
||||
GetNativeStringLength(1, len);
|
||||
|
||||
@@ -2315,6 +2316,18 @@ public int Native_GetMapVIPRestriction(Handle plugin, int numParams)
|
||||
char[] map = new char[len+1];
|
||||
GetNativeString(1, map, len+1);
|
||||
|
||||
// Check if client should bypass vip restrictions
|
||||
if(client > 0 && client < MaxClients)
|
||||
{
|
||||
// Client has bypass flag, dont return vip restrictions
|
||||
if(CheckCommandAccess(client, "sm_nominate_ignore", ADMFLAG_CHEATS))
|
||||
return false;
|
||||
|
||||
// Client has vip flag, dont return vip restrictions
|
||||
if(CheckCommandAccess(client, "sm_nominate_vip", ADMFLAG_CUSTOM1))
|
||||
return false;
|
||||
}
|
||||
|
||||
return InternalGetMapVIPRestriction(map);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user