Code:
public gaben(id)
{
if(bool1[id])
{
client_print(id,print_chat, "bool1 error");
return PLUGIN_HANDLED;
}
if(bool2[id])
{
client_print(id,print_chat, "bool2 error");
return PLUGIN_HANDLED;
}
new lawl[256];
new key = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
format(lawl,sizeof(lawl), "menu name^n");
add(lawl,sizeof(lawl), "^n1. gaben");
add(lawl,sizeof(lawl), "^n2. yams");
add(lawl,sizeof(lawl), "^n3. turtle");
add(lawl,sizeof(lawl), "^n4. squirrel");
add(lawl,sizeof(lawl), "^n5. exit game");
add(lawl,sizeof(lawl), "^n6. sandwich");
add(lawl,sizeof(lawl), "^n^n0. Exit");
show_menu(id,key,lawl);
return PLUGIN_CONTINUE;
}
public gaben_exec(id, key)
{
if(key == 0) func1(id);
else if(key == 1) func2(id);
else if(key == 2) func3(id)
else if(key == 3) func4(id);
else if(key == 4) func5(id);
else if(key == 5) func6(id);
else if(key == 9) return PLUGIN_HANDLED;
return PLUGIN_HANDLED;
}
No errors what so ever. Nor any warnings. The menu shows up, nothing functions. Yes, the functions do exist. Also the execute is registered in public plugin init.
Code:
register_menucmd(register_menuid("menu name:"), 1023, "gaben_exec");
__________________