ACP QBCore
Logs
User Ban

Add User Ban

This function let you update each player's profile to reflect their current ban status on your server. It provides clear visibility into whether a player is banned, ensuring that their status is easily accessible and up-to-date.

local banData = {
    expire = expire,                -- Expire Date os.time()
    bannedBy = 'ServerAdmin',       -- Admin who banned the player,
    banReason = 'Ban reason',       -- ban reason,
    banDate = os.time(),            -- Ban date
}
 
exports['syn-acp']:addBan(citizenid, banData)

Parameters Description

citizenid => Parameter Description:
The unique identifier for the user being punished.

expire (number) => Parameter Description - banData:
The expiration date of the ban, represented as a Unix timestamp (using os.time()).

bannedBy (string) => Parameter Description - banData:
The name or identifier of the administrator who issued the ban.

banReason (string) => Parameter Description - banData:
The reason for the ban.

banDate (os.time()) => Parameter Description - banData:
The date and time when the ban was issued, represented as a Unix timestamp (using os.time()).


Remove User Ban

This function helps you delete bans added with the previous function, so that they no longer appear on the player's profile

exports['syn-acp']:removeBan(citizenid)

Parameters Description

citizenid => Parameter Description:
The unique identifier for the user being punished.