forked from UNLOZE/sm-plugins
updated so that low pop helper has its own configuration now in the .cfg to decide with how many people on each map to help with easy settings
This commit is contained in:
@@ -114,6 +114,7 @@ native bool ExcludeMapListingPriority(const char[] map, int index);
|
||||
native int GetMapCooldown(const char[] map);
|
||||
native int GetMapCooldownTime(const char[] map); // in unix time
|
||||
native int GetMapCooldownTime2(const char[] map); // in unix time
|
||||
native int GetMapLowPopHelpCount(const char[] map);
|
||||
native int GetMapMinTime(const char[] map);
|
||||
native int GetMapMaxTime(const char[] map);
|
||||
native int GetMapMinPlayers(const char[] map);
|
||||
|
||||
@@ -473,6 +473,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
|
||||
CreateNative("GetMapCooldown", Native_GetMapCooldown);
|
||||
CreateNative("GetMapCooldownTime", Native_GetMapCooldownTime);
|
||||
CreateNative("GetMapCooldownTime2", Native_GetMapCooldownTime2);
|
||||
CreateNative("GetMapLowPopHelpCount", Native_GetMapLowPopHelpCount);
|
||||
CreateNative("GetMapMinTime", Native_GetMapMinTime);
|
||||
CreateNative("GetMapMaxTime", Native_GetMapMaxTime);
|
||||
CreateNative("GetMapMinPlayers", Native_GetMapMinPlayers);
|
||||
@@ -2745,6 +2746,27 @@ public int Native_GetMapCooldownTime2(Handle plugin, int numParams)
|
||||
return InternalGetMapCooldownTime2(map);
|
||||
}
|
||||
|
||||
//GetMapLowPopHelpCount
|
||||
public int Native_GetMapLowPopHelpCount(Handle plugin, int numParams)
|
||||
{
|
||||
int len;
|
||||
GetNativeStringLength(1, len);
|
||||
|
||||
if(len <= 0)
|
||||
return false;
|
||||
|
||||
char[] map = new char[len+1];
|
||||
GetNativeString(1, map, len+1);
|
||||
int count = 0;
|
||||
|
||||
if (g_Config && g_Config.JumpToKey(map))
|
||||
{
|
||||
count = g_Config.GetNum("LowPopHelpCount", count);
|
||||
g_Config.Rewind();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public int Native_GetMapCooldownTime(Handle plugin, int numParams)
|
||||
{
|
||||
int len;
|
||||
|
||||
Reference in New Issue
Block a user