It will be very hard, if not impossible for you to buy a second hand car in Morocco. Firstly you are not resident in Morocco and you will have huge problems with the papers, especialy the ownership papers. Secondly, crossing boarders, especialy Mauritania will pose you big problems. I also doubt that you will get a good price, believe it or not cars in Morocoo are not cheap! Much better to buy an older vehcile (Peugeot,Toyota,Series Land Rover) in Europe and then drive it down and then sell it in Mauritania.