added native in mapchooser for the trails entry for maps that enabled trails. also added the trails plugin itself

This commit is contained in:
jenz
2026-07-28 20:05:15 +02:00
parent 8ef2f2f2cc
commit 52a452708e
3 changed files with 462 additions and 0 deletions
@@ -477,6 +477,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
CreateNative("GetMapCooldownTime2", Native_GetMapCooldownTime2);
CreateNative("GetMapLowPopHelpCount", Native_GetMapLowPopHelpCount);
CreateNative("GetMapLaserFag", Native_GetMapLaserFag);
CreateNative("GetMapTrails", Native_GetMapTrails);
CreateNative("GetMapMinTime", Native_GetMapMinTime);
CreateNative("GetMapMaxTime", Native_GetMapMaxTime);
CreateNative("GetMapMinPlayers", Native_GetMapMinPlayers);
@@ -2676,6 +2677,27 @@ public int Native_GetMapCooldownTime2(Handle plugin, int numParams)
return InternalGetMapCooldownTime2(map);
}
//GetMapTrails
public int Native_GetMapTrails(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("Trails", count);
g_Config.Rewind();
}
return count;
}
//GetMapLaserFag
public int Native_GetMapLaserFag(Handle plugin, int numParams)
{