Raised This Month: $ Target: $400
 0% 

Remove Menu Keys(cvar)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ex3cuTioN
Member
Join Date: May 2010
Old 08-08-2010 , 03:00   Remove Menu Keys(cvar)
Reply With Quote #1

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<<1<<1<<2  1<<9);
show_menu(idkeysmenuBody, -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<<2  1<<9); 
Of course that dosen't work.

How can i remove keys with a cvar ?
Ex3cuTioN is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode