• Darkrp Hud issue! Help!
    0 replies, posted
I put this code into a darkrp modifications module folder and inside the folder i named the file cl_hud.lua , but when people join they cant see this hud they have nothing on their screen not even a cursor! Any insight would be very helpful! Also i am receiving no errors, and me and one other person can see the hud. [CODE]surface.CreateFont( "hudcrazy", { font = "Arial", size = 24, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) surface.CreateFont( "hudbig", { font = "Arial", size = 28, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = true, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) surface.CreateFont( "hudblurbig", { font = "Arial", size = 29, weight = 500, blursize = 5, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) surface.CreateFont( "hudblur", { font = "Arial", size = 25, weight = 500, blursize = 5, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) surface.CreateFont( "hudsmall", { font = "Arial", size = 18, weight = 500, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) surface.CreateFont( "hudblursmall", { font = "Arial", size = 19, weight = 500, blursize = 5, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) local function Base() draw.RoundedBox(6, ScrW() -1900- 10, ScrH () - 210 - 20, 400, 200, Color(240, 240, 240, 210)) draw.RoundedBox(6, ScrW() -1900- 10, ScrH () - 250 - 20, 150, 35, Color(240, 240, 240, 180)) --Name draw.DrawText(LocalPlayer():Nick(), "hudcrazy", ScrW() -1750 +55, ScrH () - 200 - 15, Color(0,0,0,255) ) draw.DrawText(LocalPlayer():Nick(), "hudblur", ScrW() -1750 +55, ScrH () - 200 - 15, Color(0,240,0,255) ) --Job draw.RoundedBox(6, ScrW() -1750 - 8, ScrH () - 160 - 25, 240, 5, Color(100, 100, 100, 255)) draw.DrawText(LocalPlayer():getDarkRPVar("job"), "hudcrazy", ScrW() -1750 + 55, ScrH () - 160 - 15, Color(0,0,0,255) ) draw.DrawText(LocalPlayer():getDarkRPVar("job"), "hudblur", ScrW() -1750 + 55, ScrH () - 160 - 15, Color(0,240,0,255) ) --Salary draw.RoundedBox(6, ScrW() -1750 - 8, ScrH () - 120 - 25, 240, 5, Color(100, 100, 100, 255)) draw.DrawText("Salary: $"..LocalPlayer():getDarkRPVar("salary"), "hudcrazy", ScrW() -1750 +55, ScrH () - 120 - 15, Color(0,0,0,255) ) draw.DrawText("Salary: $"..LocalPlayer():getDarkRPVar("salary"), "hudblur", ScrW() -1750 +55, ScrH () - 120 - 15, Color(0,240,0,255) ) --Wallet draw.RoundedBox(6, ScrW() -1750 - 8, ScrH () - 80 - 25, 240, 5, Color(100, 100, 100, 255)) draw.DrawText("Wallet: $"..LocalPlayer():getDarkRPVar("money"), "hudcrazy", ScrW() -1750 +45, ScrH () - 80 - 15, Color(0,0,0,255) ) draw.DrawText("Wallet: $"..LocalPlayer():getDarkRPVar("money"), "hudblur", ScrW() -1750 +45, ScrH () - 80 - 15, Color(0,240,0,255) ) ---Server Name draw.DrawText("TeamGR-RP", "hudbig", ScrW() - 1900 -10, ScrH() - 250 -15, Color(0,0,0,255)) draw.DrawText("TeamGR-RP", "hudblurbig", ScrW() - 1900 -10, ScrH() - 250 -15, Color(0,240,0,255)) draw.RoundedBox(6, ScrW() - 1900 +2, ScrH() - 225, 65, 185, Color(150,150,150,255)) draw.RoundedBox(6, ScrW() - 1830 + 2, ScrH() - 225, 65, 186, Color(150,150,150,255)) local DrawHealth = LocalPlayer():Health() or 0 local EchoHealth = LocalPlayer():Health() or 0 local DrawArmor = LocalPlayer():Armor() or 0 local EchoArmor = LocalPlayer():Armor() or 0 draw.RoundedBox(6, ScrW() - 1900 + 4, ScrH() - 225 + 1, 60, (185) * DrawHealth / 100, Color(255,0,0,255)) if DrawHealth > 100 then DrawHealth = 100 end if DrawHealth < 0 then DrawHealth = 0 end if DrawHealth !=0 then draw.RoundedBox(6, ScrW() - 1900 + 4, ScrH() - 225 + 1, 60, (185) * DrawHealth / 100, Color(255,0,0,255)) end if DrawArmor > 100 then DrawArmor = 100 end if DrawArmor < 0 then DrawArmor = 0 end if DrawArmor !=0 then draw.RoundedBox(6, ScrW() - 1830 + 4, ScrH() - 224, 60, (184) * DrawArmor / 100, Color(0,0,255,255)) end --Health draw.DrawText("HP", "hudsmall", ScrW() - 1895 + 15, ScrH() - 200 + 2, Color(0,0,0,255) ) draw.DrawText(EchoHealth.."%", "hudsmall", ScrW() - 1880 - 8, ScrH() - 180 + 2, Color(0,0,0,255) ) draw.DrawText("HP", "hudblursmall", ScrW() - 1895 + 15, ScrH() - 200 + 2, Color(0,240,0,255) ) draw.DrawText(EchoHealth.."%", "hudblursmall", ScrW() - 1880 - 8, ScrH() - 180 + 2, Color(0,240,0,255) ) --Armor draw.DrawText("ARMOR", "hudsmall", ScrW() - 1830 + 6, ScrH() - 225 + 28, Color(0,0,0,255) ) draw.DrawText(EchoArmor.."%", "hudsmall", ScrW() - 1810 + 8, ScrH() - 205 + 28, Color(0,0,0,255) ) draw.DrawText("ARMOR", "hudblursmall", ScrW() - 1830 + 6, ScrH() - 225 + 28, Color(0,240,0,255) ) draw.DrawText(EchoArmor.."%", "hudblursmall", ScrW() - 1810 + 8, ScrH() - 205 + 28, Color(0,240,0,255) ) end /*--------------------------------------------------------------------------- HUD ConVars ---------------------------------------------------------------------------*/ local ConVars = {} local HUDWidth local HUDHeight local Color = Color local cvars = cvars local DarkRP = DarkRP local CurTime = CurTime local draw = draw local GetConVar = GetConVar local IsValid = IsValid local Lerp = Lerp local localplayer local math = math local pairs = pairs local ScrW, ScrH = ScrW, ScrH local SortedPairs = SortedPairs local string = string local surface = surface local table = table local timer = timer local tostring = tostring CreateClientConVar("weaponhud", 0, true, false) local colors = {} colors.black = Color(0, 0, 0, 255) colors.blue = Color(0, 0, 255, 255) colors.brightred = Color(200, 30, 30, 255) colors.darkred = Color(0, 0, 70, 100) colors.darkblack = Color(0, 0, 0, 200) colors.gray1 = Color(0, 0, 0, 155) colors.gray2 = Color(51, 58, 51,100) colors.red = Color(255, 0, 0, 255) colors.white = Color(255, 255, 255, 255) colors.white1 = Color(255, 255, 255, 200) local function ReloadConVars() ConVars = { background = {0,0,0,100}, Healthbackground = {0,0,0,200}, Healthforeground = {140,0,0,180}, HealthText = {255,255,255,200}, Job1 = {0,0,150,200}, Job2 = {0,0,0,255}, salary1 = {0,150,0,200}, salary2 = {0,0,0,255} } for name, Colour in pairs(ConVars) do ConVars[name] = {} for num, rgb in SortedPairs(Colour) do local CVar = GetConVar(name..num) or CreateClientConVar(name..num, rgb, true, false) table.insert(ConVars[name], CVar:GetInt()) if not cvars.GetConVarCallbacks(name..num, false) then cvars.AddChangeCallback(name..num, function() timer.Simple(0,ReloadConVars) end) end end ConVars[name] = Color(unpack(ConVars[name])) end HUDWidth = (GetConVar("HudW
Sorry, you need to Log In to post a reply to this thread.