Garry's Mod

Garry's Mod

55 ratings
Stik's Weapon Drop and Drop Item on Death Scripts
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Roleplay, Realism
File Size
Posted
Updated
2.177 KB
16 Nov, 2020 @ 3:10pm
31 Jan, 2021 @ 1:54pm
9 Change Notes ( view )

Subscribe to download
Stik's Weapon Drop and Drop Item on Death Scripts

In 1 collection by devStik
Random Stuff
87 items
Description
A simple weapon drop script
Only two commands: a client command, "stik_dropweapon", which drops the user's currently held weapon. Adding a number between -10 and 10 determines its launch velocity, and if no number is given, it will automatically be 10. The other is a server convar, "sv_stik_weapondrop", and that controls whether any player is permitted to drop a weapon with the previous command or not.

An extra feature
Two more convars exist when a player decides they want to drop their weapon on death, and the client only needs to run "cl_stik_deathdropitem", which allows the user to drop their currently held item on death. However, some server owners may want to configure this, so there is "sv_stik_forcedeathdrop", which is normally set to 0. Setting it to -1 will disable item death drops for everyone, and setting it to 1 will force it on for all players. Note: Having this on with the super physcannon will not work, because the item will disintegrate on death.

Planned ideas:
  • Add drop weapon on death convar
  • Remove reliance on net messages
  • Add ability to change the force of the weapon drop
Please leave any suggestions in the comments below or in the discussions!
Make sure to report any bugs in the Bug Reports discussion!
Popular Discussions View All (1)
4
11 Aug, 2022 @ 5:27pm
PINNED: Bug Reports
devStik
30 Comments
Bonniboi42 13 Apr @ 11:31am 
appreciate the mod bro
:steamthumbsup:
Teimo Väinämö Pielinen 11 Dec, 2024 @ 2:45am 
could you make it so that npcs also drop weapons on death?
devStik  [author] 28 Feb, 2024 @ 12:42pm 
just make it a bind
pokomm24 26 Feb, 2024 @ 4:49am 
make it a key not consle command
TexasOmertosa 1 Jan, 2024 @ 1:05am 
very nice Compared to other modules, this module is more compatible
obsidian5420 22 Oct, 2023 @ 2:27pm 
can you add a setting that controls how long until the dropped weapon vanishes?
N00bGsav™ 25 May, 2023 @ 2:35pm 
which one is the one where when the player dies they drop their weapon
devStik  [author] 14 Sep, 2022 @ 9:40pm 
it should
comte de swag 14 Sep, 2022 @ 3:54pm 
does it stay when you restart?
devStik  [author] 20 Mar, 2022 @ 2:06am 
put it in Bug Reports with actual information, otherwise I can't fix your issue