Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
also fix a funny
  • Loading branch information
xen-000 committed Mar 4, 2024
1 parent dacb860 commit f2923d5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@
A MetaMod plugin that allows you to use multiple workshop addons at once and have clients download them.

## Commands
- `mm_extra_addons <ids>`
The workshop IDs of extra addons separated by commas, addons will be downloaded (if not present) and mounted (e.g. "3090239773,3070231528").
Because the download can take time, it's advised to have the addon ready before running maps so content can be precached.
If you edit this during a map, you must change map so clients can also get the new addons
- `mm_extra_addons <ids>` The workshop IDs of extra addons separated by commas, addons will be downloaded (if not present) and mounted (e.g. "3090239773,3070231528").
Once downloads are done, the map is automatically reloaded so content can be precached.

- `mm_extra_addons_timeout <seconds>` How long until clients are timed out in between connects for extra addons
- `mm_extra_addons_timeout <seconds>` How long until clients are timed out in between connects for extra addons, timed out clients will reconnect for their current pending download.
- `mm_print_searchpaths` Print all the search paths currently mounted by the server.

- `mm_download_addon <id>` Download an addon manually.

Both of these commands require a map reload to apply changes.
- `mm_add_addon <id>` Add an addon to the list, but don't mount.
- `mm_remove_addon <id>` Remove an addon from the list, but don't unmount.

## Usage in other MetaMod plugins
- Include the [public header](https://github.com/Source2ZE/MultiAddonManager/blob/main/public/imultiaddonmanager.h).
- Query the interface in `AllPluginsLoaded` like this:
```cpp
IMultiAddonManager *pInterface = (IMultiAddonManager*)g_SMAPI->MetaFactory(MULTIADDONMANAGER_INTERFACE, nullptr, nullptr);
```
- `mm_download_addon <id>` Download an addon manually
- `mm_print_searchpaths` Print all the search paths currently mounted by the server
## Installation
- Install [Metamod](https://cs2.poggu.me/metamod/installation/)
Expand Down
6 changes: 3 additions & 3 deletions src/multiaddonmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ CON_COMMAND_F(mm_add_addon, "Add a workshop ID to the extra addon list", FCVAR_L
{
if (args.ArgC() < 2)
{
Msg("Usage: %s <ID>\n", args[0], VectorToString(g_MultiAddonManager.m_ExtraAddons).c_str());
Msg("Usage: %s <ID>\n", args[0]);
return;
}

Expand All @@ -517,7 +517,7 @@ CON_COMMAND_F(mm_remove_addon, "Remove a workshop ID from the extra addon list",
{
if (args.ArgC() < 2)
{
Msg("Usage: %s <ID>\n", args[0], VectorToString(g_MultiAddonManager.m_ExtraAddons).c_str());
Msg("Usage: %s <ID>\n", args[0]);
return;
}

Expand All @@ -528,7 +528,7 @@ CON_COMMAND_F(mm_download_addon, "Download an addon manually", FCVAR_GAMEDLL | F
{
if (args.ArgC() != 2)
{
Message("Usage: mm_download_addon <ID>\n");
Message("Usage: %s <ID>\n", args[0]);
return;
}

Expand Down

0 comments on commit f2923d5

Please sign in to comment.