22:25 - Donkie: go it22:25 - Donkie: got tit22:25 - Donkie: aergaergaer22:25 - Donkie: got it*
Looks like you forgot an endYou have 2 ifs and only 1 end.
function targethud() --Don't forget the brackets local client = LocalPlayer() --LocalPlayer() is a function if client:Alive() then local pos = client:GetShootPos() --self.Owner does not exist, self is only used in meta functions local ang = client:GetAimVector() local tracedata = {} tracedata.start = pos tracedata.endpos = pos+(ang*500) --Short distance so I increased it a bit tracedata.filter = client local trace = util.TraceLine(tracedata) if trace.HitNonWorld and trace.Entity and trace.Entity:IsValid() and trace.Entity:IsPlayer() then --Pile of checks, just to be sure target = trace.Entity local TarHealth = target:Health() --"Entity" was not defined anywhere draw.SimpleText(TarHealth,"ScoreboardText", 950, 7, Color(255,255,255,255)) --I suggest you use font "TargetID" instead of this one end endend
You are using couple variable names that do not existAlso, use code tags in future Fixed:Code: [Select]function targethud() --Don't forget the brackets local client = LocalPlayer() --LocalPlayer() is a function if client:Alive() then local pos = client:GetShootPos() --self.Owner does not exist, self is only used in meta functions local ang = client:GetAimVector() local tracedata = {} tracedata.start = pos tracedata.endpos = pos+(ang*500) --Short distance so I increased it a bit tracedata.filter = client local trace = util.TraceLine(tracedata) if trace.HitNonWorld and trace.Entity and trace.Entity:IsValid() and trace.Entity:IsPlayer() then --Pile of checks, just to be sure target = trace.Entity local TarHealth = target:Health() --"Entity" was not defined anywhere draw.SimpleText(TarHealth,"ScoreboardText", 950, 7, Color(255,255,255,255)) --I suggest you use font "TargetID" instead of this one end endendAlso, for the coordinates...To make it more compatible for more resolutions, use multipliers and dividers with ScrW() and ScrH(), which both return game window's width and height, respectively...ScrW()/2 would be half of the screen
if client:Alive
if client:Alive()
for k,v in pairs(player.GetAll()) do SheetItemOne:AddLine(v:Nick(),v:Team()) // Add lines end