Checking when a console command is used.

Heres me code now how do I check if the gmans_test is used in console?

CreateClientConVar(“gmans_test”, 0)

You could add a callback for that command:

is that right?

cvars.AddChangeCallback(“gmans_test”, function()
if GetConVarNumber(“gmans_test”) == 1 then

cvars.AddChangeCallback("gmans_test", function( )
	if ( GetConVarNumber( "gmans_test" ) == 1 ) then
		print( "stuff" );
end ); -- end for the function( ) and ); for the cvars.AddChangeCallback

Close, missing tabs for beautifying it, an end for the function and an end parenthesis ) for the function call.

I’m confused, are you trying to make a console command, or are you just trying to check when the cvar is changed…