- Documentation
- Server functions
- getPlayerACRisk
Function
getPlayerACRisk
Returns the player's risk level from the anti-cheat (Trilogy Protect): a table with the fields points (risk points), violations (number of detected violations) and byRule (number of violations per rule). Read only: a script can use it e.g. to notify admins, but it does not affect the protection's kicks and bans.
Syntax
table getPlayerACRisk(player thePlayer)Arguments
thePlayerplayer- The player.
Returns
The risk table or false.
Example
setTimer(function()
for _, p in ipairs(getElementsByType("player")) do
local risk = getPlayerACRisk(p)
if risk and risk.violations > 0 then
outputServerLog(getPlayerName(p) .. ": naruszeń " .. risk.violations)
end
end
end, 60000, 0)
See also
setPlayerACExemptTurns cheat detection off or on for a player. Use it when a resource intentionally gives a player flying, aim assistance or unusual movement, so the protection does not treat it as cheating. Admins are exempt automatically. The exemption lasts until the player leaves the server.isPlayerACExemptChecks whether a player is exempt from cheat detection bysetPlayerACExempt.