added amb1281 - added nextmap command to server console

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401799
This commit is contained in:
David Anderson 2007-12-14 06:20:07 +00:00
parent 8ffeb9f627
commit d87e00a82d

View File

@ -75,6 +75,11 @@ public OnPluginStart()
RegConsoleCmd("say", Command_Say);
RegConsoleCmd("say_team", Command_Say);
if (GetCommandFlags("nextmap") == INVALID_FCVAR_FLAGS)
{
RegServerCmd("nextmap", Command_Nextmap);
}
RegAdminCmd("sm_setnextmap", Command_SetNextmap, ADMFLAG_CHANGEMAP, "sm_setnextmap <map>");
RegConsoleCmd("listmaps", Command_List);
@ -128,7 +133,7 @@ public Action:Command_Say(client, args)
decl String:map[32];
GetConVarString(g_Cvar_Nextmap, map, sizeof(map));
PrintToChatAll("%t", "Next Map", map);
PrintToChat(client, "%t", "Next Map", map);
}
return Plugin_Continue;
@ -217,6 +222,17 @@ public Action:UserMsg_VGUIMenu(UserMsg:msg_id, Handle:bf, const players[], playe
return Plugin_Handled;
}
public Action:Command_Nextmap(args)
{
decl String:map[64];
GetConVarString(g_Cvar_Nextmap, map, sizeof(map));
ReplyToCommand(0, "%t", "Next Map", map);
return Plugin_Handled;
}
public Action:Timer_ChangeMap(Handle:timer, Handle:dp)
{