Need help please

Does anyone know why it takes so long to kill someone on my server, I mean it takes like 10 bullets to kill someone close range with an AR and long range is like 20 bullets all headshots btw.

Hello, yes there are many reasons, instead of explaining why it happens, I will just give you a quick solution. Firstly, create a damage modifier file, this is where you can edit the damage of specified weapons.

Secondly, I left you a “hitreg” to use, this will make it register that when a player is shot in the head, that if there not already dead, it will set there health to 0.

I have no one to help me test it, so any questions or issues, just let me know! I am more then happy to help :slight_smile: !

-------------------------------
-- Damage Modifier --
-------------------------------
local dmgModifiers = {
    ['WEAPON_APPISTOL'] = 1.2,
    ['WEAPON_PISTOL'] = 1.1,
    ['WEAPON_ASSAULTRIFLE'] = 1.5
}


CreateThread(function()
    while (true) do
        local wait = 25

        for k, v in pairs(dmgModifiers) do
            N_0x4757f00bc6323cfe(GetHashKey(k), v)
        end

        Wait(wait)
    end
end)

-------------------------------
-- Hit Registration --
-------------------------------

AddEventHandler('gameEventTriggered', function(name, args)
    if name ~= 'CEventNetworkEntityDamage' then return end -- If a player was not damaged, then return, we don't need it.

    local victim, ped = args[1], PlayerPedId()

    if ped == victim then
        local boneHit, whatBone = GetPedLastDamageBone(ped)

        if boneHit then
            if whatBone == 31086 then
                if not IsEntityDead(ped) then
                    SetEntityHealth(ped, 0)
                end	
            end
        end
    end
end)
1 Like

Alright so would I just put that into a client.lua and then make a fxmanifest?

Yes, that works. Although I recommend just creating a folder and call it something like “my-base”, and just make it where all kinds of random single things are loaded in there, so that way you can be more organized and less resources.

But as long as it’s in a client, it will work!

Alright nice I will give this a shot and If I have any issue I will come back to you, thank your very much man.

No problem :slight_smile:

Is there a way that you can make it so when you hit someone in the head it does more but when you hut someone in the body it does less because right now I have it to where it takes 2 bullets to kill someone in the head but it is the same when you hit them in the body.

Lower the damage modifier.

Yeah but if I do that then it will take like 4 shots to kill someone in the head and also 4 shots to kill someone in the body.

No, the hitreg should make it one shot to the head regardless of the dmg modifier.

Alright yeah that works.