OnAccountCreate: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Fixed a typo)
m (Fixed a typo)
 
(No difference)

Latest revision as of 10:03, 26 May 2024

BETA: NEW FEATURE (BUILD: 1.6.0 r22470)
This event is triggered every time an account is created

Parameters

account theAccount
  • theAccount: An account element that was created

Source

The source of this event is the root element.

Canceling

This event cannot be canceled.

Example

This example prints a message every time new account is created.

addEventHandler('onAccountCreate', root, function(acc)
    local accName = getAccountName(acc)
    local accType = getAccountType(acc) or ''
    iprint('Registered a new '..accType..' account: '..accName)
end)

See Also

Server events


Event functions

Shared