Skip to content

function getPlayerMaxHealth

This function will get the player max health points.
Original: getPlayerMaxHealth

Declaration

async def getPlayerMaxHealth(id : int) -> int

Parameters

int id: the player id.

Returns

int: the max health points amount.

Source code in src/pyg2o/functions/player.py
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
async def getPlayerMaxHealth(id : int) -> int:
    """
    This function will get the player max health points.
    Original: [getPlayerMaxHealth](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerMaxHealth/)

    ## Declaration
    ```python
    async def getPlayerMaxHealth(id : int) -> int
    ```
    ## Parameters
    `int` **id**: the player id.
    ## Returns
    `int`: the max health points amount.
    """
    data = f'return {get_call_repr()}'

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