IOnPlayerChat
WARNING
This is an internal hook and will not be called in plugins. See Internal Hooks for more information.
Usage
- Return type bool to prevent default behavior
Example Autogenerated
csharp
private bool? IOnPlayerChat( ulong userId, string username, string <strChatText>5__2, ConVar.Chat.ChatChannel targetChannel, BasePlayer player )
{
Puts( "IOnPlayerChat works!" );
return null;
}Location
- ConVar.Chat/<sayAs>d__19::MoveNext()
csharp
//---
{
result = false;
}
else
{
object obj = Interface.CallHook("IOnPlayerChat", userId, username, <strChatText>5__2, targetChannel, player);
if (obj is bool)
{
result = (bool)obj;
}
else if (<strChatText>5__2.StartsWith("/") || <strChatText>5__2.StartsWith("\\"))
//---