( MVPL )
Open-source library for GMod servers that capible of easy in-game config integrations, modern UI and modules.
Report Bug
·
Request Feature
This is our library to help you quickly develop addons for your servers. We have built many features into this library. Starting with in-game config, to the ability to use FontAwesome icons.
- Subscribe to addon on the steam workshop page.
- Start/restart your server.
- Base will do all necessary things by itself.
- Type
!mvpin chat. - Select in left sidebar "Config" option.
- You should see all avaible config options for base and instaled modules.
Our base provides a tons of functionality. You can create your own modules using our API and docs.
Let's create a simple connect/disconnect chat notifier.
Firs of all, create your module folder in addons/<your_addon_folder>/mvp/modules/<your_module_folder>/ in that folder you should put sh_module.lua file, it's serves as entry point for our brand new module.
📄 Contents of: sh_module.lua
local MODULE = MODULE
--[[
Module details
]]--
MODULE:SetName('Join/Leave messages') -- Module "fancy" title
MODULE:SetDescription('Sends a chat message when someone leaves or joins.') -- Module description
MODULE:SetAuthor('Myself') -- Module author
MODULE:SetVersion('1.0.0') -- Module version
gameevent.Listen('player_connect') -- Otherwise we will not recieve hooks about player connect
-- Creating a hook, this can be treated as hook.Add(...), but for modules.
MODULE:Hook('player_connect', function(self, data)
-- MODULE^ ^ Hook variables
for i, ply in ipairs( player.GetAll() ) do
ply:ChatPrint( data.name .. ' has connected to server!' )
end
end)
gameevent.Listen('player_disconnect')
MODULE:Hook('player_disconnect', function(self, data)
for i, ply in ipairs( player.GetAll() ) do
ply:ChatPrint( data.name .. ' disconnected!' )
end
end)For more examples, please refer to the Documentation
- In-game config
- Modules system
- Entities-per-module
- Config per module
- Ability to disable modules
- Modules dependencies
- Complete UI set
- Buttons
- Categories
- Text inputs
- Frames
- Pop-ups
- Modal windows
- Font Manager
- Font Awesome integration
- Themes Manager
- In-game theme editor (maybe)
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MPL-2.0 license. See LICENSE for more information.