Event Handlers
This section covers the event handlers for the AntiCheat.
WX AntiCheat includes some event handlers that you can use to interact with the AntiCheat.
onBan
Runs when a player is detected.
Parameters
data
: table
- The data for the event
-
playerId
:number
- ID of the detected player
-
reason
:string
- The reason for the ban
-
image
:string
- The player screenshot in the detection log
-
config
:table
- The config option for the detection
-
playerData
:table
- The player data
-
-
name
:string
- The player's name
-
-
-
banId
:number
- The ban ID
-
-
-
hwid
:table
- The player's HWID
-
-
-
-
[1]
:string
- The first HWID part
-
-
-
-
-
[2]
:string
- The second HWID part
-
-
-
-
-
[3]
:string
- The third HWID part
-
-
-
-
-
[4]
:string
- The fourth HWID part
-
-
-
-
-
[5]
:string
- The fifth HWID part
-
-
-
-
identifiers
:table
- The player's identifiers
-
-
-
-
steamId
:string
- The player's Steam ID
-
-
-
-
-
ipAddress
:string
- The player's IP address
-
-
-
-
-
discordId
:string
- The player's Discord ID
-
-
-
-
-
license
:string
- The player's license
-
-
-
-
-
fivemId
:string
- The player's FiveM ID
-
-
-
-
-
xbox
:string
- The player's Xbox ID
-
-
-
-
-
live
:string
- The player's Live ID
-
-
-
-
-
license2
:string
- The player's license 2
-
-
Example
server.lua
AddEventHandler("wx_anticheat:events:onBan", function(data)
local playerId, reason, image, config, playerData = data.playerId, data.reason, data.image, data.config, data.playerData
-- Interact with the data
)