- Documentation
- Server events
- onPlayerLogout
Event
onPlayerLogout
A player logged out of an account.
Handler
addEventHandler("onPlayerLogout", root, function(thePreviousAccount, theCurrentAccount) ... end)Parameters
thePreviousAccountaccount- The account they left.
theCurrentAccountaccount- The guest account.
Source
source is the player.
cancelEvent() blocks the logout.
Example
addEventHandler("onPlayerLogout", root, function(account)
setAccountData(account, "pieniadze", getPlayerMoney(source))
end)