0
0
Fork 0

Combine the JoinTeam event to the UpdatePlayer event

This commit is contained in:
Oliver-Akins 2020-12-23 12:37:31 -07:00
parent b1c161dcb3
commit 0971ffd150
2 changed files with 6 additions and 16 deletions

View file

@ -1,10 +1,14 @@
# `UpdatePlayer`:
## Description:
This event is sent from the server and is a result of a player joining/changing team, this event is also fired when a new player joins the game.
This event is sent as a result of a player joining/changing team, this event is also fired when a new player joins the game. The client sends the event to update what team/role they are on.
## Request Payload:
The client cannot send this event and only receives it.
| Property | Type | Description
| -------- | ---- | -----------
| name | String | The player's name
| team | Integer | The team to join. Accepted values are: `1`, and `2`, any other value will throw an error.
| role | String | The role the player is assuming. This can be `"writer"` or `"guesser"`, any other value will throw an error.
## Response Payload:
| Property | Type | Description