MCE: add native to simulate MapEnd (for Cooldowns)

This commit is contained in:
hubdom 2020-07-09 23:23:40 +02:00
parent 5e192ec41b
commit 26a23ae643
2 changed files with 8 additions and 0 deletions

View File

@ -146,6 +146,8 @@ native int GetExtendsLeft();
native bool AreRestrictionsActive();
native int SimulateMapEnd();
public SharedPlugin __pl_mapchooser_extended =
{
name = "mapchooser",

View File

@ -424,6 +424,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
CreateNative("GetMapVIPRestriction", Native_GetMapVIPRestriction);
CreateNative("GetExtendsLeft", Native_GetExtendsLeft);
CreateNative("AreRestrictionsActive", Native_AreRestrictionsActive);
CreateNative("SimulateMapEnd", Native_SimulateMapEnd);
return APLRes_Success;
}
@ -2352,6 +2353,11 @@ public int Native_AreRestrictionsActive(Handle plugin, int numParams)
return InternalAreRestrictionsActive();
}
public int Native_SimulateMapEnd(Handle plugin, int numParams)
{
OnMapEnd();
}
stock void AddMapItem(const char[] map)
{
AddMenuItem(g_VoteMenu, map, map);