Players dying from 1 punch or half hp?

Hey all, not really sure what information to provide here just trying to get an idea of what I can look for in regards to why this may be happening. When a player hits about half hp (110-100) or so they just die. It’s not 100% of the time because myself and another didn’t but it is a very large portion of the time and i’m not really sure what could be causing it. Is there a certain function or native I can look for to assist with providing more information for this?

There also seems to be an issue with damage registering… some punches do 0 and then the next will just kill, or 2 will do no damage then third you’re half hp

Still having a weird issue with dying super easily - had a friend stand there and let me punch him, another friend heal him, punch, heal, punch, heal and randomly he’d just die from 100% hp. Tried turning off all scripts except the bare essentials for ESX like base, extended, async etc and still doing it… any ideas?

Updated to newest version of fivem, essential and all ESX structured files, cleared cache and still happening

turned down bat damage to basically 0

local MeeleWeapons = {
    ["WEAPON_NIGHTSTICK"] = 0.1,
    ["WEAPON_BAT"] = 0.000001
}

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(5)

		for weapon, modifier in pairs(MeeleWeapons) do
			if GetSelectedPedWeapon(PlayerPedId()) == GetHashKey(weapon) then
				SetPlayerMeleeWeaponDamageModifier(PlayerId(), v)
			end
		end
    end
end)

Still instantly killed after hitting for like 40 times, just randomly kills

https://plays.tv/video/5cefab883cc629a5a3/damage-turned-down-still-has-that-insta-kill-power-

Example video 2:

https://plays.tv/video/5cefaf89ddf2cf8a5e/-okay-

They’re also all showing up in logs as “suicides” not kills

1 Like

Any help the community can offer on this would be much appreciated. We are running out of ideas. Any thoughts as simple or out of the blue they may seem are welcome! Thanks for the input!

You are likely getting a critical hit which happens when a ped gets hit in the head. The player critical multiplier is 18 for most weapons and SetPlayerMeleeWeaponDamageModifier cannot go below 0.1 which means a melee attack for 67 damage will still end up as a 120 damage critical hit.

You can modify the critical multiplier for each weapon in the weapons.meta. The field is called HeadShotDamageModifierPlayer. Note that 1 is added to the modifier before being multiplied with the damage. That means you need to set it to 0 to disable. There is also the native SET_PED_SUFFERS_CRITICAL_HITS which seems to work.

Can this be adjusted for unarmed (fists) as well? or is this only directly for weapons

Yes unarmed is in the weapons.meta file.

Where can we find this weapon.meta file??

You can find it by searching. There are plenty of guides on modify weapons.meta.

1 Like

I looked alot, couldnt find how to edit weapons damage :confused:

local prev_health = GetEntityHealth(entity)

Citizen.CreateThread(function()
    while true do
		cur_health = GetEntityHealth(entity)
		if prev_health-cur_health > 10 then
			--OMFG it's crit damage
			SetEntityHealth(entity, prev_health)
		end
		prev_health = cur_health
		Wait(1)
    end
end)

Alternate variant, it’s might not work, I dont check it, but i hope you understood the idea.
But you must check what kind weapon using to make damage, this script make pistols, rifles, etc. not effective. lol

Sorry for my Eng