Hey, I'm trying to get a circle under each player on the server, but the material doesn't seem to be working. This is a completely clientside script, not through a gamemode or addon or anything. So far its drawing the usual purple/black square underneath them right now. But I think it's kinda working, it used to be where they'd all be completely purple/black, but now they actually change color and alpha like I want them to. Does that mean the materials is corrupt?
The lua is in garrysmod/garrysmod/lua, and I tried putting the vmt/vtf in the same dir, in a dir called materials where the lua file is, and in my normal garrysmod/materials folder.
I don't know how have a custom code box so here:
local CircMat = Material("circle")
local EyePos = Vector(0,0,0)
local EyeAng = Vector(0,0,0)
local PlyTeamCol = nil
local function DrawCircles()
EyePos = LocalPlayer():EyePos()
EyeAng = LocalPlayer():EyeAngles()
for _, ply in pairs(player.GetAll()) do
cam.Start3D(EyePos, EyeAng)
render.SetMaterial(CircMat)
PlyTeamCol = team.GetColor(ply:Team())
PlyTeamCol = Color(PlyTeamCol.r, PlyTeamCol.g, PlyTeamCol.b, 150)
render.DrawQuadEasy(ply:GetPos(), Vector(0,0,1), 48, 48, PlyTeamCol)
cam.End3D()
end
end
hook.Add("RenderScreenspaceEffects", "Circles", DrawCircles)
Thanks
Bump? Help would be greatly appreciated!
Sorry, you need to Log In to post a reply to this thread.