Raised This Month: $ Target: $400
 0% 

[CS:GO] Admin see all chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-17-2016 , 14:57   [CS:GO] Admin see all chat
Reply With Quote #1

Hello, is there anyone with some spare time that could make a plugin that gives admins the ability to see all chat? (Meaning if admin is T, he can see CT chat etc)

I found advanced commands but I don't want all that stuff, this is the only thing I want.

Last edited by condolent; 06-18-2016 at 07:53.
condolent is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 06-18-2016 , 01:42   Re: Admin see all chat
Reply With Quote #2

Code:
public void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs)
{
	if (StrEqual(command, "say_team"))
	{
		for (int i = 1; i <= MaxClients; i++)
		{
			if (IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) == GetClientTeam(client))
			{
				g_bSkipPlayers(i);
			}
		}
		
		PrintToAdmins(Admin_Ban, "%N - %s", client, sArgs);
	}
}
Include required:
https://forums.alliedmods.net/showthread.php?t=267743

If the skip client method doesn't work then making a custom function for printing to admins is an option.
Drixevel is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-18-2016 , 07:52   Re: Admin see all chat
Reply With Quote #3

Quote:
Originally Posted by redwerewolf View Post
Code:
public void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs)
{
	if (StrEqual(command, "say_team"))
	{
		for (int i = 1; i <= MaxClients; i++)
		{
			if (IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) == GetClientTeam(client))
			{
				g_bSkipPlayers(i);
			}
		}
		
		PrintToAdmins(Admin_Ban, "%N - %s", client, sArgs);
	}
}
Include required:
https://forums.alliedmods.net/showthread.php?t=267743

If the skip client method doesn't work then making a custom function for printing to admins is an option.
I got errors compiling, PrintToAdmins and g_bSkipPlayers got the error "undefined symbols" :/
condolent is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 06-18-2016 , 10:28   Re: Admin see all chat
Reply With Quote #4

Quote:
Originally Posted by condolent View Post
I got errors compiling, PrintToAdmins and g_bSkipPlayers got the error "undefined symbols" :/
Compiles fine for me, the include should have everything.
Drixevel is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-18-2016 , 11:10   Re: Admin see all chat
Reply With Quote #5

Quote:
Originally Posted by redwerewolf View Post
Compiles fine for me, the include should have everything.
Code:
/* Plugin Template generated by Pawn Studio */

#include <sourcemod>
#include <colorvariables>

public Plugin:myinfo = 
{
	name = "Admin See All Chat",
	author = "redwerewolf",
	description = "Let's admins see all chats.",
	version = "1.0",
	url = "http://trinityplay.net"
}

public OnPluginStart()
{
	
}

public void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs)
{
	if (StrEqual(command, "say_team"))
	{
		for (int i = 1; i <= MaxClients; i++)
		{
			if (IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) == GetClientTeam(client))
			{
				g_bSkipPlayers(i);
			}
		}
		
		PrintToAdmins(Admin_Ban, "%N - %s", client, sArgs);
	}
}
That's my whole code, and the include is in my folder, seems like it's not grabbing it then for some reason?

EDIT: PrintToAdmins is nothing that included with colorvariables, is there maybe some other version of it you're using?
EDIT 2: Looked over the github-repo and saw that there was an updated version than the one I had. That included CPrintToChatAdmins atleast

Last edited by condolent; 06-18-2016 at 11:22.
condolent is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 06-18-2016 , 12:59   Re: Admin see all chat
Reply With Quote #6

Quote:
Originally Posted by condolent View Post
Code:
/* Plugin Template generated by Pawn Studio */

#include <sourcemod>
#include <colorvariables>

public Plugin:myinfo = 
{
	name = "Admin See All Chat",
	author = "redwerewolf",
	description = "Let's admins see all chats.",
	version = "1.0",
	url = "http://trinityplay.net"
}

public OnPluginStart()
{
	
}

public void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs)
{
	if (StrEqual(command, "say_team"))
	{
		for (int i = 1; i <= MaxClients; i++)
		{
			if (IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) == GetClientTeam(client))
			{
				g_bSkipPlayers(i);
			}
		}
		
		PrintToAdmins(Admin_Ban, "%N - %s", client, sArgs);
	}
}
That's my whole code, and the include is in my folder, seems like it's not grabbing it then for some reason?

EDIT: PrintToAdmins is nothing that included with colorvariables, is there maybe some other version of it you're using?
EDIT 2: Looked over the github-repo and saw that there was an updated version than the one I had. That included CPrintToChatAdmins atleast
I forgot that I am indeed using a modified version of that include, whoops.

Change the following:
Code:
g_bSkipPlayers to CSkipNextClient
PrintToAdmins to CPrintToChatAdmins
Drixevel is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-18-2016 , 13:01   Re: Admin see all chat
Reply With Quote #7

Quote:
Originally Posted by redwerewolf View Post
I forgot that I am indeed using a modified version of that include, whoops.

Change the following:
Code:
g_bSkipPlayers to CSkipNextClient
PrintToAdmins to CPrintToChatAdmins
Thanks, will try it out!
condolent is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-18-2016 , 13:18   Re: [CS:GO] Admin see all chat
Reply With Quote #8

Now I get like 5 errors instead, of the include-file having things inside it that's wrong ._.

Code:
//// admin-see-all-chat.sp
//
// C:\Users\Condolent PC\Desktop\sourcemod\addons\sourcemod\scripting\include\colorvariablez.inc(147) : error 017: undefined symbol "iTeam"
// C:\Users\Condolent PC\Desktop\sourcemod\addons\sourcemod\scripting\include\colorvariablez.inc(153) : error 001: expected token: ")", but found "~"
// C:\Users\Condolent PC\Desktop\sourcemod\addons\sourcemod\scripting\include\colorvariablez.inc(153) : warning 215: expression has no effect
// C:\Users\Condolent PC\Desktop\sourcemod\addons\sourcemod\scripting\include\colorvariablez.inc(153) : error 001: expected token: ";", but found ")"
// C:\Users\Condolent PC\Desktop\sourcemod\addons\sourcemod\scripting\include\colorvariablez.inc(153) : error 029: invalid expression, assumed zero
// C:\Users\Condolent PC\Desktop\sourcemod\addons\sourcemod\scripting\include\colorvariablez.inc(153) : fatal error 189: too many error messages on one line
//
// Compilation aborted.
// 5 Errors.
//
// Compilation Time: 0,55 sec
// ----------------------------------------

Last edited by condolent; 06-18-2016 at 13:20.
condolent 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 15:47.


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