addBan
Extends MTA's existing ban constructor with optional verified Neon and Discord identity fields.
Syntax
ban|false addBan([string IP = '', string Username = '', string Serial = '', player|string responsible = 'Console', string reason = '', int|string seconds = 0, string neonAccountId = '', string discordId = ''])Arguments
IPstringoptional · default ''Optional IP address.
Usernamestringoptional · default ''Optional account username.
Serialstringoptional · default ''Optional MTA serial.
responsibleplayer|stringoptional · default 'Console'Responsible player or display name.
reasonstringoptional · default ''Ban reason.
secondsint|stringoptional · default 0Duration in seconds; 0 is permanent.
neonAccountIdstringoptional · default ''Canonical lowercase Neon account UUID.
discordIdstringoptional · default ''Discord snowflake containing 17 through 20 decimal digits.
Returns
The created ban, or false when validation fails, no usable identifier is supplied, or any supplied identifier overlaps an existing ban.
Ownership and lifecycle
Verified player identifiers belong to the authenticated connection and are read-only to resources. Identity bans persist in the normal server ban list; their enforcement depends on a later connection supplying a verified Neon identity.
- Neon rejects an overlapping identifier instead of silently merging bans.
- A live serial ban captures that player's verified identities automatically. An offline serial-only call cannot infer them.
- Identity enforcement only applies when a later connection supplies a verified identity; neon_auth=required provides the strongest coverage.
OOP aliases
Ban.create(...)
Where this comes from
Continue exploring
← Back to the Neon Lua API · How Verified Neon identity and bans works →