/*--------------------------------------------------------------------------- Configs ---------------------------------------------------------------------------*/ GM.Config.showinfohp = true -- HP Bar behind the job name GM.Config.showgang = true -- Using DarkRP Gang System local function DrawPlayerInfo(ply) local pos = ply:EyePos() pos.z = pos.z + 18 pos = pos:ToScreen() pos.y = pos.y - 50 if ply:IsUserGroup("user") or ply:IsUserGroup("trusted") or ply:IsUserGroup("respected") then draw.RoundedBox(6, pos.x - 115, pos.y + 1, 250, 60, Color(10,10,10,180)) draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x + 1, pos.y + 5, Color(160, 160, 160, 255), 1) draw.RoundedBox(6, pos.x - 113, pos.y + 3, 245, 25, Color(10,10,10,180)) draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) if GAMEMODE.Config.showinfohp then local hp = ply:Health() draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25,Color(0,0,0,200)) draw.RoundedBox(6, pos.x - 113, pos.y + 32,math.Clamp(hp,0,100)*2.46,25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) end if GAMEMODE.Config.showgang and ply:GetNWBool("Org_Leader",true) == true or ply:GetNWString("Gang","") != "" then local gang = ply:GetNWString("Gang","") draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,200)) draw.DrawText(gang, "DarkRPHUD2", pos.x, pos.y -26, Color(200, 200, 200, 200), 1) else draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,2)) end end if ply:IsUserGroup ("superadmin") then local rank = Material( "icon16/shield_add.png" ) draw.RoundedBox(6, pos.x - 115, pos.y + 1, 250, 89, Color(10,10,10,180)) draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x + 1, pos.y + 5, Color(160, 160, 160, 255), 1) draw.RoundedBox(6, pos.x - 113, pos.y + 3, 245, 25, Color(10,10,10,180)) draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) if GAMEMODE.Config.showinfohp then local hp = ply:Health() draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25,Color(0,0,0,200)) draw.RoundedBox(6, pos.x - 113, pos.y + 32,math.Clamp(hp,0,100)*2.46,25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) end draw.DrawText("Super Admin", "DarkRPHUD2", pos.x - -02, pos.y + 64, Color(255, 255, 255, 200), 1) draw.RoundedBox(6, pos.x - 69, pos.y + 62, 130, 25, Color(10,10,10,180)) surface.SetMaterial( rank ) surface.SetDrawColor( 255, 255, 255, 255 ) surface.DrawTexturedRect( pos.x - 66, pos.y + 67, 16, 16) if GAMEMODE.Config.showgang and ply:GetNWBool("Org_Leader",true) == true or ply:GetNWString("Gang","") != "" then local gang = ply:GetNWString("Gang","") draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,200)) draw.DrawText(gang, "DarkRPHUD2", pos.x, pos.y -26, Color(200, 200, 200, 200), 1) else draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,2)) end end if ply:IsUserGroup ("owner") then local rank = Material( "icon16/key.png" ) draw.RoundedBox(6, pos.x - 115, pos.y + 1, 250, 89, Color(10,10,10,180)) draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x + 1, pos.y + 5, Color(160, 160, 160, 255), 1) draw.RoundedBox(6, pos.x - 113, pos.y + 3, 245, 25, Color(10,10,10,180)) draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) if GAMEMODE.Config.showinfohp then local hp = ply:Health() draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25,Color(0,0,0,200)) draw.RoundedBox(6, pos.x - 113, pos.y + 32,math.Clamp(hp,0,100)*2.46,25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) end draw.DrawText("Owner", "DarkRPHUD2", pos.x - -02, pos.y + 64, Color(255, 255, 255, 200), 1) draw.RoundedBox(6, pos.x - 48, pos.y + 62, 90, 25, Color(10,10,10,180)) surface.SetMaterial( rank ) surface.SetDrawColor( 255, 255, 255, 255 ) surface.DrawTexturedRect( pos.x - 44, pos.y + 67, 16, 16) if GAMEMODE.Config.showgang and ply:GetNWBool("Org_Leader",true) == true or ply:GetNWString("Gang","") != "" then local gang = ply:GetNWString("Gang","") draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,200)) draw.DrawText(gang, "DarkRPHUD2", pos.x, pos.y -26, Color(200, 200, 200, 200), 1) else draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,2)) end end if ply:IsUserGroup ("moderator") then local rank = Material( "icon16/medal_bronze_3.png" ) draw.RoundedBox(6, pos.x - 115, pos.y + 1, 250, 89, Color(10,10,10,180)) draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x + 1, pos.y + 5, Color(160, 160, 160, 255), 1) draw.RoundedBox(6, pos.x - 113, pos.y + 3, 245, 25, Color(10,10,10,180)) draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) if GAMEMODE.Config.showinfohp then local hp = ply:Health() draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25,Color(0,0,0,200)) draw.RoundedBox(6, pos.x - 113, pos.y + 32,math.Clamp(hp,0,100)*2.46,25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) end draw.DrawText("MOD", "DarkRPHUD2", pos.x - -02, pos.y + 64, Color(255, 255, 255, 200), 1) draw.RoundedBox(6, pos.x - 48, pos.y + 62, 90, 25, Color(10,10,10,180)) surface.SetMaterial( rank ) surface.SetDrawColor( 255, 255, 255, 255 ) surface.DrawTexturedRect( pos.x - 44, pos.y + 67, 16, 16) if GAMEMODE.Config.showgang and ply:GetNWBool("Org_Leader",true) == true or ply:GetNWString("Gang","") != "" then local gang = ply:GetNWString("Gang","") draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,200)) draw.DrawText(gang, "DarkRPHUD2", pos.x, pos.y -26, Color(200, 200, 200, 200), 1) else draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,2)) end end if ply:IsUserGroup ("vip") then local rank = Material( "icon16/medal_gold_3.png" ) draw.RoundedBox(6, pos.x - 115, pos.y + 1, 250, 89, Color(10,10,10,180)) draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x + 1, pos.y + 5, Color(160, 160, 160, 255), 1) draw.RoundedBox(6, pos.x - 113, pos.y + 3, 245, 25, Color(10,10,10,180)) draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) if GAMEMODE.Config.showinfohp then local hp = ply:Health() draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25,Color(0,0,0,200)) draw.RoundedBox(6, pos.x - 113, pos.y + 32,math.Clamp(hp,0,100)*2.46,25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) end draw.DrawText("VIP", "DarkRPHUD2", pos.x - -02, pos.y + 64, Color(255, 255, 255, 200), 1) draw.RoundedBox(6, pos.x - 48, pos.y + 62, 90, 25, Color(10,10,10,180)) surface.SetMaterial( rank ) surface.SetDrawColor( 255, 255, 255, 255 ) surface.DrawTexturedRect( pos.x - 44, pos.y + 67, 16, 16) if GAMEMODE.Config.showgang and ply:GetNWBool("Org_Leader",true) == true or ply:GetNWString("Gang","") != "" then local gang = ply:GetNWString("Gang","") draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,200)) draw.DrawText(gang, "DarkRPHUD2", pos.x, pos.y -26, Color(200, 200, 200, 200), 1) else draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,2)) end end if ply:IsUserGroup ("supporter") then local rank = Material( "icon16/star.png" ) draw.RoundedBox(6, pos.x - 115, pos.y + 1, 250, 89, Color(10,10,10,180)) draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x + 1, pos.y + 5, Color(160, 160, 160, 255), 1) draw.RoundedBox(6, pos.x - 113, pos.y + 3, 245, 25, Color(10,10,10,180)) draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) if GAMEMODE.Config.showinfohp then local hp = ply:Health() draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25,Color(0,0,0,200)) draw.RoundedBox(6, pos.x - 113, pos.y + 32,math.Clamp(hp,0,100)*2.46,25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) end draw.DrawText("Supporter", "DarkRPHUD2", pos.x - -03, pos.y + 64, Color(255, 255, 255, 200), 1) draw.RoundedBox(6, pos.x - 58, pos.y + 62, 115, 25, Color(10,10,10,180)) surface.SetMaterial( rank ) surface.SetDrawColor( 255, 255, 255, 255 ) surface.DrawTexturedRect( pos.x - 56, pos.y + 67, 16, 16) if GAMEMODE.Config.showgang and ply:GetNWBool("Org_Leader",true) == true or ply:GetNWString("Gang","") != "" then local gang = ply:GetNWString("Gang","") draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,200)) draw.DrawText(gang, "DarkRPHUD2", pos.x, pos.y -26, Color(200, 200, 200, 200), 1) else draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,2)) end end if ply:IsUserGroup ("admin") then local rank = Material( "icon16/shield.png" ) draw.RoundedBox(6, pos.x - 115, pos.y + 1, 250, 89, Color(10,10,10,180)) draw.DrawText(ply:Nick(), "DarkRPHUD2", pos.x + 1, pos.y + 5, Color(160, 160, 160, 255), 1) draw.RoundedBox(6, pos.x - 113, pos.y + 3, 245, 25, Color(10,10,10,180)) draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) if GAMEMODE.Config.showinfohp then local hp = ply:Health() draw.RoundedBox(6, pos.x - 113, pos.y + 32, 245, 25,Color(0,0,0,200)) draw.RoundedBox(6, pos.x - 113, pos.y + 32,math.Clamp(hp,0,100)*2.46,25, team.GetColor(ply:Team())) draw.DrawText(ply.DarkRPVars.job or teamname, "DarkRPHUD2", pos.x, pos.y + 35, Color(255, 255, 255, 200), 1) end draw.DrawText("Admin", "DarkRPHUD2", pos.x - -02, pos.y + 64, Color(255, 255, 255, 200), 1) draw.RoundedBox(6, pos.x - 46, pos.y + 62, 80, 25, Color(10,10,10,180)) surface.SetMaterial( rank ) surface.SetDrawColor( 255, 255, 255, 255 ) surface.DrawTexturedRect( pos.x - 43, pos.y + 67, 16, 16) if GAMEMODE.Config.showgang and ply:GetNWBool("Org_Leader",true) == true or ply:GetNWString("Gang","") != "" then local gang = ply:GetNWString("Gang","") draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,200)) draw.DrawText(gang, "DarkRPHUD2", pos.x, pos.y -26, Color(200, 200, 200, 200), 1) else draw.RoundedBox(6, pos.x - 113, pos.y - 28, 245, 25,Color(0,0,0,2)) end end if ply.DarkRPVars.HasGunlicense then local gun = Material( "icon16/gun.png" ) local paper = Material( "icon16/page.png" ) surface.SetMaterial(paper) surface.SetDrawColor(255,255,255,255) surface.DrawTexturedRect(pos.x-106, pos.y + 63, 19, 19) surface.SetMaterial(gun) surface.SetDrawColor(255,255,255,255) surface.DrawTexturedRect(pos.x-105, pos.y + 65, 15, 15) end end local function DrawWantedInfo(ply) if not ply:Alive() then return end local pos = ply:EyePos() if not pos:RPIsInSight({LocalPlayer(), ply}) then return end pos.z = pos.z + 10 pos = pos:ToScreen() pos.y = pos.y - 50 draw.RoundedBox(6, pos.x - 113, pos.y - 63, 245, 25,Color(0,0,0,200)) draw.DrawText("Wanted by The Police", "DarkRPHUD2", pos.x, pos.y - 60, Color(255, 255, 255, 200), 1) draw.DrawText("Wanted by The Police", "DarkRPHUD2", pos.x + 1, pos.y - 61, Color(255, 0, 0, 255), 1) end