Hey, why the hell when I open menu number 1 (Keysrod1 ...), and I press any key, it opens the Pressedrod of menu number 0...
Here is my code:
PHP Code:
#define Keysrod (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)
#define Keysrod1 (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)
PHP Code:
register_menucmd(register_menuid("rod"), Keysrod, "Pressedrod");
register_menucmd(register_menuid("rod1"), Keysrod1, "Pressedrod1");
PHP Code:
public Showrod(id){
show_menu(id, Keysrod, "\wColor explanation:^n\y'n*' - normal color text ( depends on con_color )^n't*' - team color text ( depends on team )^n'g*' - green text color^n\wWelcome message example: g*Hello t*boys n*and t*girls", -1, "rod");
}
public Pressedrod(id, key) {
switch (key) {
default:
{
client_cmd(id, "speak sound/confirmed0" );
WelmsgMenu(id);
}
}
}
PHP Code:
public Showrod1(id){
new list[256];
new vipnames[33][33];
new count;
new x;
new msg[256], iLen;
for(x = 1; x <= 33; x++){
if(is_user_connected(x))
if(iVip[id] == 1)
get_user_name(x, vipnames[count++], 32);
}
if(count == 0)
{
formatex(list, 255, "\yNo admins online");
}
else
{
for(new i = 0 ; i < count ; i++) {
iLen += format(msg[iLen], 255-iLen, "\w%s^n", vipnames[i]);
}
formatex(list, 255, "\wAdmins online \y[ \w%d\y ]\w:^n%s", count, msg);
show_menu(id, Keysrod1, list, -1, "rod1");
}
}
public Pressedrod1(id, key) {
switch (key) {
default:
{
}
}
return PLUGIN_CONTINUE;
}
When I open the menu with admin list, then press any key the pressed key affects to pressedrod menu ... and it opens me WelmsgMenu...