Code:
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
register_menucmd(register_menuid("Silver Weapons Mod"),keys,"giveWeapon")
that is plugin init
Code:
//*****{SHOWS MENU}*****
public showWeaponMenu(id)
{
new menu[192]
new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2
format(menu, 191, "Silver Weapons Mod^n^n1. Silver AK47^n2. Silver M4A1^n3. Silver AWP^n")
show_menu(id, keys, menu)
return PLUGIN_HANDLED
}
//*****{GETS BUTTON U CHOOSE ON MENU}*****
public giveWeapon(id, key)
{
if (key == 0)
{
funcbuyak(id)
}
else if (key == 1)
{
funcbuym4(id)
}
else if (key == 2)
{
funcbuyawp(id)
}
}
and that shows the menu and gets key you press but for some reason when you choose the third option is does not execute the third, why lol?
__________________