Creating and reading CVars

Hi there, I would like some help with CVars…
Right now I am creating a CVar with CreateClientConVar( “test_cvar”, “1”, true, true ) but I am having difficulties reading a client’s value of it server side.
Could someone please give me a snippet of code that would read the client’s cvar and work in an if statement?
Thanks.



if ply:GetInfoNum("test_cvar",1) == 1 then
print("tested")
else
print("test")
end


Thank you Gedo, I thought I had already tried this, but I guess I did something wrong the first time.