refactor: Refactorized whole project structure

This commit is contained in:
AURUMVORXX
2025-01-24 22:36:25 +03:00
parent d50f55086b
commit a479b5f85d
321 changed files with 288 additions and 219 deletions

View File

@@ -0,0 +1,22 @@
# `event` onPacket
This event is triggered when new packet arrives from the client.
Original: [onPacket](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/network/onPacket/)
## Parameters
* `dict` **kwargs**:
* `int` **playerid**: the id of the player who sent the packet.
* `Packet` **data**: data sended over network from client side.
## Usage
```python
import g2o
@g2o.event('onPacket')
def onPacketEvt(**kwargs):
data = kwargs['data']
message = data.readString()
print(f'Got packet from {kwargs['playerid']} (bytes used {data.bytesUsed})')
print(f'Packet says: {message}')
```