Skip to content

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.

function OnPlayerLogin(pid)
-- ...
end
Parameter Type
pid number the player

nothing

function OnPlayerLogin(pid)
SendClientMessage(pid, COLOUR_GREEN, "Logged in as " .. GetPlayerName(pid) .. (IsPlayerAdmin(pid) and " (admin)" or ""))
end

IsPlayerRegistered · IsPlayerLoggedIn · IsPlayerAdmin · the Accounts, admins, bans and the audit group of the index