yes i know it is faster but for that speed you are sacrificing memory, or at least that is what ive read.
okay lets put it this way.
i kno that if u use it for multiple functions then pcvar is the way to go but is it better than using cvar with 1 function?
which example is better?:
PHP Code:
new test_pcvar
public plugin_init()
{
register_plugin("test", "", "")
test_pcvar = register_cvar("amx_test_cvar", "1")
}
public client_putinserver(id)
{
if (get_pcvar_num(test_pcvar))
client_print(0, print_chat, "test")
}
or
PHP Code:
public plugin_init()
{
register_plugin("test", "", "")
register_cvar("amx_test_cvar", "1")
}
public client_putinserver(id)
{
if (get_cvar_num("amx_test_cvar"))
client_print(0, print_chat, "test")
}