-
Notifications
You must be signed in to change notification settings - Fork 163
API Reference
Blue edited this page Apr 25, 2021
·
5 revisions
EasyAdmin offers an API to interact with certain EasyAdmin Features from code, below are some Events/Functions which can be used:
Kicks a Player with the EasyAdmin Template + Webhook Notification
TriggerEvent("EasyAdmin:kickPlayer", 1, "being rude")Bans a player using the EasyAdmin System + Webhook, expires is in seconds
Arguments:
playerId - the player to ban
reason (optional) - a reason, as a string
expires (optional) - a timeframe in seconds for how long the ban should be
TriggerEvent("EasyAdmin:addBan", 1, "being rude", 604800)Will take a screenshot of the player's game and upload it to the configured image uploader, then post a notification to the Webhook.
Toggles whether a player is muted.
AddEventHandler('EasyAdmin:kickedPlayer', function(playerId,reason)AddEventHandler('EasyAdmin:kickedPlayer', function(playerId,reason, expires)Triggers when a player is banned through EasyAdmin, this can be either through Warnings, normal bans or external bans, "expires" is a unix timestamp.