Weed Plant - EyeTrace Progress Bar/Text

So I’ve made a small Weed Plant entity for DarkRP (Original, I know) and in the cl_init I’m trying to create a progress bar when aimed at.

It refuses to work, this is what I’ve got

[lua]function ENT:Draw()
self:DrawModel()

	if ( LocalPlayer():GetEyeTrace().Entity == self.Entity && EyePos():Distance( self.Entity:GetPos() ) < 150 ) then
		surface.SetDrawColor(255,0,0)
		surface.DrawRect(ScrW() / 2, ScrH() / 8, 150 * 100/self.Weedtime, 50)
		surface.SetDrawColor(0,0,0)
		surface.DrawOutlinedRect(ScrW() / 2, ScrH() / 8, 150, 50)
	end

end[/lua]

Any ideas why this doesn’t load when I look at the entity?

Thanks in advance for any help!

Thats not a hook for drawing on hud…do this in gamemodes cl_init.lua or hud.lua in the HUDPaint hook

This is for a weed plant entity, not drawing on the HUD.

Note: function ENT:Draw()

Read carefully.

No you read carefully, wtf man. He is drawing hud inside of an ENT:Draw(), thats not right, i corrected him.

[editline]11th February 2013[/editline]

and why the heck does ‘I Like Cereal’ give you a Agree, he doesnt know anything about lua so i just assume hes doing it cuz hes mad :<

cam.Start2D()

Can you cut this? Keep this on-topic, please.