From 111cc275211fbd6bc7a9a49c1e1c6742d5827f55 Mon Sep 17 00:00:00 2001 From: jenz Date: Thu, 25 Jun 2026 14:04:07 +0200 Subject: [PATCH] added new laserfag entry in mapchooser --- .../scripting/include/mapchooser_extended.inc | 1 + .../scripting/mapchooser_extended_unloze.sp | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/mapchooser_extended/scripting/include/mapchooser_extended.inc b/mapchooser_extended/scripting/include/mapchooser_extended.inc index 152d4fa..fe7fdc9 100755 --- a/mapchooser_extended/scripting/include/mapchooser_extended.inc +++ b/mapchooser_extended/scripting/include/mapchooser_extended.inc @@ -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); diff --git a/mapchooser_extended/scripting/mapchooser_extended_unloze.sp b/mapchooser_extended/scripting/mapchooser_extended_unloze.sp index a8c7687..b2157e8 100755 --- a/mapchooser_extended/scripting/mapchooser_extended_unloze.sp +++ b/mapchooser_extended/scripting/mapchooser_extended_unloze.sp @@ -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) {