Options:
F1 - Inf.Health
F2 - Inf.Ammo
Notice:
First go into game then activate health cheat, First fire your gun then activate ammo cheat.
You will still die from certain stuff like big explosives or certain enemy units, So avoid damage as much as possible.