I'm having trouble making chams.
I want it to be so the visible player color is green, non-visible player color is blue, and the weapon color is red.
This is my code right now.
Code:
Hkrs.Chams.Mat = CreateMaterial("deznutz", "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1 })
Hkrs.Chams.Mat2 = CreateMaterial("deznutz", "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 0, ["$ignorez"] = 0 })
hook.Add("RenderScreenspaceEffects", "nutzjpg", function()
                local allents = ents.GetAll()
                for k = 1, #allents do
                        local v = allents[k]
                                cam.Start3D(EyePos(), EyeAngles())
                                        if (v:IsPlayer() and v:Alive() and v != LocalPlayer()) then
                                                local color = Color(0,255,0,255)
                                                local colour = Color(0,0,255,255)
                                                local colours = Color(255,0,0,255)
                                                render.SuppressEngineLighting(true)
                                                // Visible Player Chams
                                                render.SetColorModulation(color.r/255, color.g/255, color.b/255, 1)
                                                render.SetModelLighting(color.r/255, color.r/255, color.r/255, 255)
                                                render.MaterialOverride(Hkrs.Chams.Mat)
                                                v:DrawModel()
                                                // Swaggy Weapon Chams ( Already Work ) 
                                                render.SetColorModulation(colours.r/255, colours.g/255, colours.b/255, 1)
                                                render.SetModelLighting(colours.r/255, colours.r/255, colours.r/255, 255)
                                                render.MaterialOverride(Hkrs.Chams.Mat2)
                                                v:GetActiveWeapon():DrawModel()
                                                // Non-Visible Player Chams
                                                render.SetColorModulation(colour.r/255, colour.g/255, colour.b/255, 1)
                                                render.SetModelLighting(colour.r/255, colour.g/255, colour.b/255, 255)
                                                render.MaterialOverride()
                                                v:DrawModel()
                                                render.SuppressEngineLighting(false)
                                        end
                                cam.End3D()
                end
end)