i try this code:
PHP Code:
#include <amxmodx>
#include <engine>
#include <engine_const>
#include <fun>
#include <fakemeta>
#include <fakemeta_const>
public plugin_init()
{
register_plugin("turbexEvolution", "1.0", "tUrBeX");
/* Para el menú de jugadores */
register_clcmd("change_class", "myClassMenu", -1, "Menú de jugadores");
register_menucmd(register_menuid("[ Menú de jugadores (1/2) ]"), 1023, "myMenuClassCommand");
register_menucmd(register_menuid("[ Menú de jugadores (2/2) ]"), 1023, "myMenuClass2Command");
/* fin menú de jugadores */
return PLUGIN_CONTINUE;
}
public myClassMenu(id)
{
new szMenuBody[256];
new keys;
format(szMenuBody, 255, "[ Escoger jugador (1/2) ]^n1. [ Buu ]^n2. [ Goku ]^n3. [ Gohan ]^n4. [ Krillin ]^n5. [ Frieza ]^n6. [ Piccolo ]^n7. [ Trunks ]^n8. [ Vegeta ]^n9.[ Siguiente ]^n^n0. Salir");
keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9);
show_menu(id, keys, szMenuBody, -1);
return PLUGIN_HANDLED;
}
public myMenuClassCommand(id , key)
{
switch(key)
{
case 0:
{
client_cmd(id,"buu");
}
case 1:
{
client_cmd(id,"goku");
}
case 2:
{
client_cmd(id,"gohan");
}
case 3:
{
client_cmd(id,"krillin");
}
case 4:
{
client_cmd(id,"frieza");
}
case 5:
{
client_cmd(id,"piccolo");
}
case 6:
{
client_cmd(id,"trunks");
}
case 7:
{
client_cmd(id,"vegeta");
}
case 8:
{
myClass2Menu(id);
}
case 9: client_print(id, print_chat, "-");
}
return PLUGIN_HANDLED;
}
public myClass2Menu(id)
{
new szMenuBody[256];
new keys;
format(szMenuBody, 255, "[ Escoger jugador (2/2) ]^n1. [ Cell ]^n2. [ OtherPlayer ]^n3. [ --- ]^n4. [ --- ]^n5. [ --- ] ^n6. [ --- ]^n7. [ --- ]^n8. [ --- ]^n9. [ Anterior ]^n^n0. Salir");
keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9);
show_menu(id, keys, szMenuBody, -1);
return PLUGIN_HANDLED;
}
public myMenuClass2Command(id , key)
{
switch(key)
{
case 0:
{
client_cmd(id,"cell");
}
case 1:
{
client_print(id, print_chat, "other player");
}
case 2:
{
client_print(id, print_chat, "-");
}
case 3:
{
client_print(id, print_chat, "-");
}
case 4:
{
client_print(id, print_chat, "-");
}
case 5:
{
client_print(id, print_chat, "-");
}
case 6:
{
client_print(id, print_chat, "-");
}
case 7:
{
client_print(id, print_chat, "-");
}
case 8:
{
myClassMenu(id);
}
case 9: client_print(id, print_chat, "-");
}
return PLUGIN_HANDLED;
}
this is a my class menu, when i press "c" (menu class) the plugin shows the menu, but.... if i press a number (any option of menu)... show a menu of add bot.... why¿?
in few words.... the plugin doesnt work correctly... only show the menu... but... if i press a option... shows the add bot menu.
any idea¿?
thanks!