Skip to content

function getPlayerVisual

This function will get the player visual.
Original: getPlayerVisual

Declaration

async def getPlayerVisual(id : int) -> Optional[tuple]

Parameters

int id: the player id.

Returns

tuple (bodyModel, bodyTxt, headModel, headTxt): player visual.

Source code in src/pyg2o/functions/player.py
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
async def getPlayerVisual(id : int) -> Optional[tuple]:
    """
    This function will get the player visual.
    Original: [getPlayerVisual](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerVisual/)

    ## Declaration
    ```python
    async def getPlayerVisual(id : int) -> Optional[tuple]
    ```
    ## Parameters
    `int` **id**: the player id.
    ## Returns
    `tuple (bodyModel, bodyTxt, headModel, headTxt)`: player visual.
    """
    data = f'return {get_call_repr()}'

    server = await PythonWebsocketServer.get_server()
    result = await server.make_request(data)
    return (result['bodyModel'], result['bodyTxt'], result['headModel'], result['headTxt']) if result is not None else (None, None, None, None)