naja das wäre auch mein Plan B gewesen :DQuote:
du schreibst da 20 drawtext funktionen hin und und jeder ne andere farbe + buchstabe?
aber gibt es denn nichts einfacheres :D
naja das wäre auch mein Plan B gewesen :DQuote:
du schreibst da 20 drawtext funktionen hin und und jeder ne andere farbe + buchstabe?
Schau dir an, was deine DrawText Funktion macht - und schreib dir eine eigene, modifizierte Version, die die Farbe bei Erhöhung des Pointers auf den Text verändert.Quote:
mhm stimmt auch wieder :D
wäre auch ne Möglichkeit^^
aber dann muss ich wieder die spirited Menu Zeugs einfügen :D
Quote:
void Aimbot(void)
{
if (g_pBase->local)
{
for(int i = 0; i < 32; i++)
{
int NearestPlayer = GetNearestPlayer();
CPlayerInfo *pInfo = GetPlayerInfoByIndex(i);
CPlayerInfo *pLocalInfo = GetPlayerInfoByIndex(g_pBase->local->index);
if (CH_Aimbot)
{
CH_NoRecoil = 1;
if (CH_AimKey == 1 )
{
if (g_pLocal)
{
g_pLocal->yaw = CalculateYaw(g_pBase->local, g_pBase->player[NearestPlayer]);
g_pLocal->pitch = CalculatePitch(g_pBase->local, g_pBase->player[NearestPlayer]);
}
if (CH_Telekill)
{
g_pBase->local->pos1 = g_pBase->player[NearestPlayer]->pos1;
g_pBase->local->pos3 = g_pBase->player[NearestPlayer]->pos3;
g_pBase->local->pos2 = g_pBase->player[NearestPlayer]->pos2;
}
}
if (CH_AimKey == 2 )
{
if (GetAsyncKeyState(VK_LBUTTON))
{
if (g_pLocal)
{
g_pLocal->yaw = CalculateYaw(g_pBase->local, g_pBase->player[NearestPlayer]);
g_pLocal->pitch = CalculatePitch(g_pBase->local, g_pBase->player[NearestPlayer]);
}
if (CH_Telekill)
{
g_pBase->local->pos1 = g_pBase->player[NearestPlayer]->pos1;
g_pBase->local->pos3 = g_pBase->player[NearestPlayer]->pos3;
g_pBase->local->pos2 = g_pBase->player[NearestPlayer]->pos2;
}
}
}
if (CH_AimKey == 3 )
{
if (GetAsyncKeyState(VK_RBUTTON))
{
if (g_pLocal)
{
g_pLocal->yaw = CalculateYaw(g_pBase->local, g_pBase->player[NearestPlayer]);
g_pLocal->pitch = CalculatePitch(g_pBase->local, g_pBase->player[NearestPlayer]);
}
if (CH_Telekill)
{
g_pBase->local->pos1 = g_pBase->player[NearestPlayer]->pos1;
g_pBase->local->pos3 = g_pBase->player[NearestPlayer]->pos3;
g_pBase->local->pos2 = g_pBase->player[NearestPlayer]->pos2;
}
}
}
int GetLocalPlayerIndex()
{
DWORD *dwServPtr = (DWORD*)ADR_ServerPointer;
return *(int*)((*dwServPtr) + 0x160EC);
}
#define STANDS 0x01
#define PRONES 0x02
#define MOVING 0x03
#define KNEES 0x04
#define RUNS 0x05
#define JUMPS 0x06
#define ROLLS 0x07
#define PI_SQUARED2 9.869604401f
#define PI_SQUARED3 9.8696044010893586188344909998762f
#define PI_SQUARED 3.14159265f
#define PI 3.14159265f
BYTE GetState(CPlayer* pPlayer)
{
BYTE status = pPlayer->state;
BYTE status2 = pPlayer->state2;
if(status == 0x47)
return STANDS;
if(status == 0x38 || status == 0x3b || status == 0x3b || status == 0x3e || status == 0x3c)
return PRONES;
if(status == 0x4b || status == 0x4a || status == 0x4c || status == 0x4d)
return MOVING;
if(status == 0x57 || status == 0x5d || status == 0x5c || status == 0x5e || status == 0x5f)
return KNEES;
if(status == 0x46)
return RUNS;
if(status == 0x54)
return JUMPS;
if(status == 0x25)
return ROLLS;
}
//D3D Methods
float PitchCorrection = 0.0f;
int GetNearestPlayer()
{
float Distance = 0.0f;
float minDistance = 10000000.0f;
int index;
int Local = GetLocalPlayerIndex();
for (int i = 0; i < 32; i++)
{
if (i != Local && GetPlayerInfoByIndex(i)->health > 0)
{
if (CH_Team)
{
if (GetPlayerInfoByIndex(Local)->team != GetPlayerInfoByIndex(i)->team)
{
Distance = GetDistanceA(g_pBase->local, g_pBase->player[i]);
if (Distance < minDistance)
{
minDistance = Distance;
index = i;
}
}
}
else
{
Distance = GetDistanceA(g_pBase->local, g_pBase->player[i]);
if (Distance < minDistance)
{
minDistance = Distance;
index = i;
}
}
}
}
return index;
}
float CalculateYaw(CPlayer* Local, CPlayer* Target)
{
float deltaX = Target->pos1 - Local->pos1;
float deltaY = Target->pos3 - Local->pos3;
float result;
//Calculate Yaw Aim in degrees
result = (float)((atan2(deltaY, deltaX) * 180 / PI) - 90);
return result;
}
float CalculatePitch(CPlayer* Local, CPlayer* Target)
{
float origZ = Target->pos2 /*- g_pLocal->pos2*/;
switch (GetState(Target))
{
case STANDS:
origZ += 26.5f;
PitchCorrection = 26.5f;
break;
case PRONES:
origZ += 0.0f;
PitchCorrection = 0.0f;
break;
case MOVING:
origZ += 27.5f;
PitchCorrection = 27.5f;
break;
case KNEES:
origZ += 19.1f;
PitchCorrection = 19.1f;
break;
case RUNS:
origZ += 26.3f;
PitchCorrection = 26.3f;
break;
case JUMPS:
origZ += 31.5f;
PitchCorrection = 31.5f;
break;
case ROLLS:
origZ += 18.1f;
PitchCorrection = 18.1f;
break;
default:
origZ += 26.5f;
PitchCorrection = 26.5f;
break;
}
bool valid = false;
float deltaX = Target->pos1 - g_pLocal->pos1;
float deltaY = Target->pos3 - g_pLocal->pos3;
float deltaZ = origZ - g_pLocal->pos2;
float result;
float hypotenuse = sqrt((deltaX * deltaX) + (deltaZ + deltaZ));
/*float hypotenuse = sqrt((deltaX * deltaX) + (deltaY * deltaY) + (deltaZ + deltaZ));*/
result = (asin(deltaZ / hypotenuse)) * 180 / PI;
result *= -1;
if (result > - 60 && result < 75)
{
valid = true;
return result;
}
return 0;
}
float CalculatePitch(CPlayer* Local, CPlayer* Target)
{
float origZ = Target->pos3 - Local->pos3;
switch (GetState(Target))
{
case STANDS:
origZ += 26.5f;
PitchCorrection = 26.5f;
break;
case PRONES:
origZ += 0.0f;
PitchCorrection = 0.0f;
break;
case MOVING:
origZ += 27.5f;
PitchCorrection = 27.5f;
break;
case KNEES:
origZ += 19.1f;
PitchCorrection = 19.1f;
break;
case RUNS:
origZ += 26.3f;
PitchCorrection = 26.3f;
break;
case JUMPS:
origZ += 31.5f;
PitchCorrection = 31.5f;
break;
case ROLLS:
origZ += 18.1f;
PitchCorrection = 18.1f;
break;
default:
origZ += 26.5f;
PitchCorrection = 26.5f;
break;
}
bool valid = false;
float deltaX = Target->pos1 - g_pLocal->pos1;
float deltaY = Target->pos2 - g_pLocal->pos2;
float deltaZ = origZ - g_pLocal->pos3;
float result;
float hypotenuse = sqrt((deltaX * deltaX) + (deltaY * deltaY) + (deltaZ + deltaZ));
result = (asin(deltaZ / hypotenuse)) * 180 / PI;
result *= -1;
if (result > - 60 && result < 75)
{
valid = true;
return result;
}
return 0;
}
bei beiden geht es einwandfrei systems32 base wurde geklaut und unknownpk hat dann diese aimbot source geposted jedenfals steht da credits to upk deshalb ka und die wurde sowieso verändert so das die nicht geht alles da drin wurde verändertQuote:
@Angel eher die von System.UPK hat nen anderen Coding style und bei dem geht es dazu zu 99% ^^
#include "StdAfx.h"
#pragma once
class cPatch
{
private:
DWORD ADR;
BYTE OFF_BYTES[255];
BYTE ON_BYTES[255];
int SIZE;
enum PATCHSTATUS
{
NORMAL,
PATCHED,
};
int STATUS;
void* memcpy_s(void* pvAddress, const void* pvBuffer, size_t stLen);
public:
cPatch(DWORD pAdr,BYTE* pByte,int pSize);
void Patch();
void Restore();
};
#include "Patch.h"
void* cPatch::memcpy_s(void *pvAddress, const void *pvBuffer, size_t stLen)
{
MEMORY_BASIC_INFORMATION mbi;
VirtualQuery( ( void* )pvAddress, &mbi, sizeof( mbi ) );
VirtualProtect( mbi.BaseAddress, mbi.RegionSize, PAGE_EXECUTE_READWRITE, &mbi.Protect );
void* pvRetn = memcpy( ( void* )pvAddress, ( void* )pvBuffer, stLen );
VirtualProtect( mbi.BaseAddress, mbi.RegionSize, mbi.Protect, &mbi.Protect );
FlushInstructionCache( GetCurrentProcess( ), ( void* )pvAddress, stLen );
return pvRetn;
}
cPatch::cPatch(DWORD pAdr,BYTE* pByte,int pSize)
{
STATUS = NORMAL;
SIZE = pSize;
ADR = pAdr;
for(int i = 0; i < pSize; i++)
{
OFF_BYTES[i] = 0x00;
ON_BYTES[i] = pByte[i];
}
}
void cPatch::Patch()
{
if( STATUS==NORMAL )
{
BYTE *pOFF_BYTES = (BYTE*)ADR;
for( int i = 0; i < SIZE; i++ )
{
OFF_BYTES[i] = pOFF_BYTES[i];
}
memcpy_s((void*)ADR,(const void*)ON_BYTES,SIZE);
STATUS=PATCHED;
}
}
void cPatch::Restore()
{
if(STATUS==PATCHED)
{
memcpy_s((void*)ADR,(const void*)OFF_BYTES,SIZE);
STATUS=NORMAL;
}
}
#if !defined(AFX_STDAFX_H__93345D3A_0CF1_4A56_B453_22701C1CCB5A__INCLUDED_)
#define AFX_STDAFX_H__93345D3A_0CF1_4A56_B453_22701C1CCB5A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Insert your headers here
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <fstream>
#include "stdio.h"
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "D3DX9.LIB")
#pragma warning(disable:4996)
using namespace std;
// TODO: reference additional headers your program requires here
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__93345D3A_0CF1_4A56_B453_22701C1CCB5A__INCLUDED_)
#include Patch.h
//----------------------------------------------
#define RADARGPS 0x540C99//Updated
cPatch ASRadarGPS(RADARGPS,(PBYTE)"\xEB",1);//Off: x75 x15
if( AS_RadarGPS ) { ASRadarGPS.Patch(); } else { ASRadarGPS.Restore(); }
//----------------------------------------------
TradEmArk™ Büny Yazzn
wtf du stehst in den credits und weißt nicht mal wofür das istQuote:
Das ist eine ASM Funktion, durch den Patch wird es möglich gemacht das du es ohne Bypass benutzen kannst. Leider wurde diese Funktion von WarRock Gefixxt also Crasht es simpel oder?