Skip to content

function removePlayerOverlay

This function will remove animation overlay from player for all players.
Original: removePlayerOverlay

Declaration

async def removePlayerOverlay(id : int, overlay : str) -> bool:

Parameters

int id: the player id.
str overlay: the overlay Mds name, e.g. 'HUMANS_MILITIA.MDS'

Returns

bool: true if animation overlay was successfully removed from player, otherwise false.

Source code in src/pyg2o/functions/player.py
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
async def removePlayerOverlay(id : int, overlay : str) -> bool:
    """
    This function will remove animation overlay from player for all players.
    Original: [removePlayerOverlay](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/removePlayerOverlay/)

    ## Declaration
    ```python
    async def removePlayerOverlay(id : int, overlay : str) -> bool:
    ```
    ## Parameters
    `int` **id**: the player id.
    `str` **overlay**: the overlay Mds name, e.g. 'HUMANS_MILITIA.MDS'
    ## Returns
    `bool`: `true` if animation overlay was successfully removed from player, otherwise `false`.
    """
    data = f'return {get_call_repr()}'

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