Skip to content

function unspawnPlayer

Note

Unspawned players can't see other players, items, etc. and are invisible for others.

This function will unspawn the player.
Original: unspawnPlayer

Declaration

async def unspawnPlayer(id : int)

Parameters

int id: the player id.

Source code in src/pyg2o/functions/player.py
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
async def unspawnPlayer(id : int):
    """
    !!! note
        Unspawned players can't see other players, items, etc. and are invisible for others.
    This function will unspawn the player.
    Original: [unspawnPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/unspawnPlayer/)

    ## Declaration
    ```python
    async def unspawnPlayer(id : int)
    ```
    ## Parameters
    `int` **id**: the player id.
    """
    data = f'return {get_call_repr()}'

    server = await PythonWebsocketServer.get_server()
    result = await server.make_request(data)
    return result