onPlayerACInfo | Multi Theft Auto: Wiki Skip to content

onPlayerACInfo

Client-side
Server-side
Shared

This event is triggered when a player trips anti-cheat detections. It can be used to script a white/blacklist of custom d3d9.dll files, or a white/blacklist of players with certain anti-cheat codes. The relevant anti-cheat code has to be disabled (or not enabled) in the server mtaserver.conf to be of use here.

Any resource using this event should call resendPlayerACInfo for each player in onResourceStart

Parameters

table detectedACList, int d3d9Size, string d3d9MD5, string d3d9SHA256
  • detectedACList: A table of anti-cheat codes the player has triggered.
  • d3d9Size: A number representing the file size of any custom d3d9.dll the player may have installed.
  • d3d9MD5: A string containing the MD5 of any custom d3d9.dll the player may have installed.
  • d3d9SHA256: A string containing the SHA256 of any custom d3d9.dll the player may have installed.

Source

element: The source of this event is the player

Code Examples

server

This example prints all information into the chatbox

function handleOnPlayerACInfo( detectedACList, d3d9Size, d3d9MD5, d3d9SHA256 )
outputChatBox( "ACInfo for " .. getPlayerName(source)
.. " detectedACList:" .. table.concat(detectedACList,",")
.. " d3d9Size:" .. d3d9Size
.. " d3d9SHA256:" .. d3d9SHA256
)
end
addEventHandler( "onPlayerACInfo", root, handleOnPlayerACInfo )
-- Ensure no one gets missed when the resource is (re)started
addEventHandler( "onResourceStart", resourceRoot,
function()
for _,plr in ipairs( getElementsByType("player") ) do
resendPlayerACInfo( plr )
end
end
)

See Also