--[ Владелец - Rustgame ]-- --[ Wiki.Garrysmod.com ]--
------------------------------------------------------
local draw = draw
local surface = surface
local cam = cam
local math = math
local team = team
local ply = LocalPlayer()
local eyepos
local Page = Material("icon64/tool.png")
------------------------------------------------------
surface.CreateFont ("PlayerOrg1", {
size = 55,
weight = 800,
antialias = true,
additive = false,
font = "Tahoma"})
------------------------------------------------------
hook.Add("RenderScene", "3D2DNicksPosAng",function(pos)
eyepos = pos
end)
hook.Add("PostPlayerDraw", "3D2DNicks", function(ply)
local dist = ply:GetPos():Distance(eyepos)
if dist > 350 or !ply:Alive() then return end
local bone = ply:LookupAttachment("eyes")
if bone == 0 then return end
local attach = ply:GetAttachment(bone)
local alpha = 255 * (1 - math.Clamp((dist - 255) / 100, 0, 1))
local color = team.GetColor(ply:Team())
local jobcolor = Color(color.r, color.g, color.b, alpha)
local nickcolor = Color(255,255,255,255)
if ply:GetNWBool("PlayerNickColored", false) then
local col = ply:GetNWVector("PlayerNickColor")
nickcolor = Color(col.x, col.y, col.z, alpha)
end
local team = ply:GetUserGroup()
local name = ply:Nick()
if team == "superadmin" then team = "Основатель" end
if team == "admin" then team = "Администратор" end
if team == "user" then team = "Игрок" end
if team == "root" then team = "Root" end
if team == "vip" then team = "VIP" end
if team == "youtube" then team = "Стример/YouTube" end
if team == "moderator" then team = "Смотритель" end
local Page = Material("icon16/user.png")
local metal = MyMoney
local hpplayer = ply:Health()
local armorplayer = ply:Armor()
local orrg=ply:GetNWString("orgName")
cam.Start3D2D(attach.Pos + Vector(0, 0, 25), Angle(0, (attach.Pos - eyepos):Angle().y - 90, 90), 0.05)
if
(ply:IsSpeaking()) then
draw.SimpleText("Говорит", "PlayerOrg1", 202, 365, Color(255, 255, 255, 257), TEXT_ALIGN_LEFT)
elseif
(ply:GetNW2Bool('ti_istyping')) then
draw.SimpleText("Пишет", "PlayerOrg1", 202, 365, Color(255, 255, 255, 257), TEXT_ALIGN_LEFT)
end
draw.SimpleText("Ник", "PlayerOrg1", 202, 400, Color(255, 255, 255, 257), TEXT_ALIGN_LEFT)
draw.SimpleText(" | "..name, "PlayerOrg1", 400, 400, Color(255, 255, 255, 257), TEXT_ALIGN_LEFT)
draw.SimpleText("Ранг", "PlayerOrg1", 202, 435, Color(255, 255, 255, 257), TEXT_ALIGN_LEFT)
draw.SimpleText(" | "..team, "PlayerOrg1", 400, 435, Color(255, 255, 255, 257), TEXT_ALIGN_LEFT)
if
(LocalPlayer():GetUserGroup() == "root") or
(LocalPlayer():GetUserGroup() == "superadmin") or
(LocalPlayer():GetUserGroup() == "admin") or
(LocalPlayer():GetUserGroup() == "moderator") or
(LocalPlayer():GetUserGroup() == "youtube") or
(LocalPlayer():GetUserGroup() == "vip") then
draw.SimpleText("HP", "PlayerOrg1", 202, 470, Color(255, 255, 255, 257), TEXT_ALIGN_LEFT)
draw.SimpleText(" | "..hpplayer, "PlayerOrg1", 400, 470, Color(255, 255, 255, 257), TEXT_ALIGN_LEFT)
draw.SimpleText("Бронь", "PlayerOrg1", 202, 505, Color(255, 255, 255, 257), TEXT_ALIGN_LEFT)
draw.SimpleText(" | "..armorplayer, "PlayerOrg1", 400, 505, Color(255, 255, 255, 257), TEXT_ALIGN_LEFT)
end
cam.End3D2D()
end)