For a cvar to be accessible via a .cfg file, shall i do it like this?
PHP Code:
public plugin_init()
{
gCreditKill = register_cvar( "normal_kill", "1" )
gCreditHs = register_cvar( "headshot_kill", "2" )
gCreditHe = register_cvar( "henade_kill", "3" )
gCreditKnife = register_cvar( "knife_kill", "5" )
gVipCosts = register_cvar( "vip_costs", "3600" )
LoadConfig()
}
LoadConfig( )
{
new config[64];
get_configsdir(config, charsmax(config));
add(config, charsmax(config), "/credits.cfg");
if(file_exists(config))
{
server_cmd("exec %s", config);
server_exec();
}
}
And, then, add all cvars in the file. (credits.cfg in this case)
__________________