Radar Gun

You Know what police use to find the speed of a car? I was wondering if anyone can code something of that matter. :smiley: Thanks

That would be kinda cool.


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

Is a start

Cool Thank You Very much.