This function will get the player nickname color.
Original: getPlayerColor
Declaration
async def getPlayerColor(id : int) -> Optional[tuple]
Parameters
int id: the player id.
Returns
tuple (r, g, b): the player nickname color.
Source code in src/pyg2o/functions/player.py
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320 | async def getPlayerColor(id : int) -> Optional[tuple]:
"""
This function will get the player nickname color.
Original: [getPlayerColor](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerColor/)
## Declaration
```python
async def getPlayerColor(id : int) -> Optional[tuple]
```
## Parameters
`int` **id**: the player id.
## Returns
`tuple (r, g, b)`: the player nickname color.
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return (result['r'], result['g'], result['b']) if result is not None else (None, None, None)
|