bullet pushing force addon

hey guys

i need a universal addon for gmod that can change the bullet force for any gun. the addon needs to have a basic menu as well if possible.

when you kill someone on gmod most of the time they just fall to the ground and that is very un realistic and so you see my problem. if there is somthing that i missed on gmod that aleady exists then please tell me. but im sure nothin on gmod is there since i have triend all the bullet time addons and physical bullets aswell. and they do not work.

ps (the addon MUST BE ABLE TO WORK WITH GDC SWEEPS aswell thanks.

Actually, just falling to the ground is the most realistic. Laws of physics and all that. But, if you want a more action-movie style, use the console command “phys_pushscale”

1 is the default, can set it up to five digits I believe, positive or negative.

You could also use the “EntityTakeDamage” hook.

local weapons = {
    --weapon_smg1 = 2,                            -- Add entries of weapons you want to be affected to this list.
    --weapon_pistol = 2,                          -- The number is the amount you want to multiply the bullet force with.
    --weapon_shotgun = 1.5                        -- Alternatively, set the below variable to the number you want to multiply the force with.
local allbullets = false

local function Multiply(ent, _, inflictor, _, _, dmginfo)
    if inflictor:IsWeapon() then
        if allbullets == false then
            if weapons[inflictor:GetClass()] ~= nil then
                dmginfo:SetDamageForce(dmginfo:GetDamageForce() * weapons[inflictor:GetClass()])
        elseif dmginfo:GetDamageType() == DMG_BULLET then
            dmginfo:SetDamageForce(dmginfo:GetDamageForce() * allbullets)
hook.Add("EntityTakeDamage", "MultiplyBulletForce", Multiply)

I haven’t tried the above myself, but it should work. If not, either I did something wrong or the GDC sweps are coded very strangely.

Oh, and if you’re using the list and want the effect to apply to NPCs, add the same weapons but with “ai_” in the beginning. NPCs don’t actually use the same weapons as players. Not sure how GDC solves this, might be that those weapons wer made to work for NPCs too.