Skip to content

function getPlayerInvisible

This function will get the player invisiblity for all players.
Original: getPlayerInvisible

Declaration

async def getPlayerInvisible(id : int) -> bool

Parameters

int id: the player id.

Returns

bool: true when player is invisible for all players, otherwise false.

Source code in src/pyg2o/functions/player.py
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
async def getPlayerInvisible(id : int) -> bool:
    """
    This function will get the player invisiblity for all players.
    Original: [getPlayerInvisible](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerInvisible/)

    ## Declaration
    ```python
    async def getPlayerInvisible(id : int) -> bool
    ```
    ## Parameters
    `int` **id**: the player id.
    ## Returns
    `bool`: `true` when player is invisible for all players, otherwise `false`.
    """
    data = f'return {get_call_repr()}'

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