Quote:
Originally Posted by HamletEagle
PHP Code:
new buffer[size]
get_pcvar_string(cvar, buffer, charsmax(buffer))
//do something with buffer
This is more or less pseudocode, adapt it to your situation. The idea is you do not pass the size of a string manually, you use charsmax() to determine it automatically. This way, you don't pass a wrong value and if you ever change the string size then you do not need to change it in every function that uses it.
|
I understood. So in this situation, I can set size of string, because It will be one char always.
Other question to this situation. When I change the value of cvar (amxx_lights) in example, to "m" on the server, it will change the light without waiting to next round. How can I do this?