Okay, I’ve ran into several issues on a script I’m making. It’s to replace the default picking up of weapons on Trouble in Terrorist Town, here’s what it currently looks like when you attempt to pick up a weapon when you already have one equipped in the slot.
The only issue with my script, is that to remove the default picking up of weapons when you walk over them, I have to return false in https://wiki.garrysmod.com/page/GM/PlayerCanPickupWeapon. I can’t think of a way to easily “pick” up weapons with E, I tried multiple ways. With returning false in PlayerCanPickupWeapon you can no longer use https://wiki.garrysmod.com/page/Player/Give. I was going to make it so when you press E, it removes the entity, you drop your current weapon in that slot and give the player the weapon with :Give(). Even if I can get that to work, the ammo would not be stored, so in theory, the player could pick up the weapon, drop the ammo, drop the weapon, pick it up again, drop ammo, etc. Since I’ll be using https://wiki.garrysmod.com/page/Player/Give to give them the weapon. Any ideas on how to correctly utilize my code?