# getPlayerAccount (Server)

> Returns the MYMP account the player joined with.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Server
- **Category**: Players and accounts
- **URL**: https://wiki.mymp.gg/en/getPlayerAccount

## Syntax

```lua
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

```lua
addEventHandler("onPlayerJoin", root, function()
    local account = getPlayerAccount(source)
    if account then
        outputServerLog(account.name .. "#" .. account.tag .. " joined (" .. account.id .. ")")
    end
end)
```

## See also

- [getPlayerIdentifiers (Server)](https://wiki.mymp.gg/en/getPlayerIdentifiers.md): Lists all of the player's identifiers, each as type:value, for example steam:110000112345678 and discord:80351110224678912.
- [getPlayerName (Server)](https://wiki.mymp.gg/en/getPlayerName.md): Returns the player's name. On a server with a server_key, it is the MYMP account name as Name#Tag.
- [setQueuePriority (Server)](https://wiki.mymp.gg/en/setQueuePriority.md): Sets an account's priority in a full server's queue. A higher priority goes first.
