View Single Post
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 07-04-2018 , 15:21   Re: [CSGO] Hook map end vote result
Reply With Quote #4

You don't need to code anything ^.^

Add The following in csgo/cfg/gamemode_casual_server.cfg or in your server.cfg!
Code:
mp_match_restart_delay 20

//mp_endmatch_votenextmap_keepcurrent 0
mp_endmatch_votenextmap 0 // keep this to 0
mp_endmatch_votenextleveltime 20

EDIT: I did't read your problem well.. but you can keep these convars in your server.cfg and use Map chooser and for chat messages you can use my plugin ( not released.. too simply)

PHP Code:
#define PLUGIN_AUTHOR "kRatoss"
#define PLUGIN_VERSION "1.00"

#include <sourcemod>
#include <colors>

public Plugin myinfo 
{
    
name "Map Commands",
    
author PLUGIN_AUTHOR,
    
description "",
    
version PLUGIN_VERSION,
    
url ""
};

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_nextmap"Cmd_Next);
    
RegAdminCmd("sm_setnextmap"Cmd_SetADMFLAG_CHANGEMAP);
}

public 
Action Cmd_Next(int clientint args)
{
    
char sMap[64];
    
GetNextMap(sMapsizeof(sMap));
    
    
PrintToChat(client"\x04 Next map: \x03 %s"sMap);
}

public 
Action Cmd_Set(int clientint args)
{
    if(
args != 1)
    {
        
PrintToChat(client"Usage: sm_setnextmap <map>");
        return 
Plugin_Handled;
    }
    
    
char sArgs[64];
    
GetCmdArg(1sArgssizeof(sArgs));
    
    
char sMap[62];
    
GetCmdArgString(sMapsizeof(sMap));
    
    
SetNextMap(sMap);
    
    
char sName[MAX_NAME_LENGTH];
    
GetClientName(clientsNameMAX_NAME_LENGTH);
    
    
PrintToChatAll("\x04 Admin %s set the next map to: %s"sNamesMap);
    
    return 
Plugin_Handled;


Last edited by kratoss1812; 07-04-2018 at 15:24.
kratoss1812 is offline