Skip to content

function getPlayerCollision

This function will get the player collision.
Original: getPlayerCollision

Declaration

async def getPlayerCollision(id : int) -> bool

Parameters

int id: the player id.

Returns

bool: true if collision is enabled, otherwise false.

Source code in src/pyg2o/functions/player.py
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
async def getPlayerCollision(id : int) -> bool:
    """
    This function will get the player collision.
    Original: [getPlayerCollision](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerCollision/)

    ## Declaration
    ```python
    async def getPlayerCollision(id : int) -> bool
    ```
    ## Parameters
    `int` **id**: the player id.
    ## Returns
    `bool`: `true` if collision is enabled, otherwise `false`.
    """
    data = f'return {get_call_repr()}'

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