SANDBOX:PlayerGiveSWEP
Description
Called when a player attempts to give themselves a weapon from the Q menu. (Left mouse clicks on an icon)
Not to be confused with SANDBOX:PlayerSpawnSWEP, which is called when the weapon is spawned as entity on the ground.
Arguments
3 table spawninfo
The weapon list table of this weapon, see https://github.com/Facepunch/garrysmod/blob/c3801c10e1aacc4c114d81331f301c57bdcf5a52/garrysmod/gamemodes/sandbox/gamemode/commands.lua#L893 and https://github.com/Facepunch/garrysmod/blob/c3801c10e1aacc4c114d81331f301c57bdcf5a52/garrysmod/lua/includes/modules/weapons.lua#L58