Skip to content

Teleport Detector

Elijah Brown edited this page Mar 14, 2024 · 4 revisions

image

About Module

Teleport Detector is a small module that allows you to compare the speed and position of targets to the maximum allowed values to check for possible player teleportation. Works well in conjunction with SpeedHack Detector.

image

The detector checks the distance of positions between ticks of a game cycle to make sure that it is not greater than the maximum allowed distance for that tick. The check is based on the formula of the distance between two vectors and the maximum speed variable. It also supports tracking multiple targets in the game.

Get Started

You can provide auto-configuration using Setup Wizzard or setup module manual:

// Initialize Module
Core.GameShield.Main.AddModule<TeleportDetector>();

// Get Module for API Requests
Core.GameShield.Main.GetModule<TeleportDetector>().PauseDetector(true);

Unified for all modules Cheating Detection Event:

// Get Information when cheating detected
EventMessenger.Main.Subscribe<SecurityWarningPayload>(payload => {
    // Work with payload
});

Add / Remove Targets for Teleport Detection:

// Target Data
TeleportTargetChecker currentTarget = new TeleportTargetChecker {
   Target = transform,  // Target Transform
   LastPosition = transform.position,  // Last / Initial position
   MaxSpeed = 30f // Units per checking interval
};

// Add Target
Core.GameShield.Main.GetModule<TeleportDetector>().AddTarget(currentTarget);

// Remove Target
Core.GameShield.Main.GetModule<TeleportDetector>().RemoveTarget(currentTarget);

API Reference

This module provide IShieldModule interface methods with own functional extension:

Method Usage
SetupModule Setup Current Module with configuration and force reinitialization if it needed
Disconnect Disconnect Current Module
PauseDetector Pause / Resume cheating detection for current module
IsPaused Check if current module is paused
GetModuleInfo Get Current Module info (used in assemblies searching)
AddTarget Add Target for Teleport Detector Checking
RemoveTarget Remove Target from Teleport Detector Checking

GameShield Wiki