This function will get the player ipv4 ip address.
Original: getPlayerIP
Declaration
async def getPlayerIP(id : int) -> str
Parameters
int id: the player id.
Returns
str: the player ip address, e.g "127.0.0.1".
Source code in src/pyg2o/functions/player.py
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480 | async def getPlayerIP(id : int) -> str:
"""
This function will get the player ipv4 ip address.
Original: [getPlayerIP](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerIP/)
## Declaration
```python
async def getPlayerIP(id : int) -> str
```
## Parameters
`int` **id**: the player id.
## Returns
`str`: the player ip address, e.g `"127.0.0.1"`.
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
|