From d87e00a82dd9a0177a0058aeea675babdefe767d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 14 Dec 2007 06:20:07 +0000 Subject: [PATCH] added amb1281 - added nextmap command to server console --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401799 --- plugins/nextmap.sp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/plugins/nextmap.sp b/plugins/nextmap.sp index 56301872b..161500863 100644 --- a/plugins/nextmap.sp +++ b/plugins/nextmap.sp @@ -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 "); 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) {