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_Set, ADMFLAG_CHANGEMAP);
}
public Action Cmd_Next(int client, int args)
{
char sMap[64];
GetNextMap(sMap, sizeof(sMap));
PrintToChat(client, "\x04 Next map: \x03 %s", sMap);
}
public Action Cmd_Set(int client, int args)
{
if(args != 1)
{
PrintToChat(client, "Usage: sm_setnextmap <map>");
return Plugin_Handled;
}
char sArgs[64];
GetCmdArg(1, sArgs, sizeof(sArgs));
char sMap[62];
GetCmdArgString(sMap, sizeof(sMap));
SetNextMap(sMap);
char sName[MAX_NAME_LENGTH];
GetClientName(client, sName, MAX_NAME_LENGTH);
PrintToChatAll("\x04 Admin %s set the next map to: %s", sName, sMap);
return Plugin_Handled;
}