Discord
Steam
/
Garry's Mod
/
Developers
/
Scoreboard mes..
Login/Join
Event Log
Scoreboard messed up?
0 replies, posted
Search
In This Thread
My scoreboard isnt showing myself up, I cant open up the Q or C menu. Please help. [ERROR] gamemodes/nutscript/gamemode/core/hooks/cl_hooks.lua:465: attempt to call field 'PaintWorldTips' (a nil value) 1. unknown - gamemodes/nutscript/gamemode/core/hooks/cl_hooks.lua:465 [CODE]local NUT_CVAR_LOWER2 = CreateClientConVar("nut_usealtlower", "0", true) function GM:ForceDermaSkin() return "nutscript" end function GM:ScoreboardShow() if (IsValid(nut.gui.score)) then nut.gui.score:SetVisible(true) else vgui.Create("nutScoreboard") end gui.EnableScreenClicker(true) end function GM:ScoreboardHide() if (IsValid(nut.gui.score)) then nut.gui.score:SetVisible(false) CloseDermaMenus() end gui.EnableScreenClicker(false) end function GM:LoadFonts(font, genericFont) surface.CreateFont("nut3D2DFont", { font = font, size = 2048, extended = true, weight = 1000 }) surface.CreateFont("nutTitleFont", { font = font, size = ScreenScale(30), extended = true, weight = 1000 }) surface.CreateFont("nutSubTitleFont", { font = font, size = ScreenScale(18), extended = true, weight = 500 }) surface.CreateFont("nutMenuButtonFont", { font = font, size = ScreenScale(14), extended = true, weight = 1000 }) surface.CreateFont("nutMenuButtonLightFont", { font = font, size = ScreenScale(14), extended = true, weight = 200 }) surface.CreateFont("nutToolTipText", { font = font, size = 20, extended = true, weight = 500 }) surface.CreateFont("nutDynFontSmall", { font = font, size = ScreenScale(22), extended = true, weight = 1000 }) surface.CreateFont("nutDynFontMedium", { font = font, size = ScreenScale(28), extended = true, weight = 1000 }) surface.CreateFont("nutDynFontBig", { font = font, size = ScreenScale(48), extended = true, weight = 1000 }) -- The more readable font. font = genericFont surface.CreateFont("nutCleanTitleFont", { font = font, size = 200, extended = true, weight = 1000 }) surface.CreateFont("nutHugeFont", { font = font, size = 72, extended = true, weight = 1000 }) surface.CreateFont("nutBigFont", { font = font, size = 36, extended = true, weight = 1000 }) surface.CreateFont("nutMediumFont", { font = font, size = 25, extended = true, weight = 1000 }) surface.CreateFont("nutMediumLightFont", { font = font, size = 25, extended = true, weight = 200 }) surface.CreateFont("nutGenericFont", { font = font, size = 20, extended = true, weight = 1000 }) surface.CreateFont("nutChatFont", { font = font, size = math.max(ScreenScale(7), 17), extended = true, weight = 200 }) surface.CreateFont("nutChatFontItalics", { font = font, size = math.max(ScreenScale(7), 17), extended = true, weight = 200, italic = true }) surface.CreateFont("nutSmallFont", { font = font, size = math.max(ScreenScale(6), 17), extended = true, weight = 500 }) surface.CreateFont("nutSmallBoldFont", { font = font, size = math.max(ScreenScale(8), 20), extended = true, weight = 800 }) -- Introduction fancy font. font = "Cambria" surface.CreateFont("nutIntroTitleFont", { font = font, size = 200, extended = true, weight = 1000 }) surface.CreateFont("nutIntroBigFont", { font = font, size = 48, extended = true, weight = 1000 }) surface.CreateFont("nutIntroMediumFont", { font = font, size = 28, extended = true, weight = 1000 }) surface.CreateFont("nutIntroSmallFont", { font = font, size = 22, extended = true, weight = 1000 }) surface.CreateFont("nutIconsSmall", { font = "fontello", size = 22, extended = true, weight = 500 }) surface.CreateFont("nutIconsMedium", { font = "fontello", extended = true, size = 28, weight = 500 }) surface.CreateFont("nutIconsBig", { font = "fontello", extended = true, size = 48, weight = 500 }) end local LOWERED_ANGLES = Angle(30, -30, -25) function GM:CalcViewModelView(weapon, viewModel, oldEyePos, oldEyeAngles, eyePos, eyeAngles) if (!IsValid(weapon)) then return end local client = LocalPlayer() local value = 0 if (!client:isWepRaised()) then value = 100 end local fraction = (client.nutRaisedFrac or 0) / 100 local rotation = weapon.LowerAngles or LOWERED_ANGLES if (NUT_CVAR_LOWER2:GetBool() and weapon.LowerAngles2) then rotation = weapon.LowerAngles2 end eyeAngles:RotateAroundAxis(eyeAngles:Up(), rotation.p * fraction) eyeAngles:RotateAroundAxis(eyeAngles:Forward(), rotation.y * fraction) eyeAngles:RotateAroundAxis(eyeAngles:Right(), rotation.r * fraction) client.nutRaisedFrac = Lerp(FrameTime() * 2, client.nutRaisedFrac or 0, value) viewModel:SetAngles(eyeAngles) if (weapon.GetViewModelPosition) then local position, angles = weapon:GetViewModelPosition(eyePos, eyeAngles) oldEyePos = position or oldEyePos eyeAngles = angles or eyeAngles end if (weapon.CalcViewModelView) then local position, angles = weapon:CalcViewModelView(viewModel, oldEyePos, oldEyeAngles, eyePos, eyeAngles) oldEyePos = position or oldEyePos eyeAngles = angles or eyeAngles end return oldEyePos, eyeAngles end function GM:LoadIntro() -- If skip intro is on if (true) then if (IsValid(nut.gui.char)) then vgui.Create("nutCharMenu") end else end end function GM:InitializedConfig() hook.Run("LoadFonts", nut.config.get("font"), nut.config.get("genericFont")) if (!nut.config.loaded and !IsValid(nut.gui.loading)) then local loader = vgui.Create("EditablePanel") loader:ParentToHUD() loader:Dock(FILL) loader.Paint = function(this, w, h) surface.SetDrawColor(0, 0, 0) surface.DrawRect(0, 0, w, h) end local label = loader:Add("DLabel") label:Dock(FILL) label:SetText(L"loading") label:SetFont("nutTitleFont") label:SetContentAlignment(5) label:SetTextColor(color_white) timer.Simple(5, function() if (IsValid(nut.gui.loading)) then local fault = getNetVar("dbError") if (fault) then label:SetText(fault and L"dbError" or L"loading") local label = loader:Add("DLabel") label:DockMargin(0, 64, 0, 0) label:Dock(TOP) label:SetFont("nutSubTitleFont") label:SetText(fault) label:SetContentAlignment(5) label:SizeToContentsY() label:SetTextColor(Color(255, 50, 50)) end end end) nut.gui.loading = loader nut.config.loaded = true hook.Run("LoadIntro") end end function GM:InitPostEntity() nut.joinTime = RealTime() - 0.9716 end local vignette = nut.util.getMaterial("nutscript/gui/vignette.png") local vignetteAlphaGoal = 0 local vignetteAlphaDelta = 0 local blurGoal = 0 local blurDelta = 0 local hasVignetteMaterial = vignette != "___error" timer.Create("nutVignetteChecker", 1, 0, function() local client = LocalPlayer() if (IsValid(client)) then local data = {} data.start = client:GetPos() data.endpos = data.start + Vector(0, 0, 768) data.filter = client local trace = util.TraceLine(data) if (trace.Hit) then vignetteAlphaGoal = 80 else vignetteAlphaGoal = 0 end end end) local OFFSET_NORMAL = Vector(0, 0, 80) local OFFSET_CROUCHING = Vector(0, 0, 48) paintedEntitiesCache = {} function GM:CalcView(client, origin, angles, fov) local view = self.BaseClass:CalcView(client, origin, angles, fov) or {} local entity = Entity(client:getLocalVar("ragdoll", 0)) local ragdoll = client:GetRagdollEntity() if ((!client:ShouldDrawLocalPlayer() and IsValid(entity) and entity:IsRagdoll()) or (!LocalPlayer():Alive() and IsValid(ragdoll))) then local ent = LocalPlayer():Alive() and entity or ragdoll local index = ent:LookupAttachment("eyes") if (index) then local data = ent:GetAttachment(index) if (data) then view.origin = data.Pos
Sorry, you need to
Log In
to post a reply to this thread.