text to file:
Code:
ILE *fhandle = fopen("FILEDIRECTORY\\YOURFILE.txt", "w");
//Log some addies.
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
fprintf(fhandle, "D3D Device: %X\n", FindPattern((DWORD)GetModuleHandleA("d3d9.dll"), 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx"));
fprintf(fhandle, "Player Index: %X\n", FindPattern(CShell, 0x128000, (PBYTE)"\x8B\x41\x04\x85\xC0\x74\x18\x8B\x54\x24\x04\xEB\x03\x8D\x49\x00\x39\x50\x04\x74\x1A\x8B\x80", "xxxxxxxxxxxxxxxxxxxxxxx"));
fprintf(fhandle, "Super Bullets: %X\n", FindPattern(CShell, 0x128000, (PBYTE)"\x0F\x94\xC0\x5E", "xxxx"));
//or your own text
fprintf(fhandle, "TEXT TO BE PRINTED" );
fclose(fhandle);
//TerminateProcess(GetCurrentProcess(),0); closes CA,
Draw from file:
Global:
Code:
using namespace std;
Code:
void DrawFileText( LPDIRECT3DDEVICE9 pDevice, float x, float y, const char *FileName )
{
if ( !pDevice )
return;
char txt[255];
std::ifstream inFile(FileName);
while ( !inFile )
{
DrawPrint( x, y, Black, "ERROR!" );
}
inFile.getline( txt, 255 );
std::cout<<txt;
DrawPrint( x, y, Black, txt );
}
credits to dimensions for the draw from file