Weapon Knockback

Hey, I’m starting to get into custom SWEPs a bit to make my server a little more unique. I’m looking to add some force to an AWP shot to have bodies fly back, it would create a really fun effect. I know that there is a SWEP command for bullet force, SWEP.Primary.Force, but it doesn’t seem to do anything, does the TTT weapon base not implement that field perhaps? How would I go about adding knockback, and is it possible to edit the TTT weapon base to see if it does anything with the Force field (how/where might I find it if it is possible?)

I’ve seen small amounts of knockback sometimes when people are shot with the AWP, but I’d like to increase it to a more dramatic amount.

Thanks in advance for any help you can give me

bullet.Force = 9001

Actually, from what I’ve learned recently, I think bullet.Force only applies to props, not players. I got mine working finally, I’ll post the code should anybody else want something similar. Small side note, tried the same thing with shotguns to no avail, might be an issue with multiple bullets perhaps?

either way, what I had to do in the end was use the newton launcher as a reference, I used the bullet.Callback to get the player that was shot and add a crapload of velocity for comical amounts of launch (Like from the long bookshelf on dolls to stuck up on the blinds above the bed on the opposite wall comical)


   local bullet = {}
   bullet.Num    = numbul
   bullet.Src    = self.Owner:GetShootPos()
   bullet.Dir    = self.Owner:GetAimVector()
   bullet.Spread = Vector( cone, cone, 0 )
   bullet.Tracer = 4
   bullet.TracerName = self.Tracer or "Tracer"
   bullet.Force  = 100
   bullet.Damage = dmg
   bullet.Callback = function(att, tr, dmginfo)
                        local ply = tr.Entity
                        if SERVER and IsValid(ply) and ply:IsPlayer() and (not ply:IsFrozen()) then
                           local pushvel = tr.Normal * 10000

                           --pushvel.z = math.max(pushvel.z, up)

                           ply:SetGroundEntity(nil)
                           ply:SetLocalVelocity(ply:GetVelocity() + pushvel)

                           ply.was_pushed = {att=owner, t=CurTime()}

                        end
                     end


   self.Owner:FireBullets( bullet )