plugins/nextmap.sp
changeset 2194 e4ab469a0003
parent 2083 3dcbef056e44
child 2203 159ab9bad58c
     1.1 --- a/plugins/nextmap.sp	Fri Jul 11 08:18:43 2008 +0000
     1.2 +++ b/plugins/nextmap.sp	Fri Jul 11 08:31:57 2008 +0000
     1.3 @@ -36,6 +36,7 @@
     1.4  #include <sourcemod>
     1.5  #include "include/nextmap.inc"
     1.6  
     1.7 +new Handle:g_Cvar_TriggerShow = INVALID_HANDLE;
     1.8   
     1.9  public Plugin:myinfo = 
    1.10  {
    1.11 @@ -85,6 +86,8 @@
    1.12  	{
    1.13  		FindAndSetNextMap();
    1.14  	}
    1.15 +	
    1.16 +	g_Cvar_TriggerShow = FindConVar("sm_trigger_show");
    1.17  }
    1.18  
    1.19  public Action:Command_Say(client, args)
    1.20 @@ -109,8 +112,15 @@
    1.21  	{
    1.22  		decl String:map[32];
    1.23  		GetNextMap(map, sizeof(map));
    1.24 -		
    1.25 -		PrintToChat(client, "[SM] %t", "Next Map", map);
    1.26 +			
    1.27 +		if(g_Cvar_TriggerShow != INVALID_HANDLE && GetConVarInt(g_Cvar_TriggerShow))
    1.28 +		{
    1.29 +			PrintToChatAll("[SM] %t", "Next Map", map);
    1.30 +		}
    1.31 +		else
    1.32 +		{
    1.33 +			PrintToChat(client, "[SM] %t", "Next Map", map);
    1.34 +		}
    1.35  	}
    1.36  	
    1.37  	return Plugin_Continue;	
    1.38 @@ -162,7 +172,14 @@
    1.39  	
    1.40  	GetNextMap(map, sizeof(map));
    1.41  	
    1.42 -	ReplyToCommand(client, "[SM] %t", "Next Map", map);
    1.43 +	if(g_Cvar_TriggerShow != INVALID_HANDLE && GetConVarInt(g_Cvar_TriggerShow))
    1.44 +	{
    1.45 +		PrintToChatAll("[SM] %t", "Next Map", map);
    1.46 +	}
    1.47 +	else
    1.48 +	{
    1.49 +		ReplyToCommand(client, "[SM] %t", "Next Map", map);
    1.50 +	}
    1.51  	
    1.52  	return Plugin_Handled;
    1.53  }