I tested with sub folders,
...plugins/test/abc and moved all SM plugin into last folder.
All plugins are loaded when server start.
Code:
sm plugins list
[SM] Listing 20 plugins:
01 "Admin File Reader" (1.10.0.6510) by AlliedModders LLC
02 "Admin Help" (1.10.0.6510) by AlliedModders LLC
03 "Admin Menu" (1.10.0.6510) by AlliedModders LLC
04 "Anti-Flood" (1.10.0.6510) by AlliedModders LLC
05 "Basic Ban Commands" (1.10.0.6510) by AlliedModders LLC
06 "Basic Chat" (1.10.0.6510) by AlliedModders LLC
07 "Basic Comm Control" (1.10.0.6510) by AlliedModders LLC
08 "Basic Commands" (1.10.0.6510) by AlliedModders LLC
09 "Basic Info Triggers" (1.10.0.6510) by AlliedModders LLC
10 "Basic Votes" (1.10.0.6510) by AlliedModders LLC
11 "test\abc\boon.smx"
12 "Client Preferences" (1.10.0.6510) by AlliedModders LLC
13 "Delay or disable server hibernate" (13.3.2021) by Bacardi
14 "Fun Commands" (1.10.0.6510) by AlliedModders LLC
15 "Fun Votes" (1.10.0.6510) by AlliedModders LLC
16 "test\abc\kickplayers.smx"
17 "Player Commands" (1.10.0.6510) by AlliedModders LLC
18 "Reserved Slots" (1.10.0.6510) by AlliedModders LLC
19 "Sound Commands" (1.10.0.6510) by AlliedModders LLC
20 "test\abc\test.smx"
Plugins in the
...plugins/disabled/ folder would not load automatically, you can manually load plugins however.
...to load all plugins "sm plugins refresh"
but there is no way to load from specific folder.
Code:
sm plugins
SourceMod Plugins Menu:
info - Information about a plugin
list - Show loaded plugins
load - Load a plugin
load_lock - Prevents any more plugins from being loaded
load_unlock - Re-enables plugin loading
refresh - Reloads/refreshes all plugins in the plugins folder
reload - Reloads a plugin
unload - Unload a plugin
unload_all - Unloads all plugins
*edit
But you can do this with custom plugin :/
*edit
Here some kind plugin.
Give
folder name or path/name:
sm_plugins_load
sm_plugins_unload
sm_plugins_reload
example
sm_plugins_load disabled
PHP Code:
public void OnPluginStart()
{
RegConsoleCmd("sm_plugins_load", test);
RegConsoleCmd("sm_plugins_unload", test);
RegConsoleCmd("sm_plugins_reload", test);
}
public Action test(int client, int args)
{
char command[] = "sm plugins reload string";
GetCmdArg(0, command, sizeof(command));
if(args < 1)
{
ReplyToCommand(client, "Usage: %s <folder>\nload, unload or reload plugins from folder", command);
return Plugin_Handled;
}
char folder[PLATFORM_MAX_PATH];
if(GetCmdArg(1, folder, sizeof(folder)) < 1
|| (!IsCharNumeric(folder[0]) && !IsCharAlpha(folder[0])))
{
ReplyToCommand(client, " - Give a folder name.");
return Plugin_Handled;
}
BuildPath(Path_SM, folder, sizeof(folder), "plugins/%s", folder);
if(!DirExists(folder))
{
ReplyToCommand(client, " - This folder '%s' not exist", folder);
return Plugin_Handled;
}
DirectoryListing dir;
dir = OpenDirectory(folder);
if(dir == null) SetFailState("Error - couldn't open directory %s", folder);
if(StrEqual(command, "sm_plugins_load", false))
Format(command, sizeof(command), "sm plugins load");
else if(StrEqual(command, "sm_plugins_unload", false))
Format(command, sizeof(command), "sm plugins unload");
else if(StrEqual(command, "sm_plugins_reload", false))
Format(command, sizeof(command), "sm plugins reload");
char plugin[MAX_NAME_LENGTH];
FileType type;
int dot;
while(dir.GetNext(plugin, sizeof(plugin), type))
{
if(type == FileType_File
&& (dot = FindCharInString(plugin, '.', true)) != -1
&& StrEqual(plugin[dot], ".smx", true))
{
ServerCommand("%s %s/%s", command, folder[25], plugin);
}
}
delete dir;
return Plugin_Handled;
}
__________________