- Documentation
- Server events
- onPlayerSuspiciousMove
Event
onPlayerSuspiciousMove
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.
inVehiclebooltruein 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)