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

Display all cvars


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
artist
Member
Join Date: Nov 2013
Old 01-02-2021 , 08:33   Display all cvars
Reply With Quote #1

How to sort through all the cvars?

HTML Code:
#include <sourcemod>

public OnPluginStart()
{
	RegConsoleCmd("111", test);
}
public Action:test(client, args)
{
	Handle cvar_id;
	char cvar_name[64], cvar_value[10];
	
	while(++cvar_id < Handle:1000)
	{
		GetConVarName(cvar_id, cvar_name, 64);
		GetConVarString(cvar_id, cvar_value, 10);
		
		PrintToConsole(client, "%i %s %s^n", cvar_id, cvar_name, cvar_value);
	}
	return Plugin_Handled;
}
I want to receive all my client's quars.

Last edited by artist; 01-02-2021 at 08:34.
artist is offline
StrikeR14
AlliedModders Donor
Join Date: Apr 2016
Location: Behind my PC
Old 01-02-2021 , 18:33   Re: Display all cvars
Reply With Quote #2

PHP Code:
public Action test(int clientint args)
{
    
Handle iter;
    
char buffer[256];
    
int flags;
    
bool isCommand;

    
iter FindFirstConCommand(buffersizeof(buffer), isCommandflags);
    
    do
    {
        if (!
isCommand// A ConVar
        
{
            
ReplyToCommand(client"%s (%d)"bufferflags);
        }
    }
    while (
FindNextConCommand(iterbuffersizeof(buffer), isCommandflags));
    
delete iter;
    
    return 
Plugin_Handled;

__________________
Currently taking TF2/CSGO paid private requests!

My Plugins | My Discord Account
StrikeR14 is offline
artist
Member
Join Date: Nov 2013
Old 01-03-2021 , 06:51   Re: Display all cvars
Reply With Quote #3

Thank. ))
artist is offline
Reply



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 10:36.


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