You should really watch your indenting, it can help you find errors...
Code:
#include <amxmodx>
#include <fun>
public plugin_init()
{
register_plugin("hitzone_menu()", "1.0" ,"Belsebub")
register_clcmd( "say /menu","ShowMenu", -1, "Shows The menu" )
register_menucmd(register_menuid("\yRemove Hitzones:"), 1023, "MenuCommand" )
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public ShowMenu( id )
{
new szMenuBody[256]
new keys
new len = format( szMenuBody, 255, "\yRemove Hitzones:^n" )
len += format( szMenuBody[len], 255-len, "^n\w1. Remove head" )
len += format( szMenuBody[len], 255-len, "^n\w2. Remove chest" )
len += format( szMenuBody[len], 255-len, "^n\w3. Remove stomach" )
len += format( szMenuBody[len], 255-len, "^n\w4. Remove arms" )
len += format( szMenuBody[len], 255-len, "^n\w5. Remove legs" )
len += format( szMenuBody[len], 255-len, "^n^n\w6. Exit Option Name" )
keys = (1<<0|1<<1|1<<2|1<<3|1<<41<<5)
show_menu( id, keys, szMenuBody, -1 )
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public MenuCommand( id, key )
{
client_print( id, print_console, "[AMX] Key=%d", key )
client_print( id, print_chat, "[AMX] Key=%d", key )
switch( key )
{
case 0:
{
client_print(id, print_chat, "You have selected choice number 1")
remove_head(id)
}
case 1:
{
client_print(id, print_chat, "You have selected choice number 2")
remove_chest(id)
}
case 2:
{
client_print(id, print_chat, "You have selected choice number 3")
remove_stomach(id)
}
case 3:
{
client_print(id, print_chat, "You have selected choice number 4")
remove_arms(id)
}
case 4:
{
client_print(id, print_chat, "You have selected choice number 5")
remove_legs(id)
}
case 5:
{
client_print(id, print_chat, "You Have Exit The Menu")
}
}
return PLUGIN_HANDLED
}
//----------------------------------------------------------------------------------------------
public remove_head(id)
{
set_user_hitzones(0,id,253)
new Name[32]
get_user_name(id,Name,31)
console_print(id, "set_user_hitzones(0,id,253) done.")
client_print(0,print_chat,"Nobody can hit %s with their guns",Name)
return PLUGIN_HANDLED
}
//----------------------------------------------------------------------------------------------
public remove_chest(id)
{
set_user_hitzones(0,id,251)
new Name[32]
get_user_name(id,Name,31)
console_print(id, "set_user_hitzones(0,id,251) done.")
client_print(0,print_chat,"Nobody can hit %s with their guns",Name)
return PLUGIN_HANDLED
}
//----------------------------------------------------------------------------------------------
public remove_stomach(id)
{
set_user_hitzones(0,id,247)
new Name[32]
get_user_name(id,Name,31)
console_print(id, "set_user_hitzones(0,id,247) done.")
client_print(0,print_chat,"Nobody can hit %s with their guns",Name)
return PLUGIN_HANDLED
}
//----------------------------------------------------------------------------------------------
public remove_arms(id)
{
set_user_hitzones(0,id,207)
new Name[32]
get_user_name(id,Name,31)
console_print(id, "set_user_hitzones(0,id,207) done.")
client_print(0,print_chat,"Nobody can hit %s with their guns",Name)
return PLUGIN_HANDLED
}
//----------------------------------------------------------------------------------------------
public remove_legs(id)
{
set_user_hitzones(0,id,63)
new Name[32]
get_user_name(id,Name,31)
console_print(id, "set_user_hitzones(0,id,63) done.")
client_print(0,print_chat,"Nobody can hit %s with their guns",Name)
return PLUGIN_HANDLED
}