You didn't fully understand how things work apparently.
First, learn to post all information available, including compile or in-game errors because it may help people to quickly help you without testing the code... which some people might not have time to do.
Now...
- Strings aren't returned, you need to parse them in the function and they need to be declared as arrays... read the
pawn tutorial from AMXX wiki to fully understand variables and their types.
Code:
new pCvar_hostname
//...
pCvar_hostname = get_cvar_pointer("hostname")
//...
new szHostname[64]
get_pcvar_string(pCvar_hostname, szHostname, charsmax(szHostname))
- Float variables need to have a tag or they'll give out a warning:
Code:
new pCvar_freezetime
//...
pCvar_freezetime = get_cvar_pointer("mp_freezetime")
//...
new Float:fFreezetime = get_pcvar_float(pCvar_freezetime)
- Variables are NEVER passed surrounded by quotes (meaning get_pcvar_string("g_fHostname") is wrong and get_pcvar_string(g_fHostname) is right)
- Don't use that variable notation style (it's called
hungarian notation) if you don't understand it... f or fl is for float values, i is for integer/numbers, sz for strings, etc... but you seem to assign them randomly. You don't have to use those prefixes but if you want to, I suggest you learn their meaning first.
__________________