[CODE]CreateClientConVar("gmans_test", 0)[/CODE]
then
[CODE]
local test = 0
local test2 = 0
[/CODE]
then
[CODE]cvars.AddChangeCallback("gmans_test", function( )
if ( GetConVarNumber( "gmans_test" ) == 1 ) then
test and test2 = 1
end
end );[/CODE]
[i]and[/i] is a logical operator. To achieve your desired effect, replace it with a comma.
It also says there was an unexpected symbol near [CODE]if ( GetConVarNumber( "gmans_test" ) == 1 ) then[/CODE] 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.
Sorry, you need to Log In to post a reply to this thread.