So I know the basics of sourcepawn which is how I made this, I also know how to make convars but I dont know how to make a ConVar kill the plugin. So far I've tried this:
PHP Code:
public OnPluginStart()
{
h_Enabled = CreateConVar("sm_timepoints_enabled", "1", "Is time points enabled? 1 = yes, 0 = no. Defualt = 1", FCVAR_NOTIFY|FCVAR_DONTRECORD);
new IsEnabled = GetConVarInt(h_Enabled);
if(IsEnabled == 0)
{
EndPlugin();
}
CreateDirectory("addons/sourcemod/data/stats", 3);
BuildPath(Path_SM, KVPath, sizeof(KVPath), "data/stats/playerinfo.txt");
RegConsoleCmd("sm_points", Command_getPoints, "");
}
Then later in the code:
PHP Code:
public Action:EndPlugin()
{
return Plugin_Handled;
}
There's probably something very clear and obvious that I'm doing wrong, but I just started.