Scripted weapon bases for Garry’s Mod. Designed to allow programmers of all levels, from those clueless about programming, to regular hobbyists, to write scripted weapons or “SWEPs” based off weapons we all know and love.

Originally made by AndrewMcWatters, but i loved it due to it beign easy to modify. It broke on GMod13, so i fixed most of the stuffs.

There are 2 versions of it:
swep-bases: Which is the main branch of it, includes all of the HL2 weapons coded in LUA.
css-bases: CSS weapons coded in LUA, includes most of the CSS features.

Here’s a video showing the CSS stuff (No idea why, but Youtube screwed up with the video quality): [video=youtube_share;RnepDfDxmrg]http://www.youtube.com/watch?v=RnepDfDxmrg[/video]

Another video, showing the Viewmodel movement:

Features of the base are:
-Viewmodel movement (Scripted bobbing and sway)
-Easy code (atleast for me it is)
-CSS Movement (On CSS Sweps)
-Complete recoil system (Bullet spread, views and recoil anims)
-Idle animations
-Working shotgun reloads

Here’s the download:
swep-bases (Required for css-bases to run) https://mega.co.nz/#!lJNWwbhY!nKDv5WGCemV-d9Q08MvY69LOhzX9SGy6PBGyAGVdFcg
css-bases: https://mega.co.nz/#!hJ0CzLrL!8nqmkZRmkcoONxvU4m6T7vmfIq9y_DCsAKnR43T Ug8k

Github Repository: https://github.com/Matsilagi/swep_bases (Please help me fix the RPG bug)

Workshop download:
http://steamcommunity.com/sharedfiles/filedetails/?id=271434382 (swep_bases)
http://steamcommunity.com/sharedfiles/filedetails/?id=271444755 (css_bases)

Credits to:
AndrewMcWatters - Original base
Matsilagi (Me) - Fixing most of the content
Danny and DS6 - Viewmodel movement code and beign helpful friends even with my lack of coding abilities for this.

V1.1 - Made CSS branches of HL2 weapons non-spawnable (sorry for non-hl2 shotgun movement); Added a Shellcasing v_model to the Pistol.

Im thinking of adding Smoke trails to the guns. Not sure, newer Source Engine branches has those.

Nice Thread title

Quck typing
Wished i could edit it.

I swear that is kind of a annoyance with Facepunch in a sense

Please tell me this works in high ping (300+) circumstances.

Didnt try, im not sure.

Also, links on the OP updated. Changed some small stuff.

It’s always good to see addons from GMod 12 being ported to 13, thanks.


you should put it on github, then it’s easier to update and others can contribute.

Good idea, i will set it up tomorrow.

Nice work buddy

After failing 2 times on the commits, here we go:

Working GitHub repo.
Feel free to contribute with stuff. All i currently need is a fix for the RPG rocket damage.

Progress update.

This code is available on GitHub

Something i noticed:
The weapon shake when you move goes a bit crazy after 500 velocity.
a little non hd video about it (sorry for the quality ^^): http://www.youtube.com/watch?v=bGF8XdUi2pM

Also the USP got in the shared.lua a defaultclipsize of 13, insteed of 12.

I will see what i can do about movement, thanks.

Will fix the USP ASAP.