Garry's Mod

Garry's Mod

NPCs / Players drop ammo on death
79 kommentarer
pavane 30. juni kl. 6:31 
im having a bug where combines would drop health vials for no reason when my hp isn't at 100
Nerfentity 21. juni kl. 13:21 
Is there a way to make it so that they don't drop grenades?
Smytsidian 16. maj kl. 10:18 
For some reason I'm having a weird thing happen to me where the combine NPCs with ar2s drop magnum ammo instead of ar2 ammo.
Sergeant Pan  [ophavsmand] 17. feb. kl. 11:39 
@Ori

This addon only works on NPCs that are actively carrying a weapon, so NPCs that don't/can't carry weapons aren't supported.

However my NPC Item Drops addon can do that.
Ori 17. feb. kl. 10:41 
How do i make zombies drop ammo too?
Meen And Grean 17. okt. 2024 kl. 11:17 
I've been looking for an addon like this for a long time that just gets rid of enemy drops. I like playing on maps that spawn lots of NPCs and I don't want their drops making my game lag, and this handles that perfectly. The only thing that's missing now is preventing them from dropping grenades, health, and batteries but other than that, it's perfect.
seabazian 22. sep. 2024 kl. 13:21 
thanks for this, creator
Jaden The Gundragon 7. aug. 2024 kl. 3:36 
I just saw the update, and i was like “holy crap! I made that happen! I made a difference!”
Jaden The Gundragon 7. aug. 2024 kl. 2:00 
oh please do, it gives your addon a borderlands kinda vibe when it plays in conjunction to the Dynamic Entity Replacer mod that you would have to download from a link in the take and hold map
Sergeant Pan  [ophavsmand] 7. aug. 2024 kl. 0:40 
@Jaden The Gundragon

That isn't a feature in the addon, but I can definitely add it in.
Jaden The Gundragon 7. aug. 2024 kl. 0:26 
hey, can you help me figure out a way to use your addon to have npcs have a CHANCE to drop a weapon?
Sergeant Pan  [ophavsmand] 6. jan. 2024 kl. 23:04 
@WolfOS

That means you have an addon that is replacing the default HL2 ammo entities. If you're using something like Total Replacer to replace the ammo with something else then that is the source of the issue.
⍜. ⊑⏃⌰⌰⍜⍙⏃⊬ 6. jan. 2024 kl. 15:16 
There's a weird bug with this addon, im not sure what exact concoction causes it to occur, but anytime i kill an enemy, some random spot on the map will eject a stack of ammo, typically of every single ammo type to exist in base game Half Life 2.
Sergeant Pan  [ophavsmand] 31. dec. 2023 kl. 11:40 
@Th3TopMuglet

Any NPC with a weapon that uses base HL2 ammo should work fine. I haven't tested this with VJ Base but there shouldn't be any problems.
Th3TopMuglet 31. dec. 2023 kl. 9:58 
does this work on VJ base npcs
Ronnie1001 16. okt. 2023 kl. 8:54 
Yes but that applies to all combine soldiers, not just the elites.
In HL2 only elites drop the AR2 orbs
Sergeant Pan  [ophavsmand] 15. okt. 2023 kl. 23:54 
@Ronnie1001

There's an option in Ammo Drop Settings to make only Combine Soldiers drop AR2 Orbs. It's under the "Disable AR2 Orb Drops" option.
Ronnie1001 15. okt. 2023 kl. 15:22 
Sorry to ask something again but could you add a config to make only elites drop ar2 orbs (Like in hl2)
Ronnie1001 14. okt. 2023 kl. 0:43 
I see, thanks for responding, its a bit annoying but more pistol ammo never hurt I suppose :steamhappy:
Sergeant Pan  [ophavsmand] 14. okt. 2023 kl. 0:40 
@Ronnie1001

If the weapons don't have ammo types defined then there's not much I can do. There's no real way to disable it, other than disabling pistol ammo drops (which affects all weapons.) Making a whole system for weapon-specific drops is beyond my capabilities.
Ronnie1001 13. okt. 2023 kl. 23:32 
Npcs that have custom weapons default to dropping pistol ammo, could you disable this or possibly make it so that you can set what custom weapons drop which type of ammo?
Sergeant Pan  [ophavsmand] 15. aug. 2023 kl. 22:35 
@Brimmla

It's the Dynamic Weapon Replacer . There's also the Simple Weapon / Item Highlights addon, however it's not the one used in the picture.
Searls 15. aug. 2023 kl. 16:16 
whats that mod with the identifying guns on the floor
Spywagen 18. juni 2023 kl. 13:46 
custom entity doesnt seem to work, i try item_battery and it says it has a typo or doesn't exist, if i want to mke a suit battery spawn what do i type?
Jarthuzad 7. feb. 2023 kl. 9:09 
or suit armor drops
Jarthuzad 7. feb. 2023 kl. 8:06 
I'm sorry if you aren't taking suggestions, but an option to drop a second, random ammo type or something similar would be nice! Otherwise, probably my favorite drop on death mod.
Rōnin 24. dec. 2022 kl. 11:21 
Ah that's why, I forgot the "Custom Entity" part from the list lol. I committed a silly. Thank you.
Sergeant Pan  [ophavsmand] 24. dec. 2022 kl. 11:03 
@Rōnin

In the dropdown menu, select "Custom Entity" (which I assume you have already done).

Write the entity name (not the name shown on the icon) without quotation marks or anything.

To get the entity name, right click the entity you want to use, press "Copy to clipboard", and paste the text you copied into the textbox.
Rōnin 24. dec. 2022 kl. 10:55 
So how does the "custom entity" option work? I tried swapping some of the ammo drops for their large counterparts from the base game, and it won't work. They still drop regular sized ammo. Do I need to use quotations, semicolon or other variables?
Fvynchynch 27. okt. 2022 kl. 23:44 
[NPCs / Players drop ammo on death] lua/autorun/npcplayerammodrops.lua:77: attempt to call method 'GetActiveWeapon' (a nil value)
1. v - lua/autorun/npcplayerammodrops.lua:77
2. Run - lua/includes/modules/hook.lua:96
3. unknown - lua/entities/npc_gmodzombie.lua:181
4. FireBullets - [C]:-1
5. ProgressPhysBullet - lua/arccw/shared/sh_physbullet2.lua:404
6. v - lua/arccw/shared/sh_physbullet2.lua:238
7. unknown - lua/includes/modules/hook.lua:96

I was playing with a new addon called PlayerModel Zombies | The Beauty of Annihilation.
Colonel Kirov 22. juli 2022 kl. 20:38 
[NPCs / Players drop ammo on death] lua/autorun/npcplayerammodrops.lua:297: attempt to index global 'attacker' (a nil value)
1. v - lua/autorun/npcplayerammodrops.lua:297
2. unknown - lua/includes/modules/hook.lua:96

While I suicide by typing "kill" on console, some Lua errors appeared like this.
ballsaSTEEL2001 29. maj 2022 kl. 1:36 
You are a legend Mr. Sergeant Pan hop on Team Fortress 2 with me sometime and we should streamline the community servers together. Go plow some payload maps with high population counts and just tear the game up, I appreciate you and think that you are a great guy. Thanks again for all your help I apologize for sounding like a ♥♥♥♥♥
Sergeant Pan  [ophavsmand] 29. maj 2022 kl. 1:34 
@ballsaSTEEL2001

That's all I needed, I know what the problem is now. Expect a fix in a few minutes.
ballsaSTEEL2001 29. maj 2022 kl. 1:29 
Here is the three which I have gotten for some strange reason, and ya know the funny thing was? These weapons worked fine with the addon before on my other pc, worked on that pc just like a charm. I tried to ditch it to turn to Jesus, but so far it has been nothing but pain and misery and a decision I deeply regret but ♥♥♥♥ my life ♥♥♥♥ it I wish I was dead it'd be way better to be dead.
Way way better. But I can't change the miserable ♥♥♥♥♥♥ fact I am alive so, here's this information you wanted.
ballsaSTEEL2001 29. maj 2022 kl. 1:29 
(A.) [NPCs / Players drop ammo on death] lua/autorun/npcplayerammodrops.lua:53: attempt to index a nil value
1. v - lua/autorun/npcplayerammodrops.lua:53
2. unknown - lua/includes/modules/hook.lua:96
3. TakeDamageInfo - [C]:-1
4. unknown - lua/weapons/tf_weapon_club.lua:15
(B.) [NPCs / Players drop ammo on death] lua/autorun/npcplayerammodrops.lua:53: attempt to index a nil value
1. v - lua/autorun/npcplayerammodrops.lua:53
2. unknown - lua/includes/modules/hook.lua:96
3. TakeDamageInfo - [C]:-1
4. unknown - lua/autorun/bsmod_killmove.lua:763
(C.) [NPCs / Players drop ammo on death] lua/autorun/npcplayerammodrops.lua:53: attempt to index a nil value
1. v - lua/autorun/npcplayerammodrops.lua:53
2. unknown - lua/includes/modules/hook.lua:96
3. FireBullets - [C]:-1
4. unknown - lua/weapons/tf_weapon_smg.lua:13
ballsaSTEEL2001 29. maj 2022 kl. 1:23 
Just one moment this may take me a while to replicate the circumstances I was in, apologies.
Sergeant Pan  [ophavsmand] 29. maj 2022 kl. 1:08 
@ballsaSTEEL2001

If the addon is shooting out errors then they should be printed in the console. If you can post the error here I can look into the problem.
ballsaSTEEL2001 29. maj 2022 kl. 1:03 
@Sergeant Pan

Sure wish that I could, but all that I did on my end to apparently ruin something was have to change to a different PC. Installed the game on this one and the addon just flat doesn't work at all, no one with or without a gun wants to drop ammunition. Just make errors for the game to ♥♥♥♥♥ about
I'd rather be at the mercy of the map designers for the ammo in my guns than to keep this addon who makes the top left side of my monitor ruin the immersion for me constantly because I killed something. Sorry bro, wish I knew what was wrong with it but I tried with and without all my other addons installed (As is the first thing that any wise Garry's Mod players should do when experiencing technical difficulty) but alas. I make the chad joke in my original comment
Because that is how I felt about the state of the addon, I opened the game and went 'Work, damit'
And your addon just stuck his chin out at me and said, "No."
Sergeant Pan  [ophavsmand] 29. maj 2022 kl. 0:58 
@ballsaSTEEL2001

Could you be more specific? The addon works perfectly fine on my end.
ballsaSTEEL2001 29. maj 2022 kl. 0:48 
Doesn't work no more. Chad for a while. Bad for the mile.
HK-47 27. maj 2022 kl. 13:57 
Mod isn't working for some reason on my game.. Npcs are dropping guns when I disabled that
Skrint 26. maj 2022 kl. 23:14 
I apologise for not seeing that you’d made that, thanks a lot for showing me!
Sergeant Pan  [ophavsmand] 26. maj 2022 kl. 23:10 
@Taskmaster

My other addon already performs that exact function, and you can use it alongside this one.
Skrint 26. maj 2022 kl. 20:32 
Love this mod so much, would you consider adding the option of health vial and medkit dropping?
HK-47 22. maj 2022 kl. 4:25 
Great mod! This is probably the best one I've seen and this one actually allows you to edit the the drop chance which is great!
Sergeant Pan  [ophavsmand] 6. apr. 2022 kl. 22:40 
@Why do I hear boss music?

I suppose I could do something like that. It's simple enough as far as I'm concerned.
Arsonaut 6. apr. 2022 kl. 17:35 
what if this, but armor
Stockphot 26. feb. 2022 kl. 17:26 
I'm using this mod ( https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2156004721&searchtext=vmanip+manual ) and I can't pick up the dropped ammo for some reason
wheels1390 23. feb. 2022 kl. 16:49 
[NPCs / Players drop ammo on death] lua/autorun/tryingtofixarccw.lua:63: attempt to call method 'SetPos' (a nil value)
1. v - lua/autorun/tryingtofixarccw.lua:63
2. unknown - lua/includes/modules/hook.lua:96
3. FireBullets - [C]:-1
4. Bullets - lua/weapons/mg_base/modules/shared/sh_primaryattack_behaviour.lua:287
5. func - lua/weapons/mg_base/init.lua:75
6. unknown - lua/includes/extensions/net.lua:33
Pea 21. jan. 2022 kl. 9:13 
what is that ragdoll mod?