Skip to content

IOnPlayerBanned

WARNING

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

Usage

  • No return behavior

Example Autogenerated

csharp
private void IOnPlayerBanned( Network.Connection connection, AuthResponse Status )
{
    Puts( "IOnPlayerBanned works!" );
}

Location

  • ServerMgr::OnValidateAuthTicketResponse(ulong SteamId, ulong OwnerId, AuthResponse Status)
csharp
//---
		return;
	case AuthResponse.VACBanned:
	case AuthResponse.PublisherBanned:
		if (!bannedPlayerNotices.Contains(SteamId))
		{
			Interface.CallHook("IOnPlayerBanned", connection, Status);
			ConsoleNetwork.BroadcastToAllClients("chat.add", 2, 0, "<color=#fff>SERVER</color> Kicking " + connection.username.EscapeRichText() + " (banned by anticheat)");
			bannedPlayerNotices.Add(SteamId);
		}
		break;
	}
//---

Released under the MIT License.