Electron Documentation
Exports

Event Listeners

Set up event listeners to respond to player actions in real-time.

The automatic parameter indicates if the action was automatically applied (true) or manually triggered (false). Note: Only available for ban and warning events.

Ban Event

Triggered whenever a player is banned by the anticheat.

server.lua
AddEventHandler("ElectronAC:playerBanned", function(source, reason, details, automatic) 
    -- Your code here
end)

Warning Event

Triggered whenever a player receives a warning.

server.lua
AddEventHandler("ElectronAC:playerWarned", function(source, reason, details, automatic) 
    -- Your code here
end)

Kick Event

Triggered whenever a player is kicked.

server.lua
AddEventHandler("ElectronAC:playerKicked", function(source, reason, details) 
    -- Your code here
end)

On this page