Per quote garrysmod.org:

Allows you to control what weapons are available to you upon re-spawn. Also offers weapon dropping and ammo procurement.

dropweapon - Drops your active weapon.
giveprimaryammo - Gives 1 primary ammunition.
givesecondaryammo - Gives 1 secondary ammunition.
wep_spawnmode - Set this to change which weapons on spawn.

0: No Weapons
1: Garry’s Tools
2: Keep Weapons on Death
3: Default Weapons (Default)

If you want to use this on your server, feel free to remove the dropweapon.lua and giveammo.lua files.


Shouldn’t you be the one to detect if the weapon is there or not? That’s not our faults.


yeah, CptFuzzies’ comment didn’t make sense to me either. Flagging as bad reading :slight_smile:

What Cptfuzzies said is straight forwards. He’s saying the mod should automatically detect if the weapon currently exists or not.

How can i create my own weapon config?

Matsilagi, it’s comin’ soon. :slight_smile:

If it’s in reference to my other post, the problem is with other add-ons trying to access weapons that aren’t there, not mine. The relationship to my add-on, is that this add-on allows you to spawn without any weapons, and dropping all your weapons. It’s mostly to allow you to run around without a gun or tool in your face, and without the camera takin’ pictures every time you click.

The problem is of course, many of the add-ons I’ve downloaded assume that the player always has a weapon equipped, thus try to call functions and parameters of the players current weapon, which all fail, thus a series of errors appear. If you downloaded this add-on, you can see this in action by calling the weapon drop until you’re empty handed, then calling it again. LUA will complain that the weapon object does not exist.