Whats wrong?


CreateClientConVar("gmans_test", 0)

then



local test = 0
local test2 = 0


then


cvars.AddChangeCallback("gmans_test", function( )
	if ( GetConVarNumber( "gmans_test" ) == 1 ) then
	test and test2 = 1	
	end
end );

and is a logical operator. To achieve your desired effect, replace it with a comma.

It also says there was an unexpected symbol near


if ( GetConVarNumber( "gmans_test" ) == 1 ) then

line was that it?

I can’t see anything wrong with the rest of the code, you’ll have to send it all, not just portions.

test, test2 = 1, 1

you need to define both.