ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getPlayerACRisk

Function

getPlayerACRisk

ServerPlayersTrilogy Hub only

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