Skip to content

function isPlayerDead

The function is used to check whether player is dead.
Original: isPlayerDead

Declaration

async def isPlayerDead(id : int) -> bool

Parameters

int id: the player id.

Returns

bool: true when player is dead, otherwise false.

Source code in src/pyg2o/functions/player.py
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
async def isPlayerDead(id : int) -> bool:
    """
    The function is used to check whether player is dead.
    Original: [isPlayerDead](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/isPlayerDead/)

    ## Declaration
    ```python
    async def isPlayerDead(id : int) -> bool
    ```
    ## Parameters
    `int` **id**: the player id.
    ## Returns
    `bool`: `true` when player is dead, otherwise `false`.
    """
    data = f'return {get_call_repr()}'

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