A community managed simple to use weapon base for S&Box
During the lifetime of garrysmod many weapon bases consisting of poor quality were created, and it would be a shame to see the same in S&box. The goal is to offer an easy to use yet very configurable weapon base maintained by the community for the community.
- No programming skills needed to use
- Highly configurable
- Support for custom animations and actions
- Walking
- Zooming
- Running
- Idle
- Magazine (default)
- Shotgun (shell based reloading)
- Melee
- CSS weapons are included to showcase the base usage
- They will get their own repo later down the line when more guns are ported
- Feel free to use them for your own gamemodes
Anyone can contribute by creating a pull request to their branch. Contributors can help out with the planned updates, outstanding bug/issues, or maybe you just have a cool idea that would improve the base, any help is welcome!
- Framerate independent animations
- Jumping animation
- Looking animation
- Sniper base
- Entity base (e.g. shooting arrows)
- While running looking up or down will force weird rotations on the run animation
For now some deathmatch dependencies are included as the base uses the inventory and hud elements from the deathmatch gamemode.
If you want to test out the base just drag and drop simple-weapon-base-master into your addons folder.
Using the base into your own gamemode can be done by:
- Implementing the PlayerBase class into your player class
partial class MyPlayer : PlayerBase
and calling the PlayerBase constructor on your player constructorpublic MyPlayer() : base() {}
- If you want the HUD you'll need to initialize it in your game constructor
public Game()
{
if ( IsServer )
{
new DeathmatchHud()
}
}
}