plugins/nextmap.sp
changeset 1180 90bfcf192ffd
parent 1175 3472591d95eb
child 1187 85c0934305bd
     1.1 --- a/plugins/nextmap.sp	Thu Jul 26 23:52:19 2007 +0000
     1.2 +++ b/plugins/nextmap.sp	Thu Jul 26 23:56:55 2007 +0000
     1.3 @@ -74,7 +74,7 @@
     1.4  	HookUserMessage(g_VGUIMenu, UserMsg_VGUIMenu);
     1.5  	HookConVarChange(g_Cvar_Mapcycle, ConVarChange_Mapcyclefile);
     1.6  	
     1.7 -	g_Cvar_Nextmap = CreateConVar("sm_nextmap", "", "Sets the Next Map", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_UNLOGGED|FCVAR_DONTRECORD|FCVAR_REPLICATED|FCVAR_NOTIFY);
     1.8 +	g_Cvar_Nextmap = CreateConVar("sm_nextmap", "", "Sets the Next Map", FCVAR_NOTIFY);
     1.9  	
    1.10  	RegConsoleCmd("say", Command_Say);
    1.11  	RegConsoleCmd("say_team", Command_Say);
    1.12 @@ -89,8 +89,7 @@
    1.13  		g_INS = true;
    1.14  	}
    1.15  	#endif
    1.16 -	
    1.17 -	RegConsoleCmd("nextmap", Command_Nextmap);
    1.18 +
    1.19  	RegConsoleCmd("listmaps", Command_List);
    1.20  	
    1.21  	/* Set to the current map so OnMapStart() will know what to do */
    1.22 @@ -151,22 +150,15 @@
    1.23  	
    1.24  	if (strcmp(message, "nextmap", false) == 0)
    1.25  	{
    1.26 -		return Command_Nextmap(client, args);
    1.27 +		decl String:map[32];
    1.28 +		GetConVarString(g_Cvar_Nextmap, map, sizeof(map));
    1.29 +		
    1.30 +		PrintToChatAll("%t", "Next Map", map);
    1.31  	}
    1.32  	
    1.33  	return Plugin_Continue;	
    1.34  }
    1.35   
    1.36 -public Action:Command_Nextmap(client, args) 
    1.37 -{
    1.38 -	decl String:map[32];
    1.39 -	GetConVarString(g_Cvar_Nextmap, map, sizeof(map));
    1.40 -	
    1.41 -	PrintToChatAll("%t", "Next Map", map);
    1.42 -	
    1.43 -	return Plugin_Continue;
    1.44 -}
    1.45 - 
    1.46  public Action:UserMsg_VGUIMenu(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init)
    1.47  {
    1.48  	if (g_IntermissionCalled)