SendDamageToEntity
From Nomad DB
Sends a damage event to the specified pawn.
Syntax
SendDamageToEntity(targetPawnId, sourceEntityId, damageType, damageAmount, damageLocation)
- targetPawnId (string): ID of the pawn to be damaged
- sourceEntityId (string): ID of the entity the damage should logically come from
- damageType (int): Type of damage to send
- damageAmount (float): Amount of damage to send
- damageLocation (int): Part of the body the pawn should be damaged at (see #Damage Locations)
Example
Causes the player to send himself bullet damage.
SendDamageToEntity(GetLocalPlayerEntityId(), GetLocalPlayerEntityId(), 3, 100, 512)
Parameters
Damage Types
ID | Type |
---|---|
3 | Bullet |
4 | Explosion |
5 | Cut |
7 | Burn |
16 | Instant Kill |
Damage Locations
ID | Location |
---|---|
1 | Torso |
2 | Pelvis |
4 | Shoulders |
8 | Left upper arm |
16 | Left forearm |
32 | Left hand |
64 | Right upper arm |
128 | Right forearm |
256 | Right hand |
512 | Head |
1024 | Left leg |
2048 | Left foot |
4096 | Right leg |
8192 | Right foot |