Can avast detect virus from game ?

I recently play lots of game like cod4 and san andreas multiplayer (MTA-SA) which every server need the player to download some files in order to play on the server, the downloading process begin when you joining the server. So far nothing happen but i am afraid later i am joining a server that maybe containing a virus or etc. Can avast detect that ? and will avast abort the download when something suspicious entering my computer ?

I am using Avast Free AV

Yes.It can.