Note
This functions supports pass_exception: bool optional argument for manual handling exceptions.
This function will set the player scale for all players.
Original: setPlayerScale
Declaration
async def setPlayerScale(id : int, x : float, y : float, z : float) -> Optional[tuple]
Parameters
int id: the player id.
float x: the scale factor on x axis.
float y: the scale factor on y axis.
float z: the scale factor on z axis.
OR
tuple(x, y, z) pos: the scale factor on the XYZ axis.
Source code in src/pyg2o/functions/player.py
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598 | async def setPlayerScale(id : int, x : float, y : float, z : float) -> Optional[tuple]:
"""
!!! note
This functions supports ``pass_exception: bool`` optional argument for manual handling exceptions.
This function will set the player scale for all players.
Original: [setPlayerScale](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerScale/)
## Declaration
```python
async def setPlayerScale(id : int, x : float, y : float, z : float) -> Optional[tuple]
```
## Parameters
`int` **id**: the player id.
`float` **x**: the scale factor on x axis.
`float` **y**: the scale factor on y axis.
`float` **z**: the scale factor on z axis.
OR
`tuple(x, y, z)` **pos**: the scale factor on the XYZ axis.
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return (result['x'], result['y'], result['z']) if result is not None else (None, None, None)
|