GetPlayerAuditViolations
How many times the item check took unexplained items out of the player’s game this session.
One count for each removal the item check ordered because nothing explained the items - whatever the number of items in it -
since the player joined, plus the removals for a pickup or a take the server itself refused. It is not a count of
violations: a removal is the check working, and an honest player whose game and the server disagree for a moment gets one,
so never ban or kick on it. Under [audit] mode = "observe" it counts only the removals that happen in every mode (the items of
a refused pickup or take); what observe would have removed is in the log. A cheat the server can prove is
OnPlayerCheatDetected’s, not this count’s. 0 for a player who is not there.
Syntax
Section titled “Syntax”GetPlayerAuditViolations(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”number
Example
Section titled “Example”-- a moderator's line: who keeps having items taken out of their gamefunction OnPlayerCommandText(pid, cmd, args) if cmd ~= "removals" or not IsPlayerAdmin(pid) then return false end for _, other in ipairs(GetPlayers()) do local n = GetPlayerAuditViolations(other) if n > 0 then SendClientMessage(pid, COLOR_WHITE, GetPlayerName(other) .. ": " .. n .. " removals") end end return trueendSee also
Section titled “See also”OnPlayerAuditViolation · OnPlayerCheatDetected · the Accounts, admins, bans and the audit group of the index
