Garry's Mod

Garry's Mod

224 ratings
Dynamic Resupply Entity
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun
File Size
Posted
Updated
4.682 KB
31 Aug, 2015 @ 2:45pm
23 Mar, 2021 @ 4:58pm
2 Change Notes ( view )

Subscribe to download
Dynamic Resupply Entity

In 1 collection by Nasty Ned
Buckash105's Gameplay Tweaks
2 items
Description
I stopped working on Gmod addons a few years ago, so don't expect me to update any of my addons. Thankfully, this addon still works on modern versions of Gmod, so hopefully that won't be necessary.

This addon adds an entity that supplies the player with ammunition for their equipped weapon whenever they press their USE key on it. The entity can be used an infinite nmber of times, and will give some primary (and secondary if applicable) ammo for whatever weapon is equipped by the player.

This should work with weapons that use custom ammo types (CW2.0 and FA:S2, for example). However, certain weapons (especially melee weapons or other weapons that have infinite ammo) may create errors when you attempt to resupply them. There isn't much I can do about every edge case, unfortunately.

The entity can be found in Entities > Dynamic Resupply.

The addon now requires Zombie Extinguisher's Equipped Weapon Addon.
It is what makes this addon able to read certain data pertaining to your weapons. Plus, it's just nice to have on its own because it lets admins turn on unlimited ammo, give ammo to everyone, and even remove reloading entirely.
44 Comments
Nasty Ned  [author] 7 Jul, 2021 @ 10:18pm 
No harm done! And thank you.
miltank 7 Jul, 2021 @ 9:31pm 
yeah I used it and found that out :P
I wasn't paying attention and miss read the description

keep up the good work
Nasty Ned  [author] 7 Jul, 2021 @ 9:03pm 
It will only supply the held weapon. I can't justifiably make an addon that reads every possible ammotype a player could use in any case. I'm just not that good at Lua.
miltank 7 Jul, 2021 @ 8:19pm 
could you make a setting so you can choose between resupplying held weapon and all weapons
if not that's fine as well
for me filling a health swep's ammo isn't vary challenging :P (just seeing how long I can survive)
Nasty Ned  [author] 24 Mar, 2021 @ 11:10am 
All right. Lemme know if you run into any other issues.
Splyntas 24 Mar, 2021 @ 10:51am 
Thanks for the quick response, it works just fine now.
Nasty Ned  [author] 24 Mar, 2021 @ 10:21am 
Okay, I've done a little research. Looks like I was originally doing testing with Zombie Extinguisher's Equipped Weapon Addon, which means this mod apparently requires that!

I've added it to required items. It should work just fine as long as that's installed.
Splyntas 24 Mar, 2021 @ 6:28am 
There's some kind of error when I use it:

[Dynamic Resupply Entity] lua/entities/loot_ammo/shared.lua:110: attempt to index global 'weapon' (a nil value)
1. unknown - lua/entities/loot_ammo/shared.lua:110

It doesn't give me any ammo, just an error message. Disabled all other addons, tried with HL2 Pistol. Pretty neat it's an actual physical prop now, though.
Nasty Ned  [author] 23 Mar, 2021 @ 8:20pm 
All that bluster about not being the person to ask about updating this addon, and there I go, just... doing all of that stuff I said I wouldn't.

Does this mean that I was lazy, or that I was just a hypocrite?
Why not both?

In all seriousness, hope you all enjoy the update.
Niko 14 Jan, 2021 @ 8:46pm 
I hope theres a rare chance for a cat to come out of the ammo box and kill a citizen and then a message in the chat says 'Cat has been banned for RDM'