❓ LUA Garry's Mod making a Chams ESP
So, as the title says. I want to make a chams ESP script, and I have looked at other codes for examples to try to learn but I couldn't figure it out my self (I am not really good with these types of things)
So, I was wondering if one of you here could help me. Here is the code I currently have, also note: this code works, but it only displays one color. And I want it to display red and/or green for non visible players (depending if they are on the same team or not, green is same team and red isnt) and also to not display or alter anything when the player is directly visible.
So, I was wondering if one of you here could help me. Here is the code I currently have, also note: this code works, but it only displays one color. And I want it to display red and/or green for non visible players (depending if they are on the same team or not, green is same team and red isnt) and also to not display or alter anything when the player is directly visible.
Code:
local chams_mat = CreateMaterial("deznutz", "VertexLitGeneric", { ["$basetexture"] = "models/debug/debugwhite", ["$model"] = 0, ["$ignorez"] = 0 })
hook.Add("HUDPaintBackground", "LL_HudDrawHook", function()
local color = Color(0,255,0)
local color2 = Color(255,0,0)
local color3 = Color(255,255,255)
for k,v in pairs(ents.FindByClass("player")) do
cam.Start3D()
//Chams code
v:DrawModel()
render.SuppressEngineLighting(true)
render.SetColorModulation((color.r / 255), (color.g / 255), (color.b / 255))
render.MaterialOverride(chams_mat1)
v:DrawModel()
render.SuppressEngineLighting(false)
cam.End3D()
end
end