weapon and use key for sp

Weapon pickup with use button and not just walk into it and pick it up
I want to make it use to pick it up.
For like zombie -but sp
Or
How do I make an addon like this.

Thanks in advance.

important!
For singleplayer only thank you