Garry's Mod

Garry's Mod

41 ratings
Disable NPC Weapon Drops (Even on HL:S NPCs)
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Roleplay, Realism
File Size
Posted
Updated
4.880 KB
2 Jul, 2024 @ 2:04am
18 Aug @ 7:51am
17 Change Notes ( view )

Subscribe to download
Disable NPC Weapon Drops (Even on HL:S NPCs)

Description
Just another one of those addons that disable NPCs dropping their weapon on death, but this one extends to those Half-Life: Source NPCs by crudely removing the entity for their weapons as they die.

Regular NPCs should also not experience any changes in behavior (e.g. Rebel Medics not healing) due to their spawn flags being changed to just 8192 (overwriting any existing ones they may have) like most other similar addons do.

Extras:
- NPCs (primarily Metro-Police and Rebel Medics) can be prevented from dropping their health vials
- Combine Elites can be prevented from dropping AR2 ball when killed by a player
- Non HL:S NPCs can be made to drop their weapon's ammo pickup instead of their weapon. Currently should work with any weapon that uses default ammo types that have their respective ammo pickup entities available
- CVars (npc_nodropweapon, npc_nodropweapon_hls, npc_nodropweapon_hp, npc_nodropweapon_ball) along with tool-menu (under Options > Cure Pikachu)

Only tested in single-player so far so I can't guarantee it's effectiveness (or performance impact) in multiplayer servers (e.g. Setting is server-sided so all players are affected if anyone screws with settings). Also can not guarantee compatibility with other addons that also use the same hooks this addon uses.
14 Comments
Cure Pikachu  [author] 19 Aug @ 3:46am 
yea
0 drop weapon, 1 don't drop weapon, 2 drop ammo instead of weapon if such exists (for ppl who want ammo but don't want another weapon clogging up inventory)
Райдер 19 Aug @ 3:30am 
0 seems to be fine
Cure Pikachu  [author] 19 Aug @ 2:50am 
and what happens at 0? should be drop weapon unless it was set via other means
Райдер 19 Aug @ 2:35am 
But if you set it to 2, the bullets will still drop. However, if you set it to 1, there will be no bullets.
Cure Pikachu  [author] 19 Aug @ 2:20am 
yea, both 1 and 2 set spawnflag to not drop weapon on death. 2 just makes it spawn ammo pickup if such exists for the weapon's ammo type
Райдер 19 Aug @ 2:10am 
1 removes the cartridges in addition at the moment when 2 performs the function of 1.
Cure Pikachu  [author] 19 Aug @ 2:05am 
Is it? 1 should be drop nothing, 2 is drop ammo instead
Райдер 18 Aug @ 11:10am 
Oh, you have it mixed up now. Now 1 is 2 and 2 is 1.
Райдер 18 Aug @ 11:09am 
NPCs started dropping ammo after the update even though I marked that nothing should drop.
doma 9 Jul, 2024 @ 10:23am 
nvm i just saw the screenshot, nice addon :p2cube: :steamthumbsup: