Tele to Coordinate Function:
Code:
void TeleToCoord(float x , float y , float z )
{
*(float*)(Player+X_Axis) = x;
*(float*)(Player+Y_Axis) = y;
*(float*)(Player+Z_Axis) = z;
}
------------------------
Position Logger:
Code:
#include <windows.h>
#include <stdio.h>
#include "Log.h"
#define Playerpointer 0xC62388
#define X 0x000102D4
#define Y 0x000102DC
#define Z 0x000102D8
float fX_1;
float fY_1;
float fZ_1;
VOID LogPosition(VOID)
{
Writelog("//------------------------------------------//\n///Position Logger by BlacK_Data///\n//------------------------------------------//");
for(;;)
{
DWORD Player = *(DWORD*)Playerpointer;
if(GetAsyncKeyState(VK_NUMPAD0)&1)
{
fX_1 = *(float*)(Player+X);
fY_1 = *(float*)(Player+Y);
fZ_1 = *(float*)(Player+Z);
Writelog("X: %f\nY: %f\nZ: %f\n",fX_1,fY_1,fZ_1);
}
}
}
BOOL __stdcall DllMain( HMODULE hDll , DWORD Reason )
{
if(Reason==DLL_PROCESS_ATTACH)
{
logging(hDll);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)LogPosition, NULL, NULL, NULL);
}
return TRUE;
}
Log.cpp:
Code:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <stdio.h>
#pragma warning(disable:4996)
using namespace std;
ofstream ofile;
char dlldirectory[320];
char *GetDirectoryFile(char *filename)
{
static char path[320];
strcpy(path, dlldirectory);
strcat(path, filename);
return path;
}
void __cdecl Writelog(const char *fmt, ...)
{
if(ofile != NULL)
{
if(!fmt) { return; }
va_list va_alist;
char logbuf[256] = {0};
va_start (va_alist, fmt);
_vsnprintf (logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
va_end (va_alist);
ofile << logbuf << endl;
}}
void logging(HMODULE hDll){
DisableThreadLibraryCalls(hDll);
GetModuleFileName(hDll, dlldirectory, 512);
for(int i = strlen(dlldirectory); i > 0; i--) { if(dlldirectory[i] == '\\') { dlldirectory[i+1] = 0; break; } }
ofile.open(GetDirectoryFile("Positions.txt"), ios::app);
}
Log.h:
Code:
char *GetDirectoryFile(char *filename);
void __cdecl Writelog (const char * fmt, ...);
void logging(HMODULE hDll);