Police officers of the city may make arrests for violations of this Code, municipal ordinances, and state laws when such violations are committed in their presence or when they have obtained a valid arrest warrant from the judge of the municipal court or from some other proper authority. In exercising such power of arrest, all police officers shall see that all necessary warnings are given to the accused as required by law.