Garry's Mod

Garry's Mod

94 ratings
NPC Ammo Drops
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun, Realism
File Size
Posted
Updated
3.270 KB
23 Feb @ 12:38pm
29 Feb @ 5:13pm
3 Change Notes ( view )

Subscribe to download
NPC Ammo Drops

In 1 collection by Coffee Man
Coffee Man's Gameplay-Enhancing Addons
61 items
Description
Simple ammo drop system for Garry's Mod. Makes specific NPC types occasionally drop useful items when they're killed.

Doubles as an updated (albeit simplified) re-release of a now deleted addon.





Features:
  • npc_ammodrops 1 to enable NPC ammo drops.

  • When one of the allowed NPCs is killed, they have specific chances of dropping items. Each percentage chance is separate from one another, meaning that NPCs can end up dropping multiple items, if the chances trigger. The full list is:

    - 70% for a random Ammo Box (includes most Half Life 2 ammo types)
    - 20% for another random Ammo Box.
    - 15% for a Hand Grenade.
    - 20% for a Health Vial.
    - 20% for a Health Kit.
    - 25% for a Battery.

  • Only the following NPCs can drop items upon kill:

    - npc_combine_s
    - npc_metropolice
    - npc_zombie
    - npc_zombie_torso
    - npc_fastzombie
    - npc_fastzombie_torso
    - npc_poisonzombie
    - npc_zombine
    - npc_antlion
    - npc_antlion_worker
    - npc_hunter
    - npc_citizen
    - monster_human_assassin

  • Items spawn around the NPC's pelvis area, causing them to occasionally shoot off the NPC in a comical fashion.

Limitations:
  • This addon has only been tested for Single Player. There may be unnoticed bugs during multiplayer matches.

  • This public release is extremely simplified for compatibility reasons and does not include additional checks which gives the player items more dynamically. Weapon item drops were also removed.




Credits:


12 Comments
Fenix1080 18 Nov @ 11:06am 
How can I activate this mode
Coffee Man  [author] 7 Mar @ 5:30am 
I won't add this option to the public addon as a lot of players are not going to like timed drops, and I'm too lazy to add customization options, but if you want to add it for yourself, you can download the addon and use:

timer.Simple(300, function()
if IsValid(ENTITYNAME) then
ENTITYNAME:Remove()
end
end)


Add it in every if section and replace ENTITYNAME with the name of the entity that drops for that particular if section. For that example, the timer is 300 seconds, so the entity would get removed after 300 seconds (or 5 minutes) if it's still valid on the map. You can change the 300 seconds to something else if you don't like it.
Autumnis 7 Mar @ 3:14am 
Would it be possible to add a setting to make the items disappear after a bit?
Ygor 5 Mar @ 3:47am 
i loved your video XD
Home (KOD) 1 Mar @ 5:17pm 
Would like to know if its possible to implement a setting that makes the random items only drop when scoring headshots on NPCs.
Coffee Man  [author] 24 Feb @ 5:32pm 
😎👍
DISCOUNT CODE: BABBIT 24 Feb @ 4:58pm 
Understood. Keep up the good work on your stuff man, they're some pretty good QoL stuff for gameplay.
Coffee Man  [author] 24 Feb @ 4:57pm 
It was that one, it was pretty outdated so I reworked it to fit in better for most general cases.
DISCOUNT CODE: BABBIT 24 Feb @ 4:56pm 
I think I noticed the deleted addon when searching through stuff to remove, was it in regards to NPC drops that you did, or. . .
cream nation 24 Feb @ 7:46am 
naw naw IM not gonna KILL them...... the big booty combine will then ill just loot the corpses :steammocking: