Or you can do menu like this if you want:
Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
register_plugin("Menu","0.1","LynX")
register_clcmd( "Menu","NewMenu", -1, "Show the selection menu" )
register_menucmd( register_menuid("Choose option:"), 1023, "MenuCommand" )
return PLUGIN_HANDLED
}
public NewMenu( id )
{
new szMenuBody[256]
new keys
format( szMenuBody, 255, "Choose :^n1. Option 1^n2 Option 2^n3. Option 3^n^n0. Exit" )
keys = (1<<0|1<<1|1<<2|1<<9)
show_menu( id, keys, szMenuBody, -1 )
return PLUGIN_HANDLED
}
public MenuCommand( id , key )
{
switch( key )
{
case 0: {
client_print(id, print_chat,"Option 1")
}
case 1: {
client_print(id, print_chat, "Option2")
}
case 2: {
client_print(id, print_chat, "Option 3")
}
case 3: client_print( id, print_chat, "Closed the selection menu" )
}
return PLUGIN_HANDLED
}
Works 100%
__________________