if ( ! PEDSELF ) { CVector vec ; PEDSELF -> GetMoveSpeed ( & vec ) ; float speed = vec . Length ( ) ; }