โš ๏ธCommon Issues

Damages doesn't register for player

Solution 1

Make sure your weapon is added into Config.Damages.weapons, otherwise it will not register any damages for player.

Use code below in ANY CLIENT SIDE FILE to get weapon hash when player got damage

AddEventHandler('gameEventTriggered', function(event, data)
    if event ~= 'CEventNetworkEntityDamage' then return end
    local victim, victimDied, weapon = data[1], data[4], data[7]
    if not IsPedAPlayer(victim) then return end
    if NetworkGetPlayerIndexFromPed(victim) ~= PlayerId() then return end
    print('Damage Weapon Hash', weapon)
end)

This code will print weapon hash in your F8 Console when u get damage, you can then add it into config.

Last updated