Garry's Mod

Garry's Mod

84 ratings
STMagazines Rewrite
Type: Weapon, Addon
File Size
0.006 MB
Apr 12, 2017 @ 4:22pm
Apr 26 @ 8:52pm
11 Change Notes ( view )

Subscribe to download
STMagazines Rewrite

In 1 collection by SweptThrone
Throneco Complete Pack
106 items
A weapon base acting as a proof of concept for a simple mag system.


Throneco's rolling out the big guns today, releasing the alpha version of our very own weapon base!

The STMagazines Base is a simple weapon base that, instead of using a mass reserve of ammo in an infinite amount of mags, uses a set amount of mags with a pre-defined ammo type. This means that if you fire 8 rounds out of a 20-round mag, you will eventually load an 11-round mag regardless (chambering implemented!)

This base is pretty easy to convert, just a quick switch from the M9K or TFA base to "st_mags_base" and a few other modifications should render a perfectly usable weapon!

These few modifications are:
SWEP.Scoped - If true, zooms in your screen instead of iron-sighting.
SWEP.Sniper - If true, zooms in twice instead of iron-sighting.
SWEP.Zoom - Set to 0 if one of the above is set to true.
SWEP.Revolver - If true, the mag is completely emptied before reloading, because you typically don't catch falling rounds.
SWEP.Primary.DeploySound - Custom sound path that plays when the weapon is deployed.
SWEP.Primary.ReloadSound - Custom sound path that plays when the weapon is reloaded.
Shotguns are not supported.

When converting, make sure to use one of the following SWEP.Primary.Ammo types or make your own. These can be found here[].

With the rewrite, there are two new functions to make this base more user friendly. Player:GiveMagazines( type, number=1 ) and RegisterNewMagazine( type, bullets ).
These are not implemented in any way by default, if you wanna create an entity or script using these, go ahead.

There are bound to be many errors with this base, as it is in alpha. Please report any and all bugs or errors in the comments.

Known "issues":
There's no recoil, and accuracy sucks.

Future plans:
Add shotgun support.
Add a scope texture.
Add a custom scope sound.


Valve - Models and sounds
Facepunch - Ironsights code
Gamebanana - Scope code
< >
Mack(laptop oofed) Jun 23 @ 6:44pm 
Update when I like the mag system pls bb
barrythicc Jul 3, 2018 @ 7:55pm 
Also, idk if youd actually take suggestions, but i think there should be magazine entities, if theyre already arent.
barrythicc Jul 3, 2018 @ 7:53pm 
Where should i spawn the magazines, if thats possible?
SweptThrone  [author] Aug 15, 2017 @ 7:52pm 
i honestly didnt think anyone used this and its packs lmao. i guess since i was wrong, i should get to fixes the people want
jhon "angar" thor Aug 13, 2017 @ 1:57pm 
I understand,but,can I at least hit something once lmao,without being at point blank range. Oh also in your stealth pack the pistols are more accurate than the sniper when it comes to the STM base versions.
SweptThrone  [author] Aug 13, 2017 @ 1:55pm 
one reason is because at the time i was making it, i couldnt figure out how to make the recoil work how i wanted, so instead, i just made the spread high to compensate for not having to compensate for the recoil. it really shouldnt be a problem that you cant hit something EVERY time, thats what i like to call overpowered and unfun.
jhon "angar" thor Aug 13, 2017 @ 11:49am 
Why is the accuracy of every single gun for this base so far about the same as a shotgun? Not even the CSS awp can hit anything consistently,I'm better off if I use these as melee weapons
SweptThrone  [author] Jul 13, 2017 @ 9:28am 
yknow how the m9k base works? same thing but st_mags_base and a couple other things
DDG Patrick the Legendary Jul 13, 2017 @ 12:21am 
How Does this Work
Kiesta07 Apr 21, 2017 @ 12:59am 
Thanks man! I wasn't expecting to have those updated yet!