Skip to content

function setPlayerAngle

This function will set the player facing rotation on y axis for all players.
Original: setPlayerAngle

Declaration

async def setPlayerAngle(id : int, angle : float)

Parameters

int id: the player id.
float angle: the facing rotation on y axis.

Source code in src/pyg2o/functions/player.py
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
async def setPlayerAngle(id : int, angle : float):
    """
    This function will set the player facing rotation on y axis for all players.
    Original: [setPlayerAngle](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerAngle/)

    ## Declaration
    ```python
    async def setPlayerAngle(id : int, angle : float)
    ```
    ## Parameters
    `int` **id**: the player id.
    `float` **angle**: 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