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

Admin Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 12-09-2005 , 15:42   Admin Manager
Reply With Quote #1

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
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Reply


Thread Tools
Display Modes

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 12:38.


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