Raised This Month: $51 Target: $400
 12% 

MultiMod Manager CS [v2.2.1]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
Federicomb
Junior Member
Join Date: Mar 2014
Location: Rosario, Argentina.
Old 07-11-2023 , 03:07   MultiMod Manager CS [v2.2.1]
Reply With Quote #1

MultiMod Manager CS [v2.2.1]


Introduction
Hi , this is my first post here. I want to share with you this project that I have published for 2 years now on my personal GitHub. A project that arose from the fact of improving old multimod plugins that had few features and limitations. Now I feel more confident to share it with you, since it is in a stable version. The project is open to new ideas and suggestions to continue improving it even more. I want to thank the collaborators who have participated and those who are still participating, both in the development of ideas, in testing and debugging. Special thanks to metita who has been the one who has helped me the most in testing and debugging.

Post in spanish: https://amxmodx-es.com/Thread-MultiMod-Manager--25264

Contributors
  • metita
  • Mía
  • Totopizza
  • Roccoxx
  • r0ma
  • Maxi605

RequirementsReSemiclip Compatibility >= 2.3.9 (Optional)

Features
  • Configurations through JSON file
  • Votemod
  • Votemap
  • Nominations (Mods and Maps)
  • RTV (Rock The Vote)
  • Recently played mods and maps
  • Say commands (All say commands can be found here)
  • Admin commands (custom votes, manage, force votemod)
  • API natives and forwards (All detailed information is here)

Config file (JSON) (e.g)
addons/amxmodx/configs/multimod_manager/configs.json
Code:
{
	"global_chat_prefix": "!g[MULTIMOD]",
		// !g = ^4 (Green color)
		// !t = ^3 (Team color)
		// !y = ^1 (con_color cvar)

	"adminflags":
	{
		"menu": "u",        // menu access
		"managemods": "a",  // immunity 
		"selectmenu": "f",  // amx_map command
		"forcevotemod": "f",// amx_map command
		"votemenu": "j"     // amx_vote and other vote commands
	},

	"rockthevote":
	{
		"enable": true,     // true / false
		"cooldown": 120,    // min = 0 (disabled)
		"minplayers": 3,    // min = 0 (disabled) | max = 32
		"percentage": 75    // min = 0 (disabled) | max = 100
	},

	"nomination":
	{
		"mods": true,       // true / false
		"maps": true        // true / false
	},

	"admin_max_options_in_menu": 9,   // min = 2 | max = 9
	"mods_in_menu": 9,                // min = 2 | max = 9
	"maps_in_menu": 9,                // min = 2 | max = 9

	"max_recent_mods": 5,   // min = 0
	"max_recent_maps": 5,   // min = 0

	"overwrite_mapcycle": true, // true / false (overwrites the mapcycle.txt with the maps of the selected mod)

	"resemiclip_path": "", 
		// Path where the add-on is located
		// Leave empty to disable this option ("")
		// If the path does not exist, it will be considered as disabled
		// E.g.: "addons/resemiclip"

	"change_game_description": true, // true / false (Changes the game description with the name of the mod)

	"mods":
	[
		// The first mode will always be the default mode, it cannot be blocked
		{
			"modname": "GunGame",
				// Mod name.
				// E.g.: "GunGame"


			"mod_tag": "gg",
				// Mod tag
				// E.g.: "gg"


			"mapsfile": "gungame_maps.ini",
				// Only the file name along with the extension.
				// The file must be located in "addons/amxmodx/configs/multimod_manager/mapsfiles/"
				// E.g.: "gungame_maps.ini"


			"change_map_type": 0,
				// "change_map_type": 0 (The map will change at the end of the map)
				// "change_map_type": 1 (The map will change at the end of the round)
				// "change_map_type": 2 (Allows to play 1 more round and then changes the map)


			"cvars":
			[
				"sv_gravity 900", "sv_alltalk 1"
			],
				// Cvars that are executed when starting the mode, all the ones you want
				// Each cvar in quotes and separated by commas
				// E.g.: "cvars": [ "sv_gravity 900", "sv_alltalk 1", "hostname My CS Server", "mp_roundtime 6" ]
				// Leave "cvars": [ ] // to not load cvars


			"plugins":
			[
				"plugin10.amxx", "plugin20.amxx"
			],
				// Plugins that are needed for this mode, all the ones you want
				// Each plugin in quotes, separated by commas and with its corresponding extension
				// E.g.: "plugins": [ "gungame.amxx", "ultimate_sounds.amxx", "csstats.amxx" ]
				// Leave "plugins": [ ] // to not load cvars

			"resemiclip_config":
			{
				"semiclip": "1",
				"team": "3", // 0 = all | 1 = T | 2 = CT | 3 = Team
				"time": "0",
				"crouch": "0",
				"effects": "0",
				"distance": "250",
				"transparency": "0",
				"penetfire": "0"
			}
		},
		{
			"modname":"DeathMatch",
			"mod_tag": "dm",
			"mapsfile":"deathmatch_maps.ini",
			"change_map_type": 1,
			"cvars":
			[
				"sv_gravity 900", "sv_alltalk 1"
			],
			"plugins":
			[
				"plugin11.amxx", "plugin21.amxx", "plugin33.amxx", "plugin44.amxx", "plugin5.amxx"
			],
			"resemiclip_config":
			{
				"semiclip": "1",
				"team": "3",
				"time": "0",
				"crouch": "0",
				"effects": "0",
				"distance": "250",
				"transparency": "0",
				"penetfire": "0"
			}
		},
		{
			"modname":"Fruta",
			"mod_tag": "fr",
			"mapsfile":"fruta_maps.ini",
			"change_map_type": 1,
			"cvars":
			[
				"sv_gravity 900", "sv_alltalk 1"
			],
			"plugins":
			[
				"plugin12.amxx", "plugin22.amxx", "plugin32.amxx", "plugin42.amxx"
			],
			"resemiclip_config":
			{
				"semiclip": "1",
				"team": "3",
				"time": "0",
				"crouch": "0",
				"effects": "0",
				"distance": "250",
				"transparency": "0",
				"penetfire": "0"
			}
		},
		{
			"modname":"Zombie Plague",
			"mod_tag": "zp",
			"mapsfile":"zp_maps.ini",
			"change_map_type": 1,
			"cvars":
			[
				"sv_gravity 900", "sv_alltalk 1"
			],
			"plugins":
			[
				"plugin13.amxx", "plugin23.amxx", "plugin33.amxx", "plugin43.amxx", "plugin53.amxx", "plugin63.amxx", "plugin73.amxx"
			],
			"resemiclip_config":
			{
				"semiclip": "1",
				"team": "3",
				"time": "0",
				"crouch": "0",
				"effects": "0",
				"distance": "250",
				"transparency": "0",
				"penetfire": "0"
			}
		},
		{
			"modname":"PaintBall",
			"mod_tag": "pb",
			"mapsfile":"paintball_maps.ini",
			"change_map_type": 1,
			"cvars":
			[
				"sv_gravity 900", "sv_alltalk 1"
			],
			"plugins":
			[
				"plugin14.amxx", "plugin24.amxx", "plugin34.amxx", "plugin44.amxx"
			],
			"resemiclip_config":
			{
				"semiclip": "1",
				"team": "3",
				"time": "0",
				"crouch": "0",
				"effects": "0",
				"distance": "250",
				"transparency": "0",
				"penetfire": "0"
			}
		},
		{
			"modname":"HNS",
			"mod_tag": "hns",
			"mapsfile":"hns_maps.ini",
			"change_map_type": 1,
			"cvars":
			[
				"sv_gravity 900", "sv_alltalk 1"
			],
			"plugins":
			[
				"plugin15.amxx", "plugin25.amxx", "plugin35.amxx", "plugin45.amxx"
			],
			"resemiclip_config":
			{
				"semiclip": "1",
				"team": "3",
				"time": "0",
				"crouch": "0",
				"effects": "0",
				"distance": "250",
				"transparency": "0",
				"penetfire": "0"
			}
		},
		{
			"modname":"Surf",
			"mod_tag": "sf",
			"mapsfile":"surf_maps.ini",
			"change_map_type": 1,
			"cvars":
			[
				"sv_gravity 900", "sv_alltalk 1"
			],
			"plugins":
			[
				"plugin15.amxx", "plugin25.amxx", "plugin35.amxx"
			],
			"resemiclip_config":
			{
				"semiclip": "1",
				"team": "3",
				"time": "0",
				"crouch": "0",
				"effects": "0",
				"distance": "250",
				"transparency": "0",
				"penetfire": "0"
			}
		}
	]
}
Console commands
  • mm_force_votemod: Forces a votemod.
  • amx_multimod: Opens an admin command menu.
  • amx_manage_mm: Opens an admin manage menu.

API
PHP Code:
enum ChangeMap_e
{
    
CHANGEMAP_TIMELEFT,
    
CHANGEMAP_END_OF_ROUND,
    
CHANGEMAP_ONE_MORE_ROUND,
};

/* ===========================================================================
*                 [ MULTIMOD MANAGER NATIVES ]
* ============================================================================ */

/**
 * Return the loaded mods count.
 *
 * @return (int)        Number of loaded mods.
 */
native mm_get_mods_count();

/**
 * Return if the mod is enabled or not.
 *
 * @param iModId        Mod index.
 *
 * @return (bool)       true if the mod is enabled, false otherwise.
 */
native bool:mm_is_mod_enabled(const iModId);

/**
 * Retrieves mod name.
 *
 * @note If the destination buffer is too small to hold the source string, the 
 *       destination will be truncated.
 *
 * @param iModId        Mod index.
 * @param szOutput      Buffer to copy mod name to.
 * @param iLen          Buffer size.
 *
 * @return (int)        -1 on error.
 *                      >= 0 Number of cells written.
 */
native mm_get_mod_name(const iModIdszOutput[], const iLen);

/**
 * Retrieves mod tag.
 *
 * @note If the destination buffer is too small to hold the source string, the 
 *       destination will be truncated.
 *
 * @param iModId        Mod index.
 * @param szOutput      Buffer to copy mod tag to.
 * @param iLen          Buffer size.
 *
 * @return (int)        -1 on error.
 *                      >= 0 Number of cells written.
 */
native mm_get_mod_tag(const iModIdszOutput[], const iLen);

/**
 * Return the mod changemap type.
 *
 * @note See 'ChangeMap_e' enum for more information.
 *
 * @param iModId        Mod index.
 *
 * @return (int)        0 on change map timeleft.
 *                      1 on change map end of round.
 *                      2 on change map one more round.
 */
native ChangeMap_e:mm_get_mod_changemap_type(const iModId);

/**
 * Return the maps list of the mod.
 *
 * @param iModId        Mod index.
 *
 * @return (Array)      Maps list array handle, which must be freed via ArrayDestroy()
 */
native Array:mm_get_mod_maps(const iModId);

/**
 * Return the cvars list of the mod.
 *
 * @param iModId        Mod index.
 *
 * @return (Array)      Cvars list array handle, which must be freed via ArrayDestroy()
 */
native Array:mm_get_mod_cvars(const iModId);

/**
 * Return the plugin list of the mod.
 *
 * @param iModId        Mod index.
 *
 * @return (Array)      Plugins list array handle, which must be freed via ArrayDestroy()
 */
native Array:mm_get_mod_plugins(const iModId);

/**
 * Return the current mod index based on JSON position.
 *
 * @return (int)        Index of the current mod.
 */
native mm_get_currentmod_id();

/**
 * Return the next mod index based on JSON position if nextmod is already chosen.
 *
 * @return (int)        -1 if nextmod is not chosen yet.
 *                      >= 0 Index of the next mod.
 */
native mm_get_nextmod_id();

/**
 * Force a votemod.
 *
 * @return (bool)       true on success, false otherwise
 */
native bool:mm_force_votemod();

/**
 * Force a map change.
 *
 * @param iModId        Mod index.
 * @param szMap         Map to change to.
 * @param flChangeTime  Time to wait before changing map.
 *                      0.0 to change map immediately.
 *
 * @return (bool)       true on success, false otherwise.
 */
native bool:mm_force_change_map(const iModId, const sMap[], const Float:flChangeTime 0.0);

/* ===========================================================================
*                 [ MULTIMOD MANAGER FORWARDS ]
* ============================================================================ */

/**
 * Called when a votemod gets started
 *
 * @param bSecondVote   True if this is the second votemod for tiebreaker
 */
forward multimod_start_votemod(const bool:bSecondVote);

/**
 * Called when a votemod gets ended
 *
 * @param bSecondVote   True if this is the second votemod for tiebreaker
 */
forward multimod_end_votemod(const bool:bSecondVote);

/**
 * Called when a votemap gets started
 *
 * @param bSecondVote   True if this is the second votemap for tiebreaker
 */
forward multimod_start_votemap(const bool:bSecondVote);

/**
 * Called when a votemap gets ended
 *
 * @param bSecondVote   True if this is the second votemap for tiebreaker
 */
forward multimod_end_votemap(const bool:bSecondVote);

/**
 * Called when a admin forces a votemod
 *
 * @param iAdminId      Admin index
 *
 * @return              PLUGIN_CONTINUE to let the admin force a votemod
 *                      PLUGIN_HANDLED or higher to stop the admin from forcing a votemod
 */
forward multimod_admin_force_votemod(const iAdminId); 

Repository

https://github.com/FEDERICOMB96/amxx-multimod-manager

Latest release: https://github.com/FEDERICOMB96/amxx...eleases/latest
Attached Files
File Type: zip MultiModManagerCS-v1.1.0.zip (91.3 KB, 145 views)
File Type: zip MultiModManagerCS-v2.1.2.zip (98.3 KB, 150 views)
File Type: zip MultiModManagerCS-v2.2.0.zip (98.3 KB, 162 views)
File Type: zip MultiModManagerCS-v2.2.1.zip (100.7 KB, 127 views)
__________________
Believe, be yourself and don't hold on to just one dream ❤

https://github.com/FEDERICOMB96

Last edited by Federicomb; 09-12-2023 at 05:02. Reason: Updated to v2.2.1
Federicomb is offline
Federicomb
Junior Member
Join Date: Mar 2014
Location: Rosario, Argentina.
Old 07-21-2023 , 14:37   Re: MultiMod Manager CS [v1.1.0]
Reply With Quote #2

Updated to v1.1.0

Important:
- Updated minimum requirements (AmxModX and ReAPI versions)

Updated all repository:
- Moved all files to a better and intuitive location
- Added workflow on github actions
- Repository can now compile plugin(s) safely

Full Changelog: https://github.com/FEDERICOMB96/amxx...commits/v1.1.0

__________________
Believe, be yourself and don't hold on to just one dream ❤

https://github.com/FEDERICOMB96
Federicomb is offline
IC3k1ng
Senior Member
Join Date: Mar 2023
Location: Argentina
Old 07-22-2023 , 09:30   Re: MultiMod Manager CS [v1.1.0]
Reply With Quote #3

Looks nice. I suggest you to add more compatibility to mods like these:

+ Win by Frags
+ Volleyball Mod
+ Dodgeball Mod
+ Deathrun Manager
+ Jailbreak MOD
+ CS Halloween Mod
+ CS Zombie Panic
+ CS Snow Wars
+ Zombie Escape Mod

I know that it is configurable, but it would be cool for you for try if these mods/gamemodes works correctly with your plugin or it causes limited functions. Cheers.
__________________


IC3k1ng is offline
IC3k1ng
Senior Member
Join Date: Mar 2023
Location: Argentina
Old 07-22-2023 , 09:52   Re: MultiMod Manager CS [v1.1.0]
Reply With Quote #4

Also i suggest you to open a translation request thread, because your mod can get expanded to other people that speaks other languages, like Portuguese, Russian, French, etc.
__________________


IC3k1ng is offline
Rivotril
Senior Member
Join Date: Feb 2014
Location: Argentina
Old 07-25-2023 , 18:31   Re: MultiMod Manager CS [v1.1.0]
Reply With Quote #5

Quote:
Originally Posted by IC3k1ng View Post
Looks nice. I suggest you to add more compatibility to mods like these:

+ Win by Frags
+ Volleyball Mod
+ Dodgeball Mod
+ Deathrun Manager
+ Jailbreak MOD
+ CS Halloween Mod
+ CS Zombie Panic
+ CS Snow Wars
+ Zombie Escape Mod

I know that it is configurable, but it would be cool for you for try if these mods/gamemodes works correctly with your plugin or it causes limited functions. Cheers.
What limitations do you encounter with those particular mods?
Rivotril is offline
IC3k1ng
Senior Member
Join Date: Mar 2023
Location: Argentina
Old 07-26-2023 , 09:37   Re: MultiMod Manager CS [v1.1.0]
Reply With Quote #6

Quote:
Originally Posted by Rivotril View Post
What limitations do you encounter with those particular mods?
There can be any limitation depending of how his mod works. So i just recommend to him to test that gamemodes or mods to make him see how that mods works with his multimod manager and see if there's any problem, because is most probably that one mod cannot start due to each compatibility problem.
__________________


IC3k1ng is offline
Rivotril
Senior Member
Join Date: Feb 2014
Location: Argentina
Old 07-26-2023 , 22:56   Re: MultiMod Manager CS [v1.1.0]
Reply With Quote #7

Quote:
Originally Posted by IC3k1ng View Post
There can be any limitation depending of how his mod works. So i just recommend to him to test that gamemodes or mods to make him see how that mods works with his multimod manager and see if there's any problem, because is most probably that one mod cannot start due to each compatibility problem.
It's tested with a great variety of mods, they all work as intended. If you encounter any compatibility problem with a mod feel free to let us know.
Rivotril is offline
IC3k1ng
Senior Member
Join Date: Mar 2023
Location: Argentina
Old 07-27-2023 , 12:38   Re: MultiMod Manager CS [v1.1.0]
Reply With Quote #8

Quote:
Originally Posted by Rivotril View Post
It's tested with a great variety of mods, they all work as intended. If you encounter any compatibility problem with a mod feel free to let us know.
Okay, thank you.
__________________


IC3k1ng is offline
Federicomb
Junior Member
Join Date: Mar 2014
Location: Rosario, Argentina.
Old 07-30-2023 , 23:19   Re: MultiMod Manager CS [v2.1.2]
Reply With Quote #9

Updated to v2.1.2

What's Changed

- Update native mm_force_votemod return type
- New native added mm_force_change_map
- API major changes
  • Renamed native `mm_get_mod_id` to `mm_get_currentmod_id`
  • Removed native `mm_get_nextmod_name`
  • Added native `mm_get_mods_count`
- API: Added new API natives (5)
  • Added `mm_get_mod_enabled`
  • Added `mm_get_mod_changemap_type`
  • Added `mm_get_mod_maps`
  • Added `mm_get_mod_cvars`
  • Added `mm_get_mod_plugins`
- Fix tag mismatch compile warnings
- Added plugin test
- Fix tasks ids


Full Changelog: https://github.com/FEDERICOMB96/amxx...1.1.0...v2.1.2
__________________
Believe, be yourself and don't hold on to just one dream ❤

https://github.com/FEDERICOMB96
Federicomb is offline
Federicomb
Junior Member
Join Date: Mar 2014
Location: Rosario, Argentina.
Old 07-30-2023 , 23:43   Re: MultiMod Manager CS [v1.1.0]
Reply With Quote #10

Quote:
Originally Posted by IC3k1ng View Post
Looks nice. I suggest you to add more compatibility to mods like these:

+ Win by Frags
+ Volleyball Mod
+ Dodgeball Mod
+ Deathrun Manager
+ Jailbreak MOD
+ CS Halloween Mod
+ CS Zombie Panic
+ CS Snow Wars
+ Zombie Escape Mod

I know that it is configurable, but it would be cool for you for try if these mods/gamemodes works correctly with your plugin or it causes limited functions. Cheers.
Thanks.

My multimod uses the cvar ‘amx_nextmap’ to set the next map when the vote ends, so any other plugin that uses that cvar for map change would have no problems. For example, ‘Win by Frags’ uses that cvar for map change and would have no problems. Personally, I don’t think it’s possible to cover 100% of all the plugins available at the moment, the best I can do is use what is standardized at the moment (cvar ‘amx_nextmap’).
Anyway, each administrator should modify if there is any plugin that is not fully compatible to cover the case. In this new version, i added a new native to make a map change without having to add extra code in an addon, you simply use the native ‘mm_force_change_map’ to make that possible.

Sry for my english
__________________
Believe, be yourself and don't hold on to just one dream ❤

https://github.com/FEDERICOMB96
Federicomb is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode