New Plugin: NoAdminTools

+ new native to mapchooser_extended
This commit is contained in:
Dogan
2019-06-15 23:25:37 +02:00
parent 4f65d02cb9
commit 19c75cdd0c
4 changed files with 276 additions and 0 deletions
@@ -132,6 +132,13 @@ native int GetMapGroupRestriction(const char[] map, int client = 0);
native bool GetMapVIPRestriction(const char[] map, int client = 0);
/**
* gives back the amount of extends left on a map
*
* #return amounts of extends left
*/
native int GetExtendsLeft();
public SharedPlugin __pl_mapchooser_extended =
{
name = "mapchooser",
@@ -415,6 +415,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
CreateNative("GetMapGroups", Native_GetMapGroups);
CreateNative("GetMapGroupRestriction", Native_GetMapGroupRestriction);
CreateNative("GetMapVIPRestriction", Native_GetMapVIPRestriction);
CreateNative("GetExtendsLeft", Native_GetExtendsLeft);
return APLRes_Success;
}
@@ -2340,6 +2341,11 @@ public int Native_GetMapVIPRestriction(Handle plugin, int numParams)
return InternalGetMapVIPRestriction(map);
}
public int Native_GetExtendsLeft(Handle plugin, int numParams)
{
return GetConVarInt(g_Cvar_Extend) - g_Extends;
}
stock void AddMapItem(const char[] map)
{
if(g_NativeVotes)