AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Auto Plugins Adder[ V 0.0.4 ] (https://forums.alliedmods.net/showthread.php?t=259471)

HamletEagle 03-07-2015 10:26

Auto Plugins Adder[ V 0.0.4 ]
 
1 Attachment(s)

Auto Plugins Adder
Release: 07.03.2015 | Last Update: 30.06.2016

Table of Contents

Description top

While I had some servers, I found quite annoying that after every plugin I was installing, I must add it manually in plugins.ini. But the biggest problem was that sometimes I forget to do it and was wondering why the plugin does not work.

This plugin, as it name says, is a plugin auto adder. At every server start/restart/map change it parse plugins folder and add everything in plugins.ini
I'm sure that you think now, "this won't work, it will keep adding same plugins that are already in a file" or "what if I have custom plugins configuration per map or per mod ?". Well:
  • It adds only the plugins that ARE NOT already in plugins.ini
  • Custom configuration are taken into accout:
    • Any plugin from addons/amxmodx/configs/plugins-mod*.ini is not added.
    • Any plugin from addons/amxmodx/configs/maps/plugins_map_name*.ini is not added.
    • Any plugin from addons/amxmodx/configs/maps/plugins_map_prefix*.ini is not added.
  • Any disabled plugin(no matter from what config file from above) won't be added again.

1.plugins_mod: mod can be any custom mod(like the one from Furiens by ConnorMcLeod)
2.plugins_map_name: can be any map name
3.plugins_map_prefix: can be any map prefix(de/cs/fy/as)

You don't have to do anything, just install and let it do all the work for you. Plugins are instantly loaded.
I'm open to suggestions, please post any ideea you have, I would be glad to add it, if it's fine.
Requirements top

Nothing, just:
  • AmxModX
  • A server without dproto.
    This is not generally needed, but I won't help you if you are running an outdated server with dproto. If you are experiencing problems, update your server/ fix the erros by yourself.
Installation top

To install the plugin:
  1. Download the resources from this post.
  2. Put AutoPluginsAdder.amxx in addons/amxmodx/plugins
  3. Open addons/amxmodx/configs/plugins.ini and add at the end of this file AutoPluginsAdder.amxx
  4. You can put AutoPluginsAdder.sma file into addons/amxmodx/sources but this is not mandatory.
  5. Restart the server/change map.
Cvars top

Cvars that you can configure:
  • load_from_custom_dir
    • Default Value: 0 -> use 1 to turn on
    • If you want to load plugins from a custom folder enable this cvar.
    • At the first time when it is turned on, it will create in addons/amxmodx/plugins a folder called autoloader. Place inside it any plugin that you want to get loaded.
    • Any plugin from addons/amxmodx/plugins won't get loaded.
  • load_plugins_with_prefix
    • Default Value: 0 -> 1 to turn on
    • Allow you to load only plugins that have a custom prefix.
  • requiered_prefix
    • Default Value: _prefix
    • If the above cvar is turned on it will load only plugins that have a custom prefix set from this one.
    • If you set it to zm_, then only plugins that starts with zm_will be loaded
ChangeLog top
  • V 0.0.4:
    • Fixed bugs
    • Code improved
Downloads top
  • V 0.0.3:115

asur 03-07-2015 11:00

Re: Auto Plugins Adder[ V 0.0.2 ]
 
nice idea :D

Phant 03-07-2015 11:10

Re: Auto Plugins Adder[ V 0.0.2 ]
 
When I have some disabled plugin in "plugins.ini", then plugin will add it again? And I got like:
Quote:

;plugin.amxx
plugin.amxx
Or not?

Quote:

A server without dproto.
This is not generally needed, but I won't help you if you are running an outdated server with dproto. If you are experiencing problems, update your server/ fix the erros by yourself.

What a nonsense http://firepic.org/images/2015-03/07/vojqwnoivd8c.gif.

HamletEagle 03-07-2015 11:27

Re: Auto Plugins Adder[ V 0.0.2 ]
 
No, it won't add it again. Any disabled plugin is considered added and won't be taken into account.
I don't consider it a non sense, since this is my work I can impose any condition as long as it respect the license.

Arkshine 03-07-2015 17:01

Re: Auto Plugins Adder[ V 0.0.2 ]
 
It reminds me this plugin: http://forums.alliedmods.net/showthread.php?p=440397

wickedd 03-07-2015 17:16

Re: Auto Plugins Adder[ V 0.0.2 ]
 
@Arkshine

Check your link.

Arkshine 03-07-2015 18:29

Re: Auto Plugins Adder[ V 0.0.2 ]
 
Really, how I did that lol.

zmd94 03-07-2015 18:50

Re: Auto Plugins Adder[ V 0.0.2 ]
 
Nice plugin, HamletEagle. ;)

Jhob94 03-08-2015 00:56

Re: Auto Plugins Adder[ V 0.0.2 ]
 
You could add an alternative feature for only load plugins with a prefix.
Some people may have plugins folder in a mess and wont disable like +20 plugins, so this feature would only add plugins with some prefix. For example, al_nameofplugin.amxx
At the end, people that will use this, will have plugins.ini already fine when install this one so it won't really be a headache for them.
Up to you :)

HamletEagle 03-08-2015 05:24

Re: Auto Plugins Adder[ V 0.0.2 ]
 
Quote:

Originally Posted by Arkshine (Post 2270992)

Well, mine take care of custom plugin configuration, does not create any other files and edit directly plugins.ini. I didn't look at how Hawk's one work, but this is what I understood from fast-reading his post. If you can, look at the code and leave a feedback.

Quote:

Originally Posted by Jhob94 (Post 2271103)
You could add an alternative feature for only load plugins with a prefix.
Some people may have plugins folder in a mess and wont disable like +20 plugins, so this feature would only add plugins with some prefix. For example, al_nameofplugin.amxx
At the end, people that will use this, will have plugins.ini already fine when install this one so it won't really be a headache for them.
Up to you :)

I am not sure that I understood everything. You suggest a cvar so it will write to plugins.ini only plugins with the prefix stored into cvar ?


All times are GMT -4. The time now is 10:59.

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