You have to actually have a weapon asset on the map with a script attached.
When the player finds it or via the script it becomes available for use the script calls AddPlayerWeapon( e ) and the e value passed is the entity Id of the weapon asset (which is what the script is called with).
In order for it to actually be a weapon though there are a few other things needed, like settings in the .fpe file and a weaponspec file in gamecore, but for any stock weapon all that stuff is done so it's just a case of attaching a custom script.
Been there, done that, got all the T-Shirts!