ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server events
  3. onPlayerSuspiciousMove

Event

onPlayerSuspiciousMove

ServerPlayersTrilogy Hub only

A player moved in a way that is impossible in the game (a teleport or too high a speed). Script teleports, spawns and interior entries do not count. It only works when the server config has "anticheat": true. The server itself undoes nothing and kicks nobody; the script decides the punishment (automatic kicking after a threshold is enabled with "anticheat_kick": true).

Handler

addEventHandler("onPlayerSuspiciousMove", root, function(kind, distance, speed, inVehicle) ... end)

Parameters

kindstring
"teleport" or "speed".
distancefloat
Distance in metres.
speedfloat
Speed.
inVehiclebool
true in a vehicle.

Source

source is the player.

cancelEvent() = the report does not count towards the threshold.

Example

addEventHandler("onPlayerSuspiciousMove", root, function(kind, distance)
    outputServerLog(("%s: %s %.0f m"):format(getPlayerName(source), kind, distance))
end)

See also