Dark RP Door titles not showing *Installed new hud*
3 replies, posted
Hey guys, recently I installed a new scoreboard and HUD. Now the door titles don't show up and I believe the hitman text. I really have no idea why this is to be completely honest. Here is the code for both addons.
[B][U]Scoreboard Code:[/U][/B]
[CODE]/*--------------------------------------------------*\
| You can only change things before the warning text |
\*--------------------------------------------------*/
local clbackground = Color(235,235,235,255) // Default color is 235,235,235,255
local topbackground = Color(38,38,38,255) // Default color is 63,67,78,255
local tagsbackground = Color(54,54,54,255) // Default color is 54,54,54,255
local rowcolor = Color(79,83,95,255) // Default color is 79,83,95,255
local rowhovercolor = Color(255,255,255,0) // Default color is 255,255,255,0
local colorrowteam = false // Default false, if it is set to true the player row color will be changed based on the team color.
-- The logo size has to be 263x75
-- If logo is set to 0 then there will the blank space if you set a directory it will use that image as logo
-- When adding a directory do it like this Material("directory/filename.png or jpg")
local logo = 0
/*-------*\
| Warning |
\*-------*/
local w,h = ScrW(),ScrH()
local y,y2 = 0,0
-- 16:9
if w == 1280 and h == 720 then y = 75 end
if w == 1360 and h == 768 then y = 35 end
if w == 1366 and h == 768 then y = 35 end
if w == 1600 and h == 900 then y = 0 y2 = 80 end
if w == 1920 and h == 1080 then y = 0 y2 = 235 end
-- 16:10
if w == 1680 and h == 1050 then y = 0 y2 = 120 end
if w == 1600 and h == 1024 then y = 0 y2 = 80 end
if w == 1440 and h == 900 then y = 0 y2 = 0 end
if w == 1280 and h == 800 then y = 80 y2 = 0 end
if w == 1280 and h == 768 then y = 80 y2 = 0 end
-- 4:3
if w == 1280 and h == 1024 then y = 80 y2 = 0 end
if w == 1280 and h == 900 then y = 80 y2 = 0 end
if w == 1152 and h == 864 then y = 140 y2 = 0 end
--[[ Doesn't support the next resolutions
1024x768
800x600
720x576
640x480
]]
surface.CreateFont( "Info", {
font = "Bebas",
size = 19,
weight = 500,
antialias = true
})
surface.CreateFont( "Title", {
font = "Bebas",
size = 30,
weight = 500,
antialias = true
})
surface.CreateFont( "OtherInfo", {
font = "Bebas",
size = 24,
weight = 500,
antialias = true
})
surface.CreateFont( "NameRank", {
font = "Bebas",
size = 17,
weight = 500,
antialias = true
})
RunConsoleCommand("FAdmin_IsScoreboard", "0")
local function formatNumber(n)
n = tonumber(n)
if (!n) then
return 0
end
if n >= 1e14 then return tostring(n) end
n = tostring(n)
sep = sep or ","
local dp = string.find(n, "%.") or #n+1
for i=dp-4, 1, -3 do
n = n:sub(1, i) .. sep .. n:sub(i+1)
end
return n
end
function playercom(parent,x,y,text,image,color,name,command)
local userbtn = vgui.Create("DButton",parent)
userbtn:SetPos(x,y)
userbtn:SetSize(120,35)
userbtn:SetTextColor(Color(255,255,255))
userbtn:SetText(text)
userbtn:SetImage(image)
userbtn.Paint = function(self)
draw.RoundedBox(0,0,0,self:GetWide(),self:GetTall(),Color(51,51,51,255))
surface.SetDrawColor(color)
surface.DrawOutlinedRect(0,0,self:GetWide(),self:GetTall())
end
userbtn.DoClick = function()
surface.PlaySound("buttons/button9.wav")
chat.AddText(Color(255,60,60),"["..name.."]",Color(255,255,255)," was copied, just use CTRL+V to paste it.")
SetClipboardText(command)
end
return userbtn
end
function command(parent,x,y,text,image,color,command,...)
local btn = vgui.Create("DButton",parent)
btn:SetPos(x,y)
btn:SetSize(120,35)
btn:SetTextColor(Color(255,255,255))
btn:SetText(text)
btn:SetImage(image)
btn.Paint = function(self)
draw.RoundedBox(0,0,0,self:GetWide(),self:GetTall(),Color(51,51,51,255))
surface.SetDrawColor(color)
surface.DrawOutlinedRect(0,0,self:GetWide(),self:GetTall())
end
local cmdArgs = {...}
btn.DoClick = function()
surface.PlaySound("buttons/button9.wav")
RunConsoleCommand(command,unpack(cmdArgs))
end
return btn
end
function kick(parent,x,y,text,reason,image,color,command,ply)
local cbtn = vgui.Create("DButton",parent)
cbtn:SetSize(120,35)
cbtn:SetPos(x,y)
cbtn:SetTextColor(Color(255,255,255))
cbtn:SetText(text)
cbtn:SetImage(image)
cbtn.Paint = function(self)
draw.RoundedBox(0,0,0,self:GetWide(),self:GetTall(),Color(51,51,51,255))
surface.SetDrawColor(color)
surface.DrawOutlinedRect(0,0,self:GetWide(),self:GetTall())
end
cbtn.DoClick = function()
surface.PlaySound("buttons/button9.wav")
local reportmsg = vgui.Create( "DFrame" )
reportmsg:SetPos(ScrW() / 2 - 200, ScrH() / 2 - 120)
reportmsg:SetSize(400,100)
reportmsg:SetTitle("")
reportmsg:SetVisible(true)
reportmsg:SetDraggable(false)
reportmsg:SetBackgroundBlur(true)
reportmsg:ShowCloseButton(true)
reportmsg:MakePopup()
local tellad = vgui.Create("DLabel",reportmsg)
tellad:SetPos(reportmsg:GetWide()/2-100,22)
tellad:SetText(reason)
tellad:SizeToContents()
story = vgui.Create("DTextEntry",reportmsg)
story:SetPos(10,42)
story:SetTall(20)
story:SetWide(reportmsg:GetWide()-20)
story:RequestFocus()
local accept = vgui.Create("DButton",reportmsg)
accept:SetPos(100,65)
accept:SetSize(80,30)
accept:SetImage('icon16/accept.png')
accept:SetText('Accept')
accept.DoClick = function()
if IsValid(reportmsg) then
reportmsg:Close()
end
AlertMessage = story:GetValue()
RunConsoleCommand("ulx",command,ply,AlertMessage)
end
local cancel = vgui.Create("DButton",reportmsg)
cancel:SetPos(230,65)
cancel:SetSize(80,30)
cancel:SetImage('icon16/cross.png')
cancel:SetText('Cancel')
cancel.DoClick = function()
if IsValid(reportmsg) then
reportmsg:Close()
end
end
end
return btn
end
function ban(parent,x,y,text,reason,image,color,command,ply)
local cbtn = vgui.Create("DButton",parent)
cbtn:SetSize(120,35)
cbtn:SetPos(x,y)
cbtn:SetTextColor(Color(255,255,255))
cbtn:SetText(text)
cbtn:SetImage(image)
cbtn.Paint = function(self)
draw.RoundedBox(0,0,0,self:GetWide(),self:GetTall(),Color(51,51,51,255))
surface.SetDrawColor(color)
surface.DrawOutlinedRect(0,0,self:GetWide(),self:GetTall())
end
cbtn.DoClick = function()
surface.PlaySound("buttons/button9.wav")
local menu = DermaMenu()
local Title = vgui.Create("DLabel")
Title:SetText(" Ban Time:\n")
Title:SetFont("UiBold")
Title:SizeToContents()
Title:SetTextColor(color_black)
menu:AddPanel(Title)
menu:AddOption("1 Hour", function() RunConsoleCommand("ulx",command,ply,60) end)
menu:AddOption("5 Hour", function() RunConsoleCommand("ulx",command,ply,300) end)
menu:AddOption("1 day", function() RunConsoleCommand("ulx",command,ply,1440) end)
menu:AddOption("1 week", function() RunConsoleCommand("ulx",command,ply,10080) end)
menu:AddOption("1 month", function() RunConsoleCommand("ulx",command,ply,40320) end)
menu:AddOption("Permanently", function() RunConsoleCommand("ulx",command,ply,0) end)
menu:Open()
end
return btn
end
function GM:ScoreboardShow()
gui.EnableScreenClicker(true)
bg = vgui.Create("DFrame")
bg:SetSize(800,700)
bg:SetPos(ScrW()/2-400+y,ScrH()/2-350)
bg:SetDraggable(false)
bg:ShowCloseButton(false)
bg:SetTitle("")
bg.Paint = function(self)
draw.RoundedBox(8,0,0,self:GetWide(),self:GetTall(),Color(0,0,0,255))
draw.RoundedBox(8,1,1,self:GetWide()-2,self:GetTall()-2,clbackground)
draw.RoundedBox(0,0,0,self:GetWide(),75,topbackground)
surface.SetDrawColor(61,61,61,255)
surface.DrawLine(0,0,self:GetWide(),0)
surface.SetFont("Title")
draw.DrawText(GetHostName(),"Title",5,2.5,color_white,TEXT_ALIGN_LEFT)
draw.DrawText("Time: "..os.date( "%I:%M:%S %p" ),"Info",5,35,color_white,TEXT_ALIGN_LEFT)
draw.DrawText("Players: "..table.Count(player.GetAll()),"Info",5,55,color_white,TEXT_
[code] -- DarkRP_EntityDisplay is the text that is drawn above a player when you look at them.
-- This also draws the information on doors and vehicles
["DarkRP_EntityDisplay"] = false,[/code]
That's why.
[QUOTE=code_gs;44774474][code] -- DarkRP_EntityDisplay is the text that is drawn above a player when you look at them.
-- This also draws the information on doors and vehicles
["DarkRP_EntityDisplay"] = false,[/code]
That's why.[/QUOTE]
Oh jeese, thanks man!
[B][U]EDIT: One thing, it says if you set it to true it will disable all things. And, did this scoreboard disable Fadmin?[/U][/B]
Doors are still broken. Changed [U][B]["DarkRP_EntityDisplay"] = false,[/B][/U] to true, still broken.
[B][I][U]Any help is appreciated, my server is half broken. I need to fix this ASAP.[/U][/I][/B]
[editline]10th May 2014[/editline]
Sorry, you need to Log In to post a reply to this thread.