citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.47k stars 2.05k forks source link

entityDamaged baseDamaged is always zero and theres no way of really getting that value #2474

Open mcNuggets1 opened 4 months ago

mcNuggets1 commented 4 months ago

What happened?

entityDamaged (cl) is useful and all, but without a damage value it's not of much use to me. I'm writing a complete overhaul of gta's death system and need the event working with damage numbers. How would I achieve that?

Expected result

working dmg numbers please

Reproduction steps

AddEventHandler('entityDamaged', function(victim, attacker, weapon, damage) if victim == 0 or attacker == 0 then return end

print(victim, attacker, weapon, damage)

end)

Importancy

Slight inconvenience

Area(s)

FiveM, FXServer

Specific version(s)

FiveM

Additional information

No response

adom2020 commented 4 months ago

just do GetWeaponDamage(weapon) for now

mcNuggets1 commented 4 months ago

just do GetWeaponDamage(weapon) for now

That does account for modifiers, specific hit group, armor reduction and so on? I don't think so.

mcNuggets1 commented 3 months ago

Also the damage seems to have some randomising to it, thus it's impossible for me to get the correct weapon damage.