Basic HUD Message displaying request.

Could someone please make me a script that does the following:

  • Finds all entities with the name soda_can
  • Checks if your close to them
  • Checks if your looking at them
  • Shows a few words on the can when you look at it saying “Use To Pickup”

So basicly when your near and looking at an entity called soda_can you see a message in the center of your screen relative to the doors position saying “Use To Pickup”

Im useless with entities, help would be nice.

here we go again, you act :smug: and then ask facepucnh for help.

[editline]24th June 2011[/editline]

hopefuly this is for your hl2 gamemode, i would love to see that released

You are a long way behind.
At least think of a cuss that is in date.

Im asking for help, offer it or dont.

c-unitV2 has more experience then you’ll ever have.

Don’t help Science anyone, He’s an skiddie who’s probably asking you to do it for free then selling your work!!!11

Lol? I can understand c-units post.
But really, saying im a skiddy that sells otgers work?
I have no work too sell and please back up your acusations with proof or evidence please.

Also, what gives you the right to tell people not to help me?

Stop blocking me on steam and add me, Science. I will make this for you.


Why would you want to help an retarded loser? Just sell it to him

You are lucky I’m feeling

(friendly -__-) today.

[editline]24th June 2011[/editline]

because I am really bored

[editline]24th June 2011[/editline]

Also don’t just flame like that, find a reason to talk shit don’t just insult. That will get you banned.

[editline]24th June 2011[/editline]

You are dumber then Science, go away. This is like 20 lines of code, there is no need to sell it.

Pff dumber then science I was sticking up for you, What ever retard, Just fuck off and die.

Oh look, you proved my point.

[editline]24th June 2011[/editline]

Also Science I have this coded already, just add me to get the code.

Pff i doubt a wonderful skid could have coded that fast.

c-unitV2 the dumbest person with dumbophobia scared of his own dumbness.

So I guess Science isn’t going to add me to get the code?

And I guess you’re too dumb to listen to me.

Well since he hasn’t added me

local CanSetVar = true;
local Close;

hook.Add(“Think”, “check_distance”, function()
for k, v in pairs( ents.GetAll() ) do
if( v:GetClass() == “soda_can” ) then
if( (v:GetPos() - LocalPlayer():GetPos()):LengthSqr() <= 100 && CanSetVar ) then
Close = true;
CanSetVar = false;
CanSetVar = true;
Close = nil;

hook.Add(“HUDPaint”, “check_trace”, function()
local tR = LocalPlayer():GetEyeTrace();
if( tR.Entity():GetClass() == “soda_can” && Close ) then
local w, h = surface.GetTextSize(“use to pick the item up”)
draw.RoundedBox(6, ScrW()/2, ScrH()/2, w, h, Color(255, 255, 255))
draw.DrawText(“use to pick the item up”, “TargetIDSmall”, ScrW()/2, ScrH()/2 Color(0, 0, 0))

This is the last time I will be helping you, Science. Since you couldn’t take the time to add me for it.


who the fuck are you


is this you?

Why not just make a trace that’s not far from the players eye? :V

He’s butthurt, don’t bother.

because then I have to look up attachements, calculate positions, this was quicker.

I also want Science to understand it, he wouldn’t understand a more complex version

Immature faggot.

You obviously don’t know that I’m RetTurtl3, So no need to be dumb with “Who the fuck are you” shit.

I’m obviously the Famous one in south park gz.

It seems you are the immature one