WARNING: THIS IS FROM AN OLDER VERSION OF THE GAME! CHECK THE BOTTOM FOR UPDATES ADDIES!!!
First thing you'll have to do is load up iw4mp.exe in ollydbg.
Next, find -> all referenced text strings.
Search for -> drawDamageFlash
Follow it by pressing enter or double clicking the line
As can be seen in the picture
MOV DWORD PTR DS:[7F0C60], EAX
was what we were looking for.
So, lets go to that addy
Now that we're at the location where this dvar is stored, we'll have to find references to it.
You'll end up with 3 refs.
First one is where we came from(MOV DWORD PTR DS:[7F0C60], EAX)
The second is where we'll want to go
The third is the location of the cvar(from where we found the referece).
So, right click the 2nd entry and click follow in disassembler.
In the function where we now arrived, the value of drawDamageFlash is compared to 0(off), if it is it makes a jump.
Now there's two things we could do.
1 is we change the JE(jump if equal) to JMP(always jump) to remove the flashbang effect
or 2, we pray that this function handles all flash related stuff(so stun grenades too) and return 0 at the top.
I chose for #2, so writeprocessmemory the following to the start of the function to disable flash and stun effects:
B8 00 00 00 00 C3 90
B8 00 00 00 00 is MOV EAX, 0
EAX is the register used for return values.
C3 = return
90 is a nop(no operation), since the original command was 7 bytes long.