Raised This Month: $ Target: $400
 0% 

(Cvar Utilities) Hooking cvar question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-12-2011 , 17:29   Re: (Cvar Utilities) Hooking cvar question
Reply With Quote #2

You can do directly either :

Code:
CvarHookChange( register_cvar( "advanced_menu_chicken_sound", "1" ), "OnChange" );

or :

Code:
new handleCvar = register_cvar( "advanced_menu_chicken_sound", "1" ); CvarHookChange( handleCvar, "OnChange" );

or using CvarRegister :

Code:
new handleCvar = CvarRegister( "advanced_menu_chicken_sound", "1", "Enable/Disable Chicken sound" ); CvarHookChange( handleCvar, "OnChange" );

Now, you say it doesn't work. It doesn't help.

- Show the whole code
- Check the console output if you see errors
- You can also check the return value of CvarHookChange
__________________
Arkshine 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 19:49.


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