getPlayerAccount
Server
Returns the MYMP account the player joined with.
table|false getPlayerAccount(player player)
Parameters
| Name | Type | Description |
|---|---|---|
| player | player | The player. |
Returns
A table { id, name, tag }, or false if the player joined without an account (a server without a server_key).
Example
addEventHandler("onPlayerJoin", root, function()
local account = getPlayerAccount(source)
if account then
outputServerLog(account.name .. "#" .. account.tag .. " joined (" .. account.id .. ")")
end
end)