ShaunLWM/node-csgo-gsi

Player State

Closed this issue · 2 comments

Is there a way to check player health in this package?

if (typeof data["player"] !== "undefined") { this.emit("player", data["player"]); this.emit("playerHealth", data["player"]["state"]["health"]); this.emit("playerName", data["player"]["name"]); }

Just need to add this into index.js of your package

Instead of nitpicking every single information, you can just listen for the player event and act accordingly 😊