Hi All,
i use this Cvar to exclude the 2 last past maps from mapvote:
Code:
sm_mapvote_exclude "2" // Specifies how many past maps to exclude from the vote.
Now i try to exclude a map via command.
To realize it, i add some code to the mapchooser plugin:
PHP Code:
public Action:Command_AddToOldMaplist(client, args)
{
if (args < 1)
{
ReplyToCommand(client, "[SM] Usage: sm_addtooldmapslist <map>");
return Plugin_Handled;
}
decl String:map[PLATFORM_MAX_PATH];
GetCmdArg(1, map, sizeof(map));
if (!IsMapValid(map))
{
ReplyToCommand(client, "[SM] %t", "Map was not found", map);
return Plugin_Handled;
}
LogAction(client, -1, "\"%L\" Add map \"%s\" to oldmaplist", client, map);
PushArrayString(g_OldMapList, map);
if (GetArraySize(g_OldMapList) > GetConVarInt(g_Cvar_ExcludeMaps))
{
RemoveFromArray(g_OldMapList, 0);
}
return Plugin_Handled;
}
But map is still to vote when the mapvote pop up.
Any ideas what i do wrong here?
Thanks for the effort.
-
__________________