You're Welcome.Thx, i check that..
Does any one know how to get damage type for single / multiplayer.
When Player Actor gets damage from collision return 1 or from weapon return 2 etc...
CPed +0x760 = [dword] Weapon you were damaged with
CPed +0x764 = [dword] Pointer to the ped that damaged you
{$CLEO}
0000: damage detector by AJOM
WHILE TRUE
wait 0
0A96: 0@ = actor $PLAYER_ACTOR struct
0@ += 0x760 // Damaged By Weapon ID
0A8D: 1@ = read_memory 0@ size 4 virtual_protect false
0@ += 4 // Actor Struct of the Damage Dealer
0A8D: 2@ = read_memory 0@ size 4 virtual_protect false
if 1@ <> 255 // 255 = not Damaged
then
0AD1: show_formatted_text_highpriority "Damaged By~n~WeaponID: %d~n~Actor:%d" time 1000 1@ 2@
0A8C: write_memory 0@ size 4 value 0 virtual_protect 0 // 0 = null actor pointer, AKA no actor damager
0@ -= 4
0A8C: write_memory 0@ size 4 value 255 virtual_protect 0 // 255 = not Damaged
end
END
// Unique Weapon ID's:
// 37 - Any Fire Damage
// 49 - Vehicle Collision(when you get rammed by a vehicle)
// 50 - Helicopter Blades
// 51 - Vehicle Explosion
// 52 - Toxicated
// 53 - fall Collision, the damage dealer Actor is yourself($PLAYER_ACTOR)
According to this Documentary:
Code:CPed +0x760 = [dword] Weapon you were damaged with CPed +0x764 = [dword] Pointer to the ped that damaged you
Code:{$CLEO} 0000: damage detector by AJOM WHILE TRUE wait 0 0A96: 0@ = actor $PLAYER_ACTOR struct 0@ += 0x760 // Damaged By Weapon ID 0A8D: 1@ = read_memory 0@ size 4 virtual_protect false 0@ += 4 // Actor Struct of the Damage Dealer 0A8D: 2@ = read_memory 0@ size 4 virtual_protect false if 1@ <> 255 // 255 = not Damaged then 0AD1: show_formatted_text_highpriority "Damaged By~n~WeaponID: %d~n~Actor:%d" time 1000 1@ 2@ 0A8C: write_memory 0@ size 4 value 0 virtual_protect 0 // 0 = null actor pointer, AKA no actor damager 0@ -= 4 0A8C: write_memory 0@ size 4 value 255 virtual_protect 0 // 255 = not Damaged end END // Unique Weapon ID's: // 37 - Any Fire Damage // 49 - Vehicle Collision(when you get rammed by a vehicle) // 50 - Helicopter Blades // 51 - Vehicle Explosion // 52 - Toxicated // 53 - fall Collision, the damage dealer Actor is yourself($PLAYER_ACTOR)
That also works on other actors, incase you want to detect if a certain player/actor takes damage of a certain type.