Files
gluesteak/cratescan.lua
2023-04-22 15:46:42 -05:00

25 lines
903 B
Lua

-- Don't forget PrintTable
print(type(LocalPlayer():GetEyeTrace().Entity))
looking = LocalPlayer():GetEyeTrace().Entity
print(looking:GetClass())
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("sent_crate")) do
cam.Start3D()
--Chams code
render.SuppressEngineLighting(true)
render.SetColorModulation((color.r / 255), (color.g / 255), (color.b / 255))
render.MaterialOverride(chams_mat)
v:DrawModel()
render.SuppressEngineLighting(false)
cam.End3D()
end
end)
print("Attempted")
surface.PlaySound ("npc/scanner/scanner_scan1.wav")