Skip to content

IOnPlayerChat

WARNING

This is an internal hook and will not be called in plugins. See Internal Hooks for more information.

Usage

  • Return TYPE to prevent default behavior

Example Autogenerated

csharp
private void IOnPlayerChat( ulong userId, string username, string <strChatText>5__2, ChatChannel targetChannel, BasePlayer player )
{
    Puts( "IOnPlayerChat works!" );
}

Location

  • ConVar.Chat/<sayAs>d__19::MoveNext()
csharp
//---
			if (this.<strChatText>5__2.Length <= 0)
			{
				result = false;
				goto IL_8DE;
			}
			object returnvar = Interface.CallHook("IOnPlayerChat", this.userId, this.username, this.<strChatText>5__2, this.targetChannel, this.player);
			if (returnvar is bool)
			{
				result = (bool)returnvar;
			}
			if (this.<strChatText>5__2.StartsWith("/") || this.<strChatText>5__2.StartsWith("\\"))
//---

Released under the MIT License.