Pick up weapons.

How do I make it so that players need to press E (Or function key) in order to pick up weapons, instead of just running over them and picking them up?

At the top of the page right next to the magnifying glass is the search button. If you had bothered to click it you would’ve found about a thousand threads asking the exact same question. Seriously.

These are just the first few results I got :
http://www.facepunch.com/showthread.php?t=861447
http://www.facepunch.com/showthread.php?t=832392
http://www.facepunch.com/showthread.php?t=822535
http://www.facepunch.com/showthread.php?t=659579
http://www.facepunch.com/showthread.php?t=786041
http://www.facepunch.com/showthread.php?t=68242
http://www.facepunch.com/showthread.php?t=663022
http://www.facepunch.com/showthread.php?t=650403
http://www.facepunch.com/showthread.php?t=586627
http://www.facepunch.com/showthread.php?t=513342
http://www.facepunch.com/showthread.php?t=110991

[editline]10:23AM[/editline]

Also I’m rating you dumb.

You are the dumb one. I already tried those and only this one works. The link to the Gmodwiki http://www.facepunch.com/showthread.php?t=786041
Faggot

So use a combination of another function in the player library related to Key, and a traceline.

There are 2 efficient ways to do it that I can think of.

A) Disable weapon pickup by returning false in the hook unless the player is also pressing a certain pickup key and (optionally) looking at it at the same time.

B) Create a dummy swep entity class that takes the model of a weapon and gives it to you when it is used.

All of those posts work fine, you’re obviously doing something wrong.