This function will cause player to draw a weapon. If hero/npc doesn't have equipped weapon assosiated with the preffered weapon mode, then it will try to draw melee weapon, otherwise WEAPONMODE_FIST will be used instead.
Original: drawWeapon
Declaration
async def drawWeapon(id : int, weaponMode : int)
Parameters
int id: the player id.
int weaponMode: the preffered weapon mode. For more information see Weapon mode constants.
Source code in src/pyg2o/functions/player.py
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92 | async def drawWeapon(id : int, weaponMode : int):
"""
This function will cause player to draw a weapon. If hero/npc doesn't have equipped weapon assosiated with the preffered weapon mode, then it will try to draw melee weapon, otherwise `WEAPONMODE_FIST` will be used instead.
Original: [drawWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/drawWeapon/)
## Declaration
```python
async def drawWeapon(id : int, weaponMode : int)
```
## Parameters
`int` **id**: the player id.
`int` **weaponMode**: the preffered weapon mode. For more information see [Weapon mode constants](../../constants/weapon-mode.md).
"""
data = f'return {get_call_repr()}'
server = await PythonWebsocketServer.get_server()
result = await server.make_request(data)
return result
|