Raised This Month: $32 Target: $400
 8% 

[SOLVED] ConVar Change Hook


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vit_amin
Senior Member
Join Date: Dec 2015
Location: Russian Federation
Old 01-23-2016 , 11:28   [SOLVED] ConVar Change Hook
Reply With Quote #1

How Hook this in pawn ?

Last edited by Vit_amin; 01-23-2016 at 21:33.
Vit_amin is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 01-23-2016 , 11:36   Re: ConVar Change Hook
Reply With Quote #2

Try this Module: Cvar Utilities (v1.6) by Arkshine.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 01-23-2016 at 11:38. Reason: spelling fix
addons_zz is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-23-2016 , 11:38   Re: ConVar Change Hook
Reply With Quote #3

Are you asking for SM or AMX-X?
__________________
Bugsy is offline
Vit_amin
Senior Member
Join Date: Dec 2015
Location: Russian Federation
Old 01-23-2016 , 11:38   Re: ConVar Change Hook
Reply With Quote #4

Amx Mod
Vit_amin is offline
Vit_amin
Senior Member
Join Date: Dec 2015
Location: Russian Federation
Old 01-23-2016 , 11:39   Re: ConVar Change Hook
Reply With Quote #5

What is this func ?
register_forward(FM_CVarGetString, "Event_CvarChange")
I doesn't test, because don't know what is params in callback
Vit_amin is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-23-2016 , 11:51   Re: ConVar Change Hook
Reply With Quote #6

Just use CVar Utilities. If there was an easier/out of the box way to do this, Arkshine would not have made the module. You are welcome to experiment and try things of course.
__________________

Last edited by Bugsy; 01-23-2016 at 11:52.
Bugsy is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-23-2016 , 12:00   Re: ConVar Change Hook
Reply With Quote #7

If you are using AMXX 1.8.3, then you can also hook cvar changes without any additional modules, using hook_cvar_change.
klippy is offline
Vit_amin
Senior Member
Join Date: Dec 2015
Location: Russian Federation
Old 01-23-2016 , 12:19   Re: ConVar Change Hook
Reply With Quote #8

Thank, but where find Stable 1.8.3 (in Download page only SnapShots) ?

Last edited by Vit_amin; 01-23-2016 at 12:19.
Vit_amin is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 01-23-2016 , 12:20   Re: ConVar Change Hook
Reply With Quote #9

They are stable snapshots, and should be safe to use.
__________________
ddhoward is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-23-2016 , 12:30   Re: ConVar Change Hook
Reply With Quote #10

If possible, it's recommenced to not use CvarUtilities, it does some silly thing. Implementation in 1.8.3-dev is overall better.
__________________
Arkshine is offline
Reply


Thread Tools
Display Modes

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 20:24.


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