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
How do I make an addon like this.

Thanks in advance.

For singleplayer only thank you