PHP Code:
int iFlag = GetCommandFlags("r_screenoverlay") & (~FCVAR_CHEAT);
SetCommandFlags("r_screenoverlay", iFlag);
Isnt doing that unnecessary? At least for me it works without doing so (CS:GO).
Also i was wondering if its somehow possible to overlay an texture without it being streched (kinda like the scope of the AWP works).