Skip to content

function getPlayerAngle

This function will get the player facing rotation on y axis.
Original: getPlayerAngle

Declaration

async def getPlayerAngle(id : int) -> float

Parameters

int id: the player id.

Returns

float: the facing rotation on y axis.

Source code in src/pyg2o/functions/player.py
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
async def getPlayerAngle(id : int) -> float:
    """
    This function will get the player facing rotation on y axis.
    Original: [getPlayerAngle](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerAngle/)

    ## Declaration
    ```python
    async def getPlayerAngle(id : int) -> float
    ```
    ## Parameters
    `int` **id**: the player id.
    ## Returns
    `float`: the facing rotation on y axis.
    """
    data = f'return {get_call_repr()}'

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