plugins/nextmap.sp
changeset 1793 735f79933e12
parent 1783 e6e2f440376d
child 1947 e73a1e51833b
     1.1 --- a/plugins/nextmap.sp	Fri Dec 14 06:19:42 2007 +0000
     1.2 +++ b/plugins/nextmap.sp	Fri Dec 14 06:20:07 2007 +0000
     1.3 @@ -75,6 +75,11 @@
     1.4  	
     1.5  	RegConsoleCmd("say", Command_Say);
     1.6  	RegConsoleCmd("say_team", Command_Say);
     1.7 +	
     1.8 +	if (GetCommandFlags("nextmap") == INVALID_FCVAR_FLAGS)
     1.9 +	{
    1.10 +		RegServerCmd("nextmap", Command_Nextmap);
    1.11 +	}
    1.12  
    1.13  	RegAdminCmd("sm_setnextmap", Command_SetNextmap, ADMFLAG_CHANGEMAP, "sm_setnextmap <map>");
    1.14  	RegConsoleCmd("listmaps", Command_List);
    1.15 @@ -128,7 +133,7 @@
    1.16  		decl String:map[32];
    1.17  		GetConVarString(g_Cvar_Nextmap, map, sizeof(map));
    1.18  		
    1.19 -		PrintToChatAll("%t", "Next Map", map);
    1.20 +		PrintToChat(client, "%t", "Next Map", map);
    1.21  	}
    1.22  	
    1.23  	return Plugin_Continue;	
    1.24 @@ -217,6 +222,17 @@
    1.25  	
    1.26  	return Plugin_Handled;
    1.27  }
    1.28 +
    1.29 +public Action:Command_Nextmap(args)
    1.30 +{
    1.31 +	decl String:map[64];
    1.32 +	
    1.33 +	GetConVarString(g_Cvar_Nextmap, map, sizeof(map));
    1.34 +	
    1.35 +	ReplyToCommand(0, "%t", "Next Map", map);
    1.36 +	
    1.37 +	return Plugin_Handled;
    1.38 +}
    1.39   
    1.40  public Action:Timer_ChangeMap(Handle:timer, Handle:dp)
    1.41  {