Garry's Mod

Garry's Mod

138 ratings
Oldschool Ammo & Supply
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Roleplay
File Size
Posted
Updated
22.474 KB
9 Jul, 2021 @ 12:43pm
10 Jul, 2021 @ 4:56am
6 Change Notes ( view )

Subscribe to download
Oldschool Ammo & Supply

Description

About
Simple tool for creating oldschool regenerating ammo boxes / health packs. It's inspired by Quake, Half-Life Deathmatch: Source, Team Fortress 2.

How to
Go to the Tools menu and click the Oldschool Ammo Tool under the Jakub Baku tab.
You can select a "Loadout box" preset as an example.

  • Left click with the tool to place an ammo box
  • Right click with the tool at a prop to retrieve it's model
  • Reload the tool aiming below the ammo box to remove it

Customization
Model selection: select a model for the ammo box or pick a model using the right click on the prop,
Supply type: what does the ammo box do on pickup
  • ammo supply - supplies the ammo,
  • health supply - supplies the health, works like a medkit,
  • suit supply - supplies the suit power, works like a suit battery.
Regen time: delay between the pickup and ammo box being active again,
Ammo type: type of ammo to be supplied, only if the Supply type is set to "ammo supply", can be set to none
Weapon type: weapon given on pickup, can be set to none
Count: affects the quantity of health, ammo and suit power given on pickup,

Spin Speed: how fast should the item spin,
Z Offset: controls the height above the ground of the item,
Static: if checked the item will behave as normal prop, will not rotate,
Multi-pack: allows to further customize the ammo box, add multiple items and even spawn NPCs!

Example multi-pack:
ammo Buckshot 36 item weapon_annabelle health 20 suit 15 item item_suit

Syntax is dead simple - first goes the type and then parameters.
Here's the list (type, parameters):
  • ammo 'type' 'quantity'
    gives a quantity of specified ammo. You can find ammo types here[wiki.facepunch.com]
  • item 'class'
    spawns an item of specified class. Great for giving player a pickupable weapons but can be used to spawn a live grenade or Zombie :P
  • health 'amount'
    heals player by specified amount
  • suit 'amount'
    powers the player's suit by specified amount

Saving / Loading
Although the default Garry's Mod's saves works on ammo boxes I've implemented my own way of saving and loading the ammo boxes.

Place some ammo boxes around and when you want to save your work just go to the tool options (or hold "C"), click the "Save" button and you should see a notification. Press "Load" to load the previously saved layout. You can have multiple saves per map by changing the "Save name". The default is "save001" but it can be anything you want.

Saves are located in the garrysmod/data directory as *mapname*_hldsammotool_*savename*.txt and are compressed JSON files. "hldsammotool" postfix stands for "Half Life Deathmatch: Source Ammo Tool" which was a first name of the tool.

23 Comments
Jake_489 29 May, 2023 @ 9:00pm 
Can you fix the weapon give out under the "Weapon Type" option? Do that, and this addon would be perfect!
Gnilomord 18 Feb, 2023 @ 6:49am 
Is it possible to add a function to disable the regen time of items?
the_pmc 10 Jan, 2023 @ 6:42pm 
how to replacement model
ShovelBucket 27 May, 2022 @ 2:23pm 
it doesnt give the weapon to me, even though it is set to give me a weapon. how do you fix this? the only addon i have that i think conflicts with this is the loadout addon by styledstrike.
Ryguy 23 Jan, 2022 @ 2:11pm 
how would I use the multipack option to give ammo from an addon i installed? typing the ammo entity name doesn't give the player the ammo and copying the entity's technical name by right clicking doesn't give it to the player either.
Peekofwar 3 Dec, 2021 @ 12:14pm 
Can you add roll and pitch offset options so that I can place a static pistol on its side?
Anonim47  [author] 3 Sep, 2021 @ 11:17pm 
whaat it's used on darkrp? I don't think so, but it would be super cool if my addon was used
DeadMeat 3 Sep, 2021 @ 11:17am 
POV: Every fucking darkrp server.
Frasiu 31 Jul, 2021 @ 5:35pm 
regenerative edazy suplazy ! finally !
Anonim47  [author] 19 Jul, 2021 @ 3:58am 
hi Eltorro, glad you like it :)