if you really wanted to optimize it, you could just do:
Code:
public plugin_init()
{
register_plugin("test", "", "")
}
public client_putinserver(id)
{
static test_pcvar;
if( !test_pcvar )
test_pcvar = register_cvar("amx_test_cvar", "1")
if (get_pcvar_num(test_pcvar))
client_print(0, print_chat, "test")
}