Quote:
Originally Posted by iceeedr
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.