Ban
Parameters
- Source - Player server ID
- Reason - Ban reason
- Description - Description
- BanAdmin - Boolean, whether to ban admins or not
Usage
exports['resourcename']:BanPlayer(Source, Reason, Description, BanAdmin)
Note: Replace 'resourcename' with the name of xeroshield.
Return Value
Returns the ban ID of the created ban.
Examples
-- Ban player, including admins
local banID = exports['xeroshield']:BanPlayer(1, "Cheating", "Player was using aimbot", true)
print("Created ban with ID: " .. banID)
-- Ban player, excluding admins
local banID = exports['xeroshield']:BanPlayer(1, "Cheating", "Player was using aimbot", false)
Set banAdmin to true to ban admins, or false to exclude them.