added new laserfag entry in mapchooser

This commit is contained in:
jenz 2026-06-25 14:04:07 +02:00
parent c03f450e8e
commit 111cc27521
2 changed files with 23 additions and 0 deletions

View File

@ -115,6 +115,7 @@ 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 GetMapLaserFag(const char[] map);
native int GetMapMinTime(const char[] map);
native int GetMapMaxTime(const char[] map);
native int GetMapMinPlayers(const char[] map);

View File

@ -476,6 +476,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
CreateNative("GetMapCooldownTime", Native_GetMapCooldownTime);
CreateNative("GetMapCooldownTime2", Native_GetMapCooldownTime2);
CreateNative("GetMapLowPopHelpCount", Native_GetMapLowPopHelpCount);
CreateNative("GetMapLaserFag", Native_GetMapLaserFag);
CreateNative("GetMapMinTime", Native_GetMapMinTime);
CreateNative("GetMapMaxTime", Native_GetMapMaxTime);
CreateNative("GetMapMinPlayers", Native_GetMapMinPlayers);
@ -2666,6 +2667,27 @@ public int Native_GetMapCooldownTime2(Handle plugin, int numParams)
return InternalGetMapCooldownTime2(map);
}
//GetMapLaserFag
public int Native_GetMapLaserFag(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("Laserfag_map", count);
g_Config.Rewind();
}
return count;
}
//GetMapLowPopHelpCount
public int Native_GetMapLowPopHelpCount(Handle plugin, int numParams)
{