Thread: [Solved] amxx 1.9 crash
View Single Post
Kushfield
Member
Join Date: Jan 2017
Location: Estonia
Old 10-17-2018 , 08:48   Re: amxx 1.9 crash
Reply With Quote #4

Quote:
Originally Posted by iceeedr View Post
I had not really understood then, the correct use of the native bind_pcvar_ *, with the example quoted by me, how could I assign a value to pcvar? Or do I have to create just the pcvar with create_cvar and use it normally?
That's right, if you need to change the cvar's value, you have to store the return value from create_cvar and pass that to the set_pcvar_* functions as you normally would.

The bind_pcvar_* functions just set the passed in variable to the cvar's value and keep it automatically updated. That saves you from using get_pcvar_*/get_cvar_* every time you need to use the cvar's value.
Kushfield is offline