This function will apply animation overlay on player for all players.
Original: applyPlayerOverlay
Declaration
async def applyPlayerOverlay(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 applied on player, otherwise false.
Source code in src/pyg2o/functions/player.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51 | async def applyPlayerOverlay(id : int, overlay : str) -> bool:
"""
This function will apply animation overlay on player for all players.
Original: [applyPlayerOverlay](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/applyPlayerOverlay/)
## Declaration
```python
async def applyPlayerOverlay(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 applied on player, otherwise `false`.
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
|