Code not workin

[lua]
hideconvar = CreateClientConVar( “undercover”, 0, true, false )

function CustomColors(ply)
if hideconvar:GetInt( 0 ) then
if ply:IsUserGroup(“owner”) then
return Color(255,0,0,255)
elseif ply:IsUserGroup(“headadmin”) then
return Color(160,32,240)
elseif ply:IsUserGroup(“admin”) then
return Color(34,139,34,255)
elseif ply:IsUserGroup(“vip”) then
return Color(72,118,255,255)
end
elseif hideconvar:GetInt(1)
and !ply:IsUserGroup(“user”)
and !ply:IsUserGroup(“vip”) then
return Color(255,255,255,255)
end
end
hook.Add(“TTTScoreboardColorForPlayer”, “CustomColors”, CustomColors)
[/lua]

My friend asked me to make me something for his TTT to make someone’s name go white when the convar is 1 and back to what it should be when the convar is 0. I’m not sure why this doesn’t work, help?

For starters I doubt that is a valid hook.

It is because it works but it only gets called once?

Like it colors the names but it doesn’t change after you change the ConVar



    if hideconvar:GetInt( 0 ) then




    if hideconvar:GetInt() == 0 then


Thanks a ton, man!
Code now works, but it only removes everyone’s color for the person who typed it in the console.
I want it to be able to make ONLY the person’s name white if they are admin and up.