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

[REQUEST] Online members list


Post New Thread Reply   
 
Thread Tools Display Modes
Mitchell
~lick~
Join Date: Mar 2010
Old 01-18-2013 , 16:10   Re: [REQUEST] Online members list
Reply With Quote #11

Quote:
Originally Posted by dbs1989 View Post
Yes, a nice plugin. Thanks for the post.
But here i have to put all admins and members in the cfg file, manually. Maybe we can change the code so it searched for steamid in the admin.cfg file instead?

My admins and members register at my forum and then it send the steamid to sourcebans, who then register the member to the admin.cfg file with the specified usergroup he registered on the forum.
Because if they have a flag, it will be easier than to check a SQL Database.
Mitchell is offline
dbs1989
Member
Join Date: Dec 2010
Location: Denmark
Old 01-22-2013 , 15:22   Re: [REQUEST] Online members list
Reply With Quote #12

So you need all flags, from the different groups?
__________________
dbs1989 is offline
Marcus_Brown001
AlliedModders Donor
Join Date: Nov 2012
Location: Illinois, United States
Old 01-22-2013 , 21:01   Re: [REQUEST] Online members list
Reply With Quote #13

If you want a command to print out a list of certain online members, then you do a loop through all the current players and you check if they have a flag. You can do multiple flags, but I do not see why you would need to. You simply pick a flag that fits everyone you want shown: for example you want everyone with admin, so you pick a flag that every admin has access to.
Marcus_Brown001 is offline
dbs1989
Member
Join Date: Dec 2010
Location: Denmark
Old 01-25-2013 , 06:16   Re: [REQUEST] Online members list
Reply With Quote #14

Okay. It's sounds like a big plugin to make? Maybe I have to learn sourcemod coding soon
Is it difficult to create a plugin that will tell admins if the player have the flag "o" or not ?
Example:
When a player joins the server, the plugin will tell all online admins if that player have flag "o" ?


I will be glad if someone could make this for me.
__________________
dbs1989 is offline
animalnots
Senior Member
Join Date: Dec 2012
Old 01-25-2013 , 08:41   Re: [REQUEST] Online members list
Reply With Quote #15

Code:
#include <sourcemod>
#define NAME "FLAGCHECK"
#define VERSION "1.0"

public Plugin:myinfo = {
	name = NAME,
	author = "Chuck Norris",
	version = VERSION,
	description = "Checks a client for flags",
	url = "http://www.sourcemod.net"
};

public OnPluginStart() {
	// nothing to do
}

public OnClientPostAdminCheck(client) {
	/* a client connected
	o = ADMFLAG_CUSTOM1
	p = ADMFLAG_CUSTOM2
	q = ADMFLAG_CUSTOM3
	r = ADMFLAG_CUSTOM4
	s = ADMFLAG_CUSTOM5
	t = ADMFLAG_CUSTOM6
	*/
	
	//get & check his flags
	new flags = GetUserFlagBits(client);
	if (flags & ADMFLAG_CUSTOM1 || flags & ADMFLAG_ROOT)
	{
		// Yes, he has a flag
	}
}
Attached Files
File Type: smx flagcheck.smx (2.6 KB, 50 views)
File Type: sp Get Plugin or Get Source (flagcheck.sp - 111 views - 657 Bytes)
__________________
STEAM is the best of the west
Quote:
Never argue with an idiot. He lowers you to his level and then wins on experience!

Last edited by animalnots; 01-25-2013 at 08:42.
animalnots is offline
Reply



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 18:08.


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