OnPlayerLogin
The player proved a registered name, or just registered it.
After /login <password> or /register <password>. A registered name held in its own world is released into the shared one
now; its record (GetSavedPlayer) is theirs; if the name is on [accounts] admins, IsPlayerAdmin is true from here.
Syntax
Section titled “Syntax”function OnPlayerLogin(pid) -- ...end| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”nothing
Example
Section titled “Example”function OnPlayerLogin(pid) SendClientMessage(pid, COLOUR_GREEN, "Logged in as " .. GetPlayerName(pid) .. (IsPlayerAdmin(pid) and " (admin)" or ""))endSee also
Section titled “See also”IsPlayerRegistered · IsPlayerLoggedIn · IsPlayerAdmin · the Accounts, admins, bans and the audit group of the index
