Raised This Month: $ Target: $400
 0% 

Full cvar list + protected and private ones [TF2]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MikeJS
Senior Member
Join Date: Nov 2008
Old 04-04-2009 , 06:45   Re: Full cvar list + protected and private ones [TF2]
Reply With Quote #4

PHP Code:
#pragma semicolon 1
#include <sourcemod>
#if !defined FCVAR_DEVELOPMENTONLY
#define FCVAR_DEVELOPMENTONLY (1<<1)
#endif
public OnPluginStart() {
    
RegAdminCmd("sm_cvarlist"Command_cvarsADMFLAG_CONVARS);
    
RegAdminCmd("sm_cmdlist"Command_cmdsADMFLAG_CONVARS);
}
public 
Action:Command_cvars(clientargs) {
    
decl String:name[64], String:value[64];
    new 
Handle:cvarbool:isCommandflags;
    
cvar FindFirstConCommand(namesizeof(name), isCommandflags);
    if(
cvar==INVALID_HANDLE) {
        
PrintToConsole(client"Could not load cvar list");
        return 
Plugin_Handled;
    }
    do {
        if(
isCommand || !(flags FCVAR_DEVELOPMENTONLY)) {
            continue;
        }
        
// GetConVarString(FindConVar(name), value, sizeof(value));
        
PrintToConsole(client"%s"name);
    } while(
FindNextConCommand(cvarnamesizeof(name), isCommandflags));
    return 
Plugin_Handled;
}
public 
Action:Command_cmds(clientargs) {
    
decl String:name[64];
    new 
Handle:cvarbool:isCommandflags;
    
cvar FindFirstConCommand(namesizeof(name), isCommandflags);
    if(
cvar==INVALID_HANDLE) {
        
PrintToConsole(client"Could not load cvar list");
        return 
Plugin_Handled;
    }
    do {
        if(!
isCommand || !(flags FCVAR_DEVELOPMENTONLY)) {
            continue;
        }
        
PrintToConsole(client"%s"name);
        
flags &= ~FCVAR_DEVELOPMENTONLY;
        
SetCommandFlags(nameflags);
    } while(
FindNextConCommand(cvarnamesizeof(name), isCommandflags));
    return 
Plugin_Handled;

__________________
MikeJS is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:47.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode