AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   menu opition (https://forums.alliedmods.net/showthread.php?t=144391)

zombieplague 12-03-2010 08:35

menu opition
 
this code is from nade modes plugin. i was wondering if it is possible to make menu option

like in nade modes cvar.

PHP Code:

add_option_tritoggle(menuOPTION_MATERIAL_SYSTEM"Interaction system""\rOff""\ySecondary Explosions""\yHit Point System"

you can off or on

the idea is here

PHP Code:

     static Menu

     SettingsMenu
id ] = menu_create"weapons""weapons_Handler" )

     
Menu SettingsMenuid ]

     
add_option_toggleMenu"first Weapon:""M4A1""AK-47" )

     
add_option_toggleMenu"second Weapon:""Deagle""Glock" 

instead of buying the weapon. using menu to buy like if you want to buy ak-47 you have to press 2 time ?

first is M4a1 then ak-47

fysiks 12-03-2010 13:44

Re: menu opition
 
You have to keep track of what is being shown in a particular menu option and then in the handler rebuild the menu with the new menu option (if they chose the "toggled" menu option.

zombieplague 12-03-2010 23:19

Re: menu opition
 
Quote:

Originally Posted by fysiks (Post 1362158)
You have to keep track of what is being shown in a particular menu option and then in the handler rebuild the menu with the new menu option (if they chose the "toggled" menu option.

so you mean i have to store the value ? i am new to menu, any clues ?


All times are GMT -4. The time now is 11:19.

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