/* AMX Mod X script.
*
* (c) 2004, 
* This file is provided as is (no warranties).
* Messagemode Menu by biggs
* 
* Admin commands:
* amx_msgmodemenu - displays the Messagemode Menu
*
*/

#include <amxmodx>


public plugin_init()
{
	register_plugin("Messagemode Menu","1.0F","biggs")
	register_clcmd("amx_msgmodemenu","ShowMenu",-1,"- displays the Messagemode Menu")
	register_menucmd(register_menuid("\yMessagemode Menu"),1023,"MenuCommand")
	
	return PLUGIN_CONTINUE
}

public ShowMenu( id )
{
	new szMenuBody[256]
	new keys

	new nLen = format( szMenuBody, 255, "\yMessagemode Menu^n" )
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w1. Admin Chat" )
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w2. Server Chat" )
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w3. Private Chat <name>" )
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w4. CSAY <colour>" )
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w5. TSAY <colour>" )
	nLen += format( szMenuBody[nLen], 255-nLen, "^n\w6. Scrollsay <colour>" )
	nLen += format( szMenuBody[nLen], 255-nLen, "^n^n\w0. Exit" )

	keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<9)
	
	show_menu( id, keys, szMenuBody, -1 )

	return PLUGIN_CONTINUE
}

public MenuCommand( id, key )
{
switch( key )
{
 case 0:
 {
  server_cmd("amx_chatmode") 
 }
 case 1:
 {
  server_cmd("amx_saymode") 
 }
 case 2:
 {
  server_cmd("amx_psaymode") 
 }
 case 3:
 {
  server_cmd("amx_csayymode")
 }
 case 4:
 {
  server_cmd("amx_tsayymode") 
 }
 case 5:
 {
  server_cmd("amx_scrollsayymode")  
 }
    } 
return PLUGIN_HANDLED
}