# getQueuePriority (Server)

> Reads an account's priority in a full server's queue.

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

## Syntax

```lua
int getQueuePriority(string accountId)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `accountId` | `string` | The MYMP account id, the `id` of `getPlayerAccount` or the `accountId` of `onPlayerQueue`. |

## Returns

The priority, or `0` if the account has none.

## Example

```lua
addEventHandler("onPlayerQueue", root, function(accountId, name, tag)
    outputServerLog(name .. "#" .. tag .. " queued with priority " .. getQueuePriority(accountId))
end)
```

## See also

- [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.
- [onPlayerQueue (Server)](https://wiki.mymp.gg/en/onPlayerQueue.md): Fired when an account is about to join the queue of a full server. Cancelling the event refuses it.
