# getMaxPlayers (Server)

> Returns how many players the server takes at once.

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

## Syntax

```lua
int getMaxPlayers()
```

## Returns

The current seat limit: the `players` convar at start, or what `setMaxPlayers` set since.

## Example

```lua
outputServerLog(getPlayerCount() .. "/" .. getMaxPlayers() .. " players")
```

## See also

- [setMaxPlayers (Server)](https://wiki.mymp.gg/en/setMaxPlayers.md): Changes how many players the server takes at once.
- [getPlayerCount (Server)](https://wiki.mymp.gg/en/getPlayerCount.md): Returns how many players are on the server.
- [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.
