Skip to content
This repository was archived by the owner on Dec 28, 2024. It is now read-only.

Latest commit

 

History

91 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


MULTIVERSE Project Library

( MVPL )

Open-source library for GMod servers that capible of easy in-game config integrations, modern UI and modules.

Report Bug · Request Feature

About The Project

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.

Getting Started

  • Subscribe to addon on the steam workshop page.
  • Start/restart your server.
  • Base will do all necessary things by itself.

Configurating

  • Type !mvp in chat.
  • Select in left sidebar "Config" option.
  • You should see all avaible config options for base and instaled modules.

Usage

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

Roadmap

  • 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).

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MPL-2.0 license. See LICENSE for more information.

About

MULTIVERSE Project Lib. This is a base script with tons of utilites for our addons.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages