On Player Warned
Fired after a warning has been successfully recorded. A warning does not drop the player.
Parameters
- src - Player server ID
- token - Security token, must match the
xerotokenconvar - data - Table with the warning details (see Payload below)
Payload (data table)
- warnId - The ID of the created warning
- reason - Warning reason
- description - Warning description
- screenshotUrl - Screenshot URL (or
nil)
Usage
AddEventHandler("xeroshield:onPlayerWarned", function(src, token, data)
if not token or token ~= GetConvar("xerotoken", "") then
return
end
print(string.format("Warned: Id: %s Data: %s", src, json.encode(data)))
end)