Hi,
I have a problem, and i don't know how to solve it.
I have a menu with 3 options.
1.He grenade
2.Flash grenade
3.Smoke grenade
I have 3 cvars
amx_he_on 1
amx_flash_on 0
amx_smoke_on 0
And i want to remove the specified key if the cvar is 0 for the specified grenade.
Now you see the keys, from my cvars 1(on-enabled), and 2(off-disabled)
PHP Code:
new keys = (1<<0 | 1<<1 | 1<<2 | 1<<9);
show_menu(id, keys, menuBody, -1, "Shop");
I want when i press 2 or 3 to do nothing.
A stupid methode will be
PHP Code:
new keys = (if(get_pcvar_num(he_on)) {1<<0} | 1<<1 | 1<<2 | 1<<9);
Of course that dosen't work.
How can i remove keys with a cvar ?