Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to get player's weapons with this library #15

Closed
Sebight opened this issue Oct 11, 2021 · 1 comment
Closed

Ability to get player's weapons with this library #15

Sebight opened this issue Oct 11, 2021 · 1 comment

Comments

@Sebight
Copy link

Sebight commented Oct 11, 2021

Hello, is there any way to get player's weapons, grenades, ... with this library?

Thank you.

@atiernan
Copy link
Contributor

Yep, heres an example output of a player:

{
  "name": "<EXAMPLE>",
  "observer_slot": 1,
  "team": "T",
  "state": {
    "health": 80,
    "armor": 90,
    "helmet": true,
    "flashed": 0,
    "burning": 0,
    "money": 4400,
    "round_kills": 1,
    "round_killhs": 0,
    "round_totaldmg": 100,
    "equip_value": 3550
  },
  "match_stats": {
    "kills": 15,
    "assists": 3,
    "deaths": 11,
    "mvps": 2,
    "score": 38
  },
  "weapons": {
    "weapon_0": {
      "name": "weapon_knife_t",
      "paintkit": "default",
      "type": "Knife",
      "state": "holstered"
    },
    "weapon_1": {
      "name": "weapon_p250",
      "paintkit": "am_urban",
      "type": "Pistol",
      "ammo_clip": 13,
      "ammo_clip_max": 13,
      "ammo_reserve": 26,
      "state": "holstered"
    },
    "weapon_2": {
      "name": "weapon_famas",
      "paintkit": "gs_famas_mecha",
      "type": "Rifle",
      "ammo_clip": 25,
      "ammo_clip_max": 25,
      "ammo_reserve": 90,
      "state": "holstered"
    },
    "weapon_3": {
      "name": "weapon_flashbang",
      "paintkit": "default",
      "type": "Grenade",
      "ammo_reserve": 1,
      "state": "active"
    }
  },
  "position": "-113.46, 1871.47, 1687.03",
  "forward": "-0.83, -0.55, -0.11"
}

@Sebight Sebight closed this as completed Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants