Skip to content

function isPlayerUnconscious

The function is used to check whether player is in unconscious state. The player will be unconscious, when it gets beaten up, but not killed.
Original: isPlayerUnconscious

Declaration

async def isPlayerUnconscious(id : int) -> bool

Parameters

int id: the player id.

Returns

bool: true when player is unconscious, otherwise false.

Source code in src/pyg2o/functions/player.py
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
async def isPlayerUnconscious(id : int) -> bool:
    """
    The function is used to check whether player is in unconscious state. The player will be unconscious, when it gets beaten up, but not killed.
    Original: [isPlayerUnconscious](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/isPlayerUnconscious/)

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

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