Skip to content

function getPlayerAni

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

Declaration

async def getPlayerAni(id : int) -> str

Parameters

int id: the player id.

Returns

str: the ani name, e.g: "S_RUN".

Source code in src/pyg2o/functions/player.py
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
async def getPlayerAni(id : int) -> str:
    """
    This function will get the player facing rotation on y axis.
    Original: [getPlayerAni](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerAni/)

    ## Declaration
    ```python
    async def getPlayerAni(id : int) -> str
    ```
    ## Parameters
    `int` **id**: the player id.
    ## Returns
    `str`: the ani name, e.g: `"S_RUN"`.
    """
    data = f'return {get_call_repr()}'

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