OnAccountCreate: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server event}} {{Added feature/item|1.6.1|1.6.0|22470|This event is triggered every time an account is created}} ==Parameters== <syntaxhighlight lang="lua"> account theAccount </syntaxhighlight> *'''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 messa...") |
(No difference)
|
Revision as of 10:01, 26 May 2024
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('onAccountCreated', 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
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled