I wondered that if your clothes smelled really bad and you would pray a salat would it make your salat invalid?
Please give a detailed answer with supporting evidence.
The things that invalidate salat are only a few and odour isn't among them. We are advised not to eat onions and/or garlic before entering a mosque, but this is due to the fact that we shouldn't harm others with the odour (See for example in Sahih al-Bukhari). But we can still pray at home alone so this doesn't invalidate the prayer.
What invalidates a prayer is assuming you have been in a tahir state is anything that might leave your body from either your front site (urine etc.) or your rear part (wind etc.) and a few other things which are basically not classified under cleanness/taharah like talking, looking left and right etc.
Of course we are asked to consider whom we confront or address while praying so we should try to appear in the best manner, but we also know that necessities may give us the chance to make an exception. So in best case we should pray wearing our cleanest clothes and being clean ourselves and having a good odour, but all this isn't actually necessary for a prayer to be valid.
The only things that we must do for a prayer to be valid is perform wudu' or if necessary ghusl prior to our prayer. Both are rituals that move us to a state of a ritual cleanness (taharah), but none of these are meant to make us smell good.
Else why would using used water be permissible? See for example Is it permissible to re-use the water that has been already used [by myself] for ablution?
Why is it nowhere mentioned to use soap for ghusl? This is a matter of good taste and respect to our Creator, but it is not necessary for the validity of our deed from a technical fiqh perspective.
Why do we need wipe over a leather sock while the nether part is the one that usually would get "dirty"... taharah doesn't necessarily mean cleanness and najassa doesn't necessarily mean dirtiness it is important to distinguish all these terms.
Your salah will be Valid.
O you people! You eat garlic and onion. I think the odour of these to be very offensive. I saw that if the Messenger of Allah (ﷺ) happened to find a man with such offensive odour in the mosque, he would order him to be taken out of the mosque and sent to Al-Baqi'. He who wants to eat any of these, should cook them till their odour dies out.
It's not good act to go to Masjid with bad odour, because it will disturb other people.
Do you think you will got to meat to a honored person like president with bad odour, if not then Allah is higher than everyone & everything.