Tutorial GDI ESP Flicker - Fleep Antiflick = Unsolvable

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,073
78,998
2,371
Game Name
N/A
Anticheat
n/a
Tutorial Link
N/A
How long you been coding/hacking?
5 Years
Coding Language
N/A but real men use C++
Fleep made a video tutorial teaching how to make a GDI ESP for Counter Strike Source. If you have ever made a GDI ESP before, you will know that it flickers. In Fleep's video he uses a "antiflick" memory address and he checks it with an if statement, if it's false he does not draw the ESP. By doing so it's supposed to be stop the flickering.

But it's bullshit. In his video, it still flickers.

ANTIFLICK IS BULLSHIT

Don't waste your time looking for it. Antiflick does not exist, I spent 2 weeks trying to find it. We have no idea what he was doing. In the video, it is still flickering despite him using the antiflick address.

If you make a GDI ESP it will always flicker.

But Rake, what about Double Buffering?

This only works on C#


When you double buffer in C++ it works a bit better but it still flickers.

How to double buffer GDI in C++?

Wrap your drawing code with these functions:

C++:
void BeginDraw()
{
    hdcMem = CreateCompatibleDC(hdcL4D2);
    hbmMem = CreateCompatibleBitmap(hdcL4D2, screenWidth, screenHeight);

    hOld = SelectObject(hdcMem, hbmMem);
}

void EndDraw()
{
    BitBlt(hdc, 0, 0, screenWidth, screenHeight, hdcMem, 0, 0, SRCCOPY);
    SelectObject(hdcMem, hOld);
}
It will flicker about 30% less but still flickers.

Why is my GDI ESP Flickering ?
This is because of how GDI works, it's actually drawing on top of the game window. So it's not hooking the game draw function, using GDI is more like an overlay except it's drawing on the actual game window not above the window. But the game is putting frames on the screen at a different rate than your. For example lets say your game does 60 FPS, well your GDI ESP is drawing at 80 frames. In order to work perfectly without flicker, the game has to draw, and then GDI has to draw on top before the game draws the next frame.

This is impossible to sync. You cannot sync your draw immediately after the game draws but before the next draw. If you could, it would stop flickering.

How to find Antiflick / antiflicker ?
You can't

How to reduce flickering?
Use the most efficient code, the faster your code runs, the more times it will draw per second and hopefully draw on top of every frame. Avoid cleanup and initializing of new objects, just use the same objects and don't cleanup until exit.

Do not use Sleep to sleep the thread, just let the thread run and use lots of CPU to get the most draws per second

Use Double Buffering in C# instead, it actually works in C# for some reason.

I found this tutorial but it doesn't stop the flicker:
http://www.catch22.net/tuts/win32/flicker-free-drawing

If you do a GDI overlay instead of drawing GDI straight into the game window, it won't flicker, but this is an overlay and more complicated. You might as well do a Direct3D hook or overlay at that point.
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,073
78,998
2,371
idx[0];49764 said:
Hi,

Can someone please explain what the anti-flick offset exactly is (meaning) and what its assembly looks like?

Thanks.
been wondering this myself for ages, +100 rep for anyone that actually knows what it is :p
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
Rake;49768 said:
been wondering this myself for ages, +100 rep for anyone that actually knows what it is :p
Yo seriously lmao. Almost certain he just copied that from someone else's source and misunderstood it's original use, because i swear i have never heard of such a thing.
 

idx[0]

Jr.Coder
Full Member
Nobleman
Mar 24, 2016
55
523
1
Yo seriously lmao. Almost certain he just copied that from someone else's source and misunderstood it's original use, because i swear i have never heard of such a thing.
lol
No, I didn't copy it from any source. I'm just wondering what it is considering its popularity in CSS.
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
idx[0];49773 said:
lol
No, I didn't copy it from any source. I'm just wondering what it is considering its popularity in CSS.
No i didn't mean you, i meant fleep lol.
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
idx[0];49775 said:
Crap, soz mate.
I have written many an esp, and i have never needed an "anti-flick". You read the values, you convert them, you draw them, it works. Any flickering you experience will be from GDI.
 

idx[0]

Jr.Coder
Full Member
Nobleman
Mar 24, 2016
55
523
1
I have written many an esp, and i have never needed an "anti-flick". You read the values, you convert them, you draw them, it works. Any flickering you experience will be from GDI.
I'm still getting flickering though (Using DirectX; Tested in both C++ and Python) in a game that is very similar to CSS.
I'm presuming that you wrote an esp for CS:GO and you used the "client.dll" VM?
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
idx[0];49778 said:
I'm still getting flickering though (Using DirectX; Tested in both C++ and Python) in a game that is very similar to CSS.
I'm presuming that you wrote an esp for CS:GO and you used the "client.dll" VM?
Make sure that your data reading is synchronous with your drawing thread. If you are reading in one thread and drawing in another, it will cause flickering. Yes i have written esp's for CSGO, but idk what you mean by " 'client.dll' VM? "
 

idx[0]

Jr.Coder
Full Member
Nobleman
Mar 24, 2016
55
523
1
Make sure that your data reading is synchronous with your drawing thread. If you are reading in one thread and drawing in another, it will cause flickering. Yes i have written esp's for CSGO, but idk what you mean by " 'client.dll' VM? "
Thanks for the advise.

For the DirectX esp I used the WM_PAINT event as the drawing callback.
Rough WndProc:
C++:
 if (msg == WM_PAINT)
{
   d3d.begin();
   ReadMemory(...)....
   ... // draw
   d3d.end()
}
Now this wasn't going to be my final code but merely a test for the correct VM.
This demonstrates what happened.

As for the "client.dll" VM, let me rephrase:
Did you get the view matrix from "client.dll" or "engine.dll"?

Thanks.
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
idx[0];49780 said:
Thanks for the advise.

For the DirectX esp I used the WM_PAINT event as the drawing callback.
Rough WndProc:
C++:
 if (msg == WM_PAINT)
{
   d3d.begin();
   ReadMemory(...)....
   ... // draw
   d3d.end()
}
Now this wasn't going to be my final code but merely a test for the correct VM.
This demonstrates what happened.

As for the "client.dll" VM, let me rephrase:
Did you get the view matrix from "client.dll" or "engine.dll"?

Thanks.
For CS:GO I use the client module. Really not sure what is causing the flickering. Sorry man!
 

idx[0]

Jr.Coder
Full Member
Nobleman
Mar 24, 2016
55
523
1
No worries, thanks for the sync. threads info. though.
AFAIK, the "client.dll" has the flicker-free view matrix (Only in CS:GO) so unless you're using the "engine.dll" VM you don't require an anti-flick offset.

Would this asm opcode be the flicker-check:
C++:
 cmp 1, dword ptr [EAX +0xe8]
?

The full statement (decompiled) goes something like this:
C++:
if (value == 1)
    return stuff1; //LEA (Load effective address)
return stuff2; //LEA (Load effective address)
 

HexMurder

Arcane Hacker
Dank Tier VIP
Dank Tier Donator
Jun 7, 2012
319
7,988
22
idx[0];49783 said:
No worries, thanks for the sync. threads info. though.
AFAIK, the "client.dll" has the flicker-free view matrix (Only in CS:GO) so unless you're using the "engine.dll" VM you don't require an anti-flick offset.

Would this asm opcode be the flicker-check:
C++:
 cmp 1, dword ptr [EAX +0xe8]
?

The full statement (decompiled) goes something like this:
C++:
if (value == 1)
    return stuff1; //LEA (Load effective address)
return stuff2; //LEA (Load effective address)
The syncing thread thing is always true however. If you are drawing faster than the values are being read it can cause flickering. But if you are reading faster than drawing it should be fine. But if all else fails just make sure they are synchronous.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,073
78,998
2,371
To my knowledge, the antiflick address is some bool that reads true or false and by using it in a if statement you only draw once per frame or some shit like that
 

idx[0]

Jr.Coder
Full Member
Nobleman
Mar 24, 2016
55
523
1
Rake;49840 said:
To my knowledge, the antiflick address is some bool that reads true or false and by using it in a if statement you only draw once per frame or some shit like that
Hi,

I went through the "WorldToScreen" function and found this:

ASM:
C++:
cmp dword ptr ds:[ecx + 0xE8], 1
jle (address)
mov eax, dword ptr ds:[ecx + 0xE8]
mov eax, dword ptr ds:[ecx + 0xDC]
imul eax, eax, 0x18c
lea eax, dword ptr ds:[eax + ecx - 0x44]
ret
lea eax, dword ptr ds:[ecx + 0x9C] // Jump here
ret
Disassembly:
C++:
uint32_t WorldToScreen(ecx)
{
   ... // Useless code
   if (ecx->someCheck <= 1) // Video settings? This changes between 1, 2 and 3 but mostly remains 1
      return (uint32_t)ecx + 0x9c;
   return ecx->someCheck * 0x18c + ecx->CRender - 0x44;
}
Any relevance?

Thanks.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods