29.07.2016, 16:23
So I wanted the get the stream_distance set in server.cfg, which is a float value.
Since there is no GetConsoleVarAsFloat function, I've tried the approach found in this thread: click.
But whenever I execute GetConsoleVarAsFloat("stream_distance"); the server crashes immediately.
GetConsoleVarAsInt and GetConsoleVarAsBool don't return the correct value obviously.
I have this line in my server.cfg file:
Does anyone know a solution?
Since there is no GetConsoleVarAsFloat function, I've tried the approach found in this thread: click.
Код:
stock Float:GetConsoleVarAsFloat(var[]) { new string[30]; GetConsoleVarAsString(var, string, sizeof(string)); //Crash happens here return floatstr(string); }
GetConsoleVarAsInt and GetConsoleVarAsBool don't return the correct value obviously.
I have this line in my server.cfg file:
Код:
stream_distance 300.0