Here the source for an extern dll ... (works! tested by me!)
Code:
#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void OPK(){
while (!IsGameReadyForHook()){
Sleep(20);
}
#define playerpointer 0x66F34
#define yoffset 0xCC
DWORD player, position;
float x,y,z;
while(true){
player=NULL;
player= (DWORD)GetModuleHandleA("ClientFX.fxd");
player+= playerpointer;
memcpy(&position,(void *)(player),4);
position+= yoffset;
if(GetAsyncKeyState(VK_F11)<0){ //saves
y = *(float*)position;
x = *(float*)(position+0x4);
z = *(float*)(position-0x4);
}
if(GetAsyncKeyState(VK_F12)<0){ //Teleports
*(float*)position= y;
*(float*)(position+0x4)= x;
*(float*)(position-0x4)= z;
}
}
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved){
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&OPK, NULL, 0,NULL);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}