Garry's Mod

Garry's Mod

634 ratings
Simple ammo limitations [DEPRECATED, READ DESCRIPTION]
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Roleplay, Realism
File Size
Posted
Updated
33.325 KB
Mar 23, 2016 @ 7:34am
Nov 1, 2023 @ 8:33am
6 Change Notes ( view )

Subscribe to download
Simple ammo limitations [DEPRECATED, READ DESCRIPTION]

Description
This addon is deprecated

This addon were made back in 2016 when I had mere knowledge about coding and LUA. I fixed the previous error that was preventing it to work but it has a lots of issues and it's not optimized!

Now gmod added the ability to use the default ammo limit by using gmod_maxammo 0 and each individual max ammo can be set with sk_max_357 or sk_max_buckshot for examples.

This is more functionnal than my addon that still takes ammo pickups despite having full ammo.

Going to the file GarrysMod\garrysmod\cfg\skills.cfg you are able to set permanent ammo limit without having to re-enter into the console.


So for this reason, I'm not about to update it anymore, but if a lot of people really want to use this addon, then maybe I will re-make this addon from scratch.




My very first LUA script I made. Since no one is going to make this kind of addon, I've decided to learn LUA and make it myself.

A simple addon that remplace the unlimited 9999 ammo by a limited ammo amount of your own choice.

Ammo limitations settings can be found under Utilites -> Ammo limitation.

Settings can also be changed by console commands with the prefix "maxammo_".

This add-on can also be disabled, give ammo to maximum capacity on your next respawn and be reset to Half-Life 2's default values.


UPDATE:
Customizable weaponry 2.0 ammo types were added, a new panel should appear under Ammo limitation. Note that this menu will not appear if you have not subscribed and mounted Customizable Weaponry 2.0
https://steamcommunity.com/sharedfiles/filedetails/?id=349050451


UPDATE 2:
Global Ammo Modifier types were added. Like CW 2.0, a new panel should appear if you have mounted the concerned addon:
http://steamcommunity.com/sharedfiles/filedetails/?id=521386466

A simplified settings panel for M9K and TFA weapons were added as well. If you have mounted one of those base addon, the panel should show up.
http://steamcommunity.com/sharedfiles/filedetails/?id=415143062
http://steamcommunity.com/sharedfiles/filedetails/?id=128089118


For now my add-on doesn't support every custom ammo type and the ammo boxes still can be picked up if the ammo limit is reached (I actually don't know how to prevent the player from pick up items)

Planned custom ammo:
- M9K Specialities
- Quake 3


This add-on were not tested when hosting online server.
123 Comments
marlboro Apr 1 @ 11:05am 
this addon no longer works, unfortunately.
Ori Mar 27 @ 4:14am 
I thought this mod would provide an option to set limit to "SLAM" ammo type since you can't do so in the game. In future update perhaps?
Hispanic @ The Disco Sep 2, 2024 @ 9:07am 
The mod author talks about the console commands and cfg files being more efficient at editing ammo limits but in all honesty I found this mod to be working flawlessly without much issue. An update would be nice but really what is there to update besides maybe some optimization here and there?
Bonuts_Goood Jun 28, 2024 @ 4:59am 
NICE now I can start with 0 ammo! Thats all I ever wanted!
Nasty Ned Apr 11, 2024 @ 8:48am 
I've discovered that Gmod's console commands for ammo limitaitons don't actually save, so you have to set them every single time you boot the game. So this addon still has a lot of utility.
guy Dec 10, 2023 @ 9:37pm 
i got this because i had 18 rockets for no reason
Orion Nov 9, 2023 @ 6:54am 
I hope you do remake this addon, the commands don't save, the cfg doesn't seem to work, not even setting the launch options work. It really fraggin' sucks.
Crigence Nov 4, 2023 @ 7:43pm 
I still like this add-on. It's useful for collections in-which asking the player to manually set realistic ammo limits is a big ask. I think that if there was an alternate version that just had realistic defaults and was basically just a front-end for Garry's Mod's ammo settings then it would be perfect
Democratic Ice Noodle Nov 1, 2023 @ 11:01am 
I do know the problem with the console ammo types is some common ammo types like any of the sniper ammo types do not have a command attached to them.
Speedy Von Gofast  [author] Nov 1, 2023 @ 8:52am 
Also bear in mind that Gmod now has its own more functionnal ammo limitation that actually prevent ammo from being take if you're full.

Enter "gmod_maxammo 0" in the console then you can set individual ammo limit with "sk_max_357" for example.