All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
What the electronic games include, such as killing, gambling with virtual money, or theft, although it is not real and it is just acting, yet one should avoid playing with those games. This is because one would be imitating something which Allah has forbidden – even though it is just for entertainment – which leads to undermining such forbidden things and one becomes more daring to commit them.
Muslim jurists stated that it is forbidden to imitate immoral and dissolute people even if the origin of the act is permissible, as a way of preventing what is forbidden and preventing people from daring to commit it.
Allah knows best.