From an ethimologic point of view pre / viens means before you come. It is a friendly advise before you move.
For Avertir, think about the CARTON JAUNE ,JELLOW in the game of soccer; If you continue, you will have the CARTON ROUGE, RED. Avertir is much less friendly, it means you will get punished