Ищу радар, который показывает карту в углу экрана.
Пожалуйста!)
миникарта точнее
overview_mode 3
local playerInfo = {}
local function DrawRadar()
local radarSize = 200
local radarX = 20
local radarY = ScrH() - radarSize - 20
surface.SetDrawColor(50, 50, 50, 200)
surface.DrawRect(radarX, radarY, radarSize, radarSize)
for _, ply in ipairs(player.GetAll()) do
local pos = ply:GetPos() - LocalPlayer():GetPos()
pos.x = pos.x / 1000 * radarSize / 2
pos.y = pos.y / 1000 * radarSize / 2
if playerInfo[ply:SteamID()] and playerInfo[ply:SteamID()].killed then
surface.SetDrawColor(255, 0, 0, 255)
else
surface.SetDrawColor(255, 255, 255, 255)
end
surface.DrawRect(radarX + radarSize / 2 + pos.x - 2, radarY + radarSize / 2 - pos.y - 2, 4, 4)
end
end
local function UpdatePlayerStatus(victim, attacker)
if not victim:IsPlayer() or not attacker:IsPlayer() then return end
playerInfo[victim:SteamID()] = {killed = true}
playerInfo[attacker:SteamID()] = {killed = false}
end
local function OpenRadar(ply, cmd, args)
if not ply:IsValid() or not ply:IsPlayer() then return end
hook.Add("HUDPaint", "DrawRadar", DrawRadar)
hook.Add("PlayerDeath", "UpdatePlayerStatus", UpdatePlayerStatus)
end
concommand.Add("radar", OpenRadar)
В мастерской есть аддон на мини карту : Steam Workshop::GMinimap