Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Скриншот - https://steamuserimages-a.akamaihd.net/ugc/849347654003267205/3D68480639F23E9DC684C6A0FA55C9CFA677EB10/
- Команды :
- Показать двери - show_door
- Скрыть двери - hide_door
- */
- concommand.Add("show_door", function()
- hook.Add("HUDPaint" , "DoorFind" , function ()
- for k,v in pairs (ents.GetAll()) do
- if IsValid(v) and v:getDoorOwner() then
- local pos = v:GetPos():ToScreen()
- local distance = math.floor(LocalPlayer():GetPos():Distance(v:GetPos()) / 25)
- draw.DrawText(distance.."m", "ChatFont", pos.x, pos.y - 10,Color(255, 255, 255, 255),1)
- draw.DrawText("Дверь - "..v:getDoorOwner():Nick(), "TargetIDSmall", pos.x + 1, pos.y - 30,Color(255, 255, 255, 255),1)
- surface.SetDrawColor(255,255,255,255)
- surface.SetMaterial(Material( "icon16/door.png" ))
- surface.DrawTexturedRect(pos.x-10, pos.y-50, 16,16)
- end
- end
- end)
- end)
- concommand.Add("hide_door", function()
- hook.Remove("HUDPaint" , "DoorFind")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement