Raised This Month: $12 Target: $400
 3% 

[TF2] Locked Commands and ConVars


Post New Thread Reply   
 
Thread Tools Display Modes
Bijou
Junior Member
Join Date: Jan 2014
Old 01-27-2014 , 06:59   Re: [TF2] Locked Commands and ConVars
Reply With Quote #11

Thanks !
Bijou is offline
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 07-23-2017 , 00:59   Re: [TF2] Locked Commands and ConVars
Reply With Quote #12

hey hey hey
PHP Code:
public void OnPluginStart() 
{
    
Handle file OpenFile("console.txt""w");
    
char name[256]
    
bool isCommandflags;
    
char description[512];
    
Handle iterator FindFirstConCommand(namesizeof(name), isCommandflagsdescriptionsizeof(description));
    do 
    {
        if(
flags && FCVAR_DEVELOPMENTONLY != FCVAR_DEVELOPMENTONLY
        {
            continue;
        }
        
        
WriteFileLine(file"Locked %s: %s - %s"isCommand "command" "cvar"namedescription);
        if(
isCommand
        {
            
SetCommandFlags(nameGetCommandFlags(name) & ~FCVAR_DEVELOPMENTONLY);
        } 
        else 
        {
            
Handle convar FindConVar(name);
            
SetConVarFlags(convarGetConVarFlags(convar) & ~FCVAR_DEVELOPMENTONLY);
        }
    } 
    while(
FindNextConCommand(iteratornamesizeof(name), isCommandflagsdescriptionsizeof(description)));
    
CloseHandle(iterator);
    
CloseHandle(file);

cigzag is offline
Reply


Thread Tools
Display Modes

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 11:13.


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