This snippet returns how actor was damaged.
Author: @ajom
Some changes by: @Parazitas
Snippet
List of Damage types ID's
Author: @ajom
Some changes by: @Parazitas
Snippet
PHP:
:isActorDamaged
{
Use: IF 0AB1: @isActorDamaged 1 ActorHandle: $PLAYER_ACTOR _Returned: DamagedBy 0@
}
0A96: 31@ = actor 0@ struct
0A8E: 30@ = 31@ + 0x760 // DamageID Offset
0A8D: 29@ = read_memory 30@ size 4 virtual_protect 0
IF NOT 29@ == 255 // 255 = not Damaged
THEN
0085: 28@ = 29@ // (int)
0A8C: write_memory 30@ size 4 value 255 virtual_protect 0 // clear last damage
0485: return_true
0AB2: ret 1 28@
ELSE 059A: return_false
END
0AB2: ret 0
List of Damage types ID's
PHP:
(Slot0: No Weapon) (Slot2: Handguns)
0 – Fist 22 – Pistol
1 – Brass Knuckles 23 – Silenced Pistol
24 – Desert Eagle
(Slot1: Melee)
2 – Golf Club
3 – Nitestick (Slot3: Shotguns)
4 – Knife 25 – Shotgun
5 – Baseball Bat 26 – Sawn-Off Shotgun
6 – Shovel 27 – SPAS-12
7 – Pool Cue
15 – Cane
(Slot4: Sub-Machineguns)
28 – Micro Uzi
29 – MP5
32 – TEC-9
(Slot5: Machineguns) (Slot10: Gifts)
30 – AK47 14 – Flowers
31 – M4
(Slot9:Special1)
(Slot6: Rifles) 42 – Fire Extinguisher
33 – Country Rifle 43 – Camera
34 – Sniper Rifle
(Slot11:Special2)
(Slot7: Heavy Weapons) 44 – NV Goggles
35 – Rocket Launcher 45 – IR Goggles
36 – Heat Seaking RPG 46 – Parachute
37 – Flame Thrower
38 – Minigun (Slot12:Detonators)
40 – Detonator(for remote explosives)
(Slot8: Projectiles)
16 – Grenade
18 – Molotov Cocktail
39 – Remote Explosives
(No slot: Fired from hunter / hydra / missile launcher)
(This type is stored in the rocket pool as rocket type, but is the continuation of this list)
19 – Normal rockets
20 – Heatseeking rockets
58 – Flares