hook.Add("HUDPaint", "NsEntityHover", function()
local trace = LocalPlayer():GetEyeTrace()
if trace.Entity and trace.Entity:IsValid() then
surface.SetDrawColor(0, 0, 0, 180)
surface.DrawRoundedRect(trace.HitPos:ToScreen().x - 10, trace.HitPos:ToScreen().y - 10, 20, 20, 5)
draw.SimpleText("E", "DermaLarge", trace.HitPos:ToScreen().x, trace.HitPos:ToScreen().y, Color(255,255,255,255), 1, 1)
end
end)
Куда это кидать?Garry's Mod Wiki
Welcome to the Garry's Mod Wiki. Here you will find tutorials, resources and documentation about Garry's Mod and its Lua API. The wiki is a public resource and maintained by Facepunch and the community. Want to make your own changes to the wiki? Chec..wiki.facepunch.com
Lua:hook.Add("HUDPaint", "NsEntityHover", function() local trace = LocalPlayer():GetEyeTrace() if trace.Entity and trace.Entity:IsValid() then surface.SetDrawColor(0, 0, 0, 180) surface.DrawRoundedRect(trace.HitPos:ToScreen().x - 10, trace.HitPos:ToScreen().y - 10, 20, 20, 5) draw.SimpleText("E", "DermaLarge", trace.HitPos:ToScreen().x, trace.HitPos:ToScreen().y, Color(255,255,255,255), 1, 1) end end)
Вроде как-то так, если что подкорректируешь
Client частьКуда это кидать?