View Single Post
Redbull1993
Member
Join Date: Nov 2012
Old 01-03-2013 , 16:39   Re: Advanced Commands (0.16)
Reply With Quote #899

Quote:
Originally Posted by Franc1sco View Post
Code:
public Action:Command_Admins(client, args)
{
	if (!g_iAdmList) return Plugin_Stop; // this will block other !admins plugins
	new Adms[MAX_CLIENTS],count = 0;
	for (new i = 1; i <= MaxClients; i++)
	if (IsClientInGame(i) && (GetUserFlagBits(i) & ADMFLAG_GENERIC)) Adms[count++] = i;

	if (count)
	{
		PrintToChatEx(client,client,"---------------------------------------------------");
		for (new i = 0; i < count; i++)
		{
			if ((GetUserFlagBits(Adms[i]) & ADMFLAG_ROOT) && (g_iAdmList & 2)) PrintToChatEx(Adms[i],client,"\x04[ROOT]\x01 \x03%N\x01",Adms[i]);
			else if ((GetUserFlagBits(Adms[i]) & ADMFLAG_GENERIC) && (g_iAdmList & 1)) PrintToChatEx(Adms[i],client,"\x04[ADMIN]\x01 \x03%N\x01",Adms[i]);
		}
		PrintToChatEx(client,client,"---------------------------------------------------");
	}
	return Plugin_Handled;
}


change to it
Code:
public Action:Command_Admins(client, args)
{
	if (!g_iAdmList) return Plugin_Continue; // this will allow other !admins plugins
	new Adms[MAX_CLIENTS],count = 0;
	for (new i = 1; i <= MaxClients; i++)
	if (IsClientInGame(i) && (GetUserFlagBits(i) & ADMFLAG_GENERIC)) Adms[count++] = i;

	if (count)
	{
		PrintToChatEx(client,client,"---------------------------------------------------");
		for (new i = 0; i < count; i++)
		{
			if ((GetUserFlagBits(Adms[i]) & ADMFLAG_ROOT) && (g_iAdmList & 2)) PrintToChatEx(Adms[i],client,"\x04[ROOT]\x01 \x03%N\x01",Adms[i]);
			else if ((GetUserFlagBits(Adms[i]) & ADMFLAG_GENERIC) && (g_iAdmList & 1)) PrintToChatEx(Adms[i],client,"\x04[ADMIN]\x01 \x03%N\x01",Adms[i]);
		}
		PrintToChatEx(client,client,"---------------------------------------------------");
	}
	return Plugin_Handled;
}
If you use other plugin for !admins, you must change it


I post this because people ask me for this

EDIT: Added the plugin with the change
1. Smx file have got replaced in cstrike > addons > sourcemod > plugins
2. SP file have got replaced in cstrike > addons > sourcemod > scripting

it still doesn't help.

still i see 2 different "!admins" in chat, when writing !admins.

------------------------
[Tag 1] [Name] (https://forums.alliedmods.net/showthread.php?p=1715146)
[Tag 2] [Name]
------------------------
------------------------
[Admin] [Name] (!admins from this plugin, and this i want to disable)
[Admin] [Name]
------------------------

i want this result.

------------------------
[Tag 1] [Name]
[Tag 2] [Name]
------------------------
Redbull1993 is offline