Added "motd" chat trigger to basetriggers (bug 2694, r=dvander)
authorErik Minekus <tsunami@tsunami-productions.nl>
Mon Aug 24 09:13:37 2009 +1200 (2009-08-24)
changeset 277945b3d5d9b873
parent 2778 4a089866eb3e
child 2780 4b04744461ac
Added "motd" chat trigger to basetriggers (bug 2694, r=dvander)
plugins/basetriggers.sp
     1.1 --- a/plugins/basetriggers.sp	Mon Aug 24 09:11:42 2009 +1200
     1.2 +++ b/plugins/basetriggers.sp	Mon Aug 24 09:13:37 2009 +1200
     1.3 @@ -80,6 +80,7 @@
     1.4  	
     1.5  	RegConsoleCmd("timeleft", Command_Timeleft);
     1.6  	RegConsoleCmd("nextmap", Command_Nextmap);
     1.7 +	RegConsoleCmd("motd", Command_Motd);
     1.8  	
     1.9  	HookConVarChange(g_Cvar_TimeleftInterval, ConVarChange_TimeleftInterval);
    1.10  
    1.11 @@ -207,6 +208,13 @@
    1.12  	return Plugin_Handled;
    1.13  }
    1.14  
    1.15 +public Action:Command_Motd(client, args)
    1.16 +{
    1.17 +	ShowMOTDPanel(client, "Message Of The Day", "motd", MOTDPANEL_TYPE_INDEX);
    1.18 +
    1.19 +	return Plugin_Handled;
    1.20 +}
    1.21 +
    1.22  public Action:Command_Say(client, args)
    1.23  {
    1.24  	decl String:text[192], String:command[64];
    1.25 @@ -309,6 +317,10 @@
    1.26  			}
    1.27  		}
    1.28  	}
    1.29 +	else if (strcmp(text[startidx], "motd", false) == 0)
    1.30 +	{
    1.31 +		ShowMOTDPanel(client, "Message Of The Day", "motd", MOTDPANEL_TYPE_INDEX);
    1.32 +	}
    1.33  	
    1.34  	return Plugin_Continue;
    1.35  }