This function is used to get current focused player by other player.
Original: getPlayerFocus
Declaration
async def getPlayerFocus(id : int) -> int
Parameters
int id: the player id.
Returns
int: the current focused player id. In case were there is no focus returns -1.
Source code in src/pyg2o/functions/player.py
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420 | async def getPlayerFocus(id : int) -> int:
"""
This function is used to get current focused player by other player.
Original: [getPlayerFocus](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerFocus/)
## Declaration
```python
async def getPlayerFocus(id : int) -> int
```
## Parameters
`int` **id**: the player id.
## Returns
`int`: the current focused player id. In case were there is no focus returns `-1`.
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
|