# isPlayerSpawned (Server)

> Tells whether the player has been placed in the world by `spawnPlayer`.

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

## Syntax

```lua
bool isPlayerSpawned(player player)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `player` | `player` | The player. |

## Returns

`true` if the player is spawned, `false` otherwise or if the element is not a player.

## Example

```lua
addCommandHandler("spawn", function(player)
    if not isPlayerSpawned(player) then
        spawnPlayer(player, 2495.1, -1687.4, 13.5)
    end
end)
```

## See also

- [spawnPlayer (Server)](https://wiki.mymp.gg/en/spawnPlayer.md): Places the player in the world, with health at 100, no armour, in interior 0 and with no weapons.
- [onPlayerSpawn (Server)](https://wiki.mymp.gg/en/onPlayerSpawn.md): Fired after spawnPlayer spawns a player.
