Raised This Month: $51 Target: $400
 12% 

Exclude defined map for next vote


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HSFighter
Veteran Member
Join Date: Aug 2007
Location: Flensburg - Germany
Old 08-08-2014 , 08:59   Exclude defined map for next vote
Reply With Quote #1

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(clientargs)
{        
    if (
args 1)
    {
        
ReplyToCommand(client"[SM] Usage: sm_addtooldmapslist <map>");
        return 
Plugin_Handled;
    }
    
decl String:map[PLATFORM_MAX_PATH];
    
GetCmdArg(1mapsizeof(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"clientmap);
    
PushArrayString(g_OldMapListmap);
        
    if (
GetArraySize(g_OldMapList) > GetConVarInt(g_Cvar_ExcludeMaps))
    {
        
RemoveFromArray(g_OldMapList0);
    }    
    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.




-
__________________



Sorry for my very bad english
Greetings HSFighter

Last edited by HSFighter; 08-08-2014 at 11:04.
HSFighter is offline
Send a message via ICQ to HSFighter
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode