Garry's Mod

Garry's Mod

Stik's Weapon Drop and Drop Item on Death Scripts
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
konekuski 20 Mar, 2022 @ 1:58am 
I enabled the drop weapon on death and instaly my server starts to lag
devStik  [author] 14 Jan, 2022 @ 4:34pm 
put in Bug Reports for any errors so I can see what to do to fix it
Notispadiko 14 Jan, 2022 @ 9:30am 
it killed my server
CodFish 2 Feb, 2021 @ 2:56pm 
Stik is the name of one of my characters lmao
devStik  [author] 13 Jan, 2021 @ 1:27pm 
added velocity to weapon drop command
devStik  [author] 12 Jan, 2021 @ 10:11am 
tysm, I wish I could help you, but I am sure there is an addon or some code somewhere that has exactly what you are looking for
S. HITMAN 12 Jan, 2021 @ 10:01am 
I have tons of respect for anyone who can put up with coding anything, cause that stuff is absolute hell for me. Don't worry about overcomplicating the simple code of your mod for a commentor.
datæ 12 Jan, 2021 @ 9:59am 
it's closer to a few lines actually
devStik  [author] 12 Jan, 2021 @ 9:53am 
presumably I would have to add a hook to get all weapons on death, and then create an entity, that when used, gives you all your items back. it would most likely be substantially harder, since dropping an item on death is already part of the game, it just needs to be enabled. the method that you suggested is NOT part of source, and has to be coded in manually, but it may be possible, just requires lots of code
S. HITMAN 11 Jan, 2021 @ 11:32pm 
How difficult do you suppose it would be to code it so every weapon drops at once in a crate on the players death or that items dropped by players be put in a suitcase rather than dropped as the W_model of the gun.

I bring this problem up because the weapon mod i favor has pretty borked world model physics, and im trying to find something that would be able to support that
datæ 8 Dec, 2020 @ 5:49am 
This works fine with manual pickup, you must at least use an empty hand swep if you want to use anything VManip without any weapons on you. No weapons = no c_hands, therefore no animation can be played
devStik  [author] 17 Nov, 2020 @ 5:08pm 
at this moment I don't know/don't have access to that addon's source code and thus I can't make anything for it
cr4sh 17 Nov, 2020 @ 4:27pm 
I like the new drop on death feature. The last weapon you've dropped will automatically be picked up, even if you have a manual pickup mod. This is the only thing there is right now that bugs me, everything else is great.
devStik  [author] 17 Nov, 2020 @ 3:40pm 
btw I updated it to include one of your suggestions
devStik  [author] 17 Nov, 2020 @ 12:14pm 
I think it's because yesterday there were serious bugs, and I fixed them 5 hours later. since the dropped weapons are regular weapon entities, they are most likely affected by vmanip's manual pickup, and I can't do anything about it unless there is a flag or smth I can set
cr4sh 17 Nov, 2020 @ 11:39am 
I don’t know why, but it actually worked this time. I remember there being a lua error yesterday when I tried it. The weapons drop perfectly, but you should change it so you can pick weapons back up without having to hold anything, not even an empty hand swep, this is with vmanip’s manual pickup. This addon has lots of potential.
devStik  [author] 17 Nov, 2020 @ 11:08am 
copy and paste the error here so I can see
cr4sh 17 Nov, 2020 @ 10:04am 
I did that, but whenever I tried to drop the weapon there was a LUA error and nothing dropped.
devStik  [author] 17 Nov, 2020 @ 8:05am 
it can be bound to a key, such as "bind <key> stik_dropweapon", but idk about vmanip's manual pickup. I could add settings for dropping weapon on death though!
cr4sh 17 Nov, 2020 @ 7:06am 
You should add a way for it to be binded to a key, and try to make it compatible with vmanip’s manual pickup, or even add settings for you to drop weapons on death! Just suggestions.