• Radar Gun
    3 replies, posted
You Know what police use to find the speed of a car? I was wondering if anyone can code something of that matter. :D Thanks
That would be kinda cool.
[code]function SWEP:PrimaryAttack() if SERVER then return end local trace = self.Owner:GetEyeTrace() if( trace.HitNonWorld && trace.Entity:IsValid() ) then if ( trace.Entity:GetPhysicsObject():IsValid() ) then local phys = trace.Entity:GetPhysicsObject() local vel = phys:GetVelocity() LocalPlayer():ChatPrint(vel) end end end[/code] Is a start
[QUOTE=Retirsch;16507416][code]function SWEP:PrimaryAttack() if SERVER then return end local trace = self.Owner:GetEyeTrace() if( trace.HitNonWorld && trace.Entity:IsValid() ) then if ( trace.Entity:GetPhysicsObject():IsValid() ) then local phys = trace.Entity:GetPhysicsObject() local vel = phys:GetVelocity() LocalPlayer():ChatPrint(vel) end end end[/code] Is a start[/QUOTE] Cool Thank You Very much.
Sorry, you need to Log In to post a reply to this thread.