AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Metamod:Source Plugins (https://forums.alliedmods.net/forumdisplay.php?f=76)
-   -   Admin Manager (https://forums.alliedmods.net/showthread.php?t=39431)

devicenull 12-09-2005 15:42

Admin Manager
 
Current Version: 0.1


What does this do?
By itself, not much. It loads admins from a file (addons\admin\cfg\users.ini) and allows other plugins to access them quite easily.

How do I install it?
You need to download and Install SourceMM. Next, set it up like a normal plugin.

Now you have to consult whatever plugin(s) you are using it with, and determine what flags you want each person to have. Open up addons\admin\cfg\users.ini, and edit the file to your liking.

Where do I get it?
Windows
Linux
Source



Okay, So I'm a plugin developer, how do I use it?
It exports an interface, "AdminManager". You must get a pointer to this in AllPluginsLoaded()
Code:

void MyPlugin::AllPluginsLoaded()
{
        PluginId id2;
        void *ptr = g_SMAPI->MetaFactory("AdminManager", NULL, &id2);
        if (ptr)
        {
                META_LOG(g_PLAPI, "Found Admin Manager[%d] at (%p)!", id2, ptr);
        } else {
                META_LOG(g_PLAPI, "Did not find Admin Manager, plugin cannot load.");
               
        }
        mAdminManager = (IAdminManager *)ptr;
}

Also, you need to have your plugin implement the ISteamidListener class. It contains one function.. which is called when a player is fully connected and his access level has been set. It is important that you do not try to use getAccess() before this function has been called.. It is usually called around ClientPutInServer.

Once that function has been added, use addListener() to add your plugin to the admin manager.
Code:

mAdminManager->addListener((ISteamidListener*)this);
If you don't understand this, come into #sourcemod on irc.gamesurge.net


All times are GMT -4. The time now is 09:47.

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