View Single Post
hlsavior
Junior Member
Join Date: Sep 2012
Old 10-26-2012 , 20:33   Re: [ANY] Time Point System
Reply With Quote #3

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_SMKVPathsizeof(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.

Last edited by hlsavior; 10-26-2012 at 21:03. Reason: Helpo
hlsavior is offline