BodyParts (weaponDamage)

From alt:V / Wiki
Jump to navigation Jump to search

The BodyParts indicating where a player was hit. It can be used for multiple systems like a detailed medic system or a detailed death cam.

Overview

Name Index
Pelvis 0
LeftHip 1
LeftLeg 2
LeftFoot 3
RightHip 4
RightLeg 5
RightFoot 6
LowerTorso 7
UpperTorso 8
Chest 9
UnderNeck 10
LeftShoulder 11
LeftUpperArm 12
LeftElbrow 13
LeftWrist 14
RightShoulder 15
RightUpperArm 16
RightElbrow 17
RightWrist 18
Neck 19
Head 20

Useful Snippets

C#

public enum BodyPart {
    Pelvis = 0,
    LeftHip =1,
    LeftLeg = 2,
    LeftFoot = 3,
    RightHip = 4,
    RightLeg = 5,
    RightFoot = 6,
    LowerTorso = 7,
    UpperTorso = 8,
    Chest = 9,
    UnderNeck = 10,
    LeftShoulder = 11,
    LeftUpperArm = 12,
    LeftElbrow = 13,
    LeftWrist = 14,
    RightShoulder = 15,
    RightUpperArm = 16,
    RightElbrow = 17,
    RightWrist = 18,
    Neck = 19,
    Head = 20
}

JavaScript

const BodyPart = {
  Pelvis: 0,
  LeftHip: 1,
  LeftLeg: 2,
  LeftFoot: 3,
  RightHip: 4,
  RightLeg: 5,
  RightFoot: 6,
  LowerTorso: 7,
  UpperTorso: 8,
  Chest: 9,
  UnderNeck: 10,
  LeftShoulder: 11,
  LeftUpperArm: 12,
  LeftElbrow: 13,
  LeftWrist: 14,
  RightShoulder: 15,
  RightUpperArm: 16,
  RightElbrow: 17,
  RightWrist: 18,
  Neck: 19,
  Head: 20
};