ххахах незаметил что я написал, просто устал . короче говоря мне нужен код легит FOV c SilentAim или trigger bot на нажатие кнопки
Могу ток продатьххахах незаметил что я написал, просто устал . короче говоря мне нужен код легит FOV c SilentAim или trigger bot на нажатие кнопки
чел оно слито...Могу ток продать
bool perebor(cchar Name, cchar ClassName, IEntity * pExp, int& BoneId, Vec3 & vBonePos)
{
if (!pExp->GetCharacter(0)) return false;
ISkeletonPose* pSkeleton = pExp->GetCharacter(0)->GetISkeletonPose();
BoneId = pSkeleton->GetJointIdByName("Bip01 Head");
if (!BoneId) return false;
BonePos = pExp->GetBonePos(pSkeleton, BoneId);
return true;
}
void SilentAim
{
static int fov = 15;
if (perebor(Name, ClassName, Entity, PartId, Pos)) && (pRenderer->IsFov(Pos, fov))
{
pWeapon->SetFiringPos(Pos);
}
}
struct IRenderer {
public:
Vec3 GetViewCamera() { return *(Vec3*)((uintptr_t)this + 0x1740); }
float GetWidth() { return (float)p8call<int(__fastcall*)(PVOID)>(this, 0x330)(this); }
float GetHeight() { return (float)p8call<int(__fastcall*)(PVOID)>(this, 0x338)(this); }
bool ProjectToScreen(SWorldToScreen * pWorldToScreen) { return p8call<bool(__thiscall*)(PVOID, SWorldToScreen*)>(this, 0x380)(this, pWorldToScreen); }
bool WorldToScreen(Vec3 vPos, Vec3 & vOut) {
SWorldToScreen p_WorldToScreen;
p_WorldToScreen.toX = vPos.x;
p_WorldToScreen.toY = vPos.y;
p_WorldToScreen.toZ = vPos.z;
p_WorldToScreen.outX = &vOut.x;
p_WorldToScreen.outY = &vOut.y;
p_WorldToScreen.outZ = &vOut.z;
ProjectToScreen(&p_WorldToScreen);
vOut.x *= (GetWidth() * 0.01f);
vOut.y *= (GetHeight() * 0.01f);
vOut.z *= 1.0f;
return ((vOut.z < 1.0f) && (vOut.x > 0) && (vOut.x < GetWidth()) && (vOut.y > 0) && (vOut.y < GetHeight()));
}
float GetHypotenuse(Vec3 vPos) {
Vec3 p_Screen;
{
float PositionX = 0.f;
float PositionY = 0.f;
float ScreenCenterX = (GetWidth() / 2.0f);
float ScreenCenterY = (GetHeight() / 2.0f);
if (WorldToScreen(vPos, p_Screen) == false) return 9999.0f;
PositionX = p_Screen.x > ScreenCenterX ? p_Screen.x - ScreenCenterX : ScreenCenterX - p_Screen.x;
PositionY = p_Screen.y > ScreenCenterY ? p_Screen.y - ScreenCenterY : ScreenCenterY - p_Screen.y;
return _sqrt(PositionX * PositionX + PositionY * PositionY);
}
return 9999.0f;
}
bool IsFov(Vec3 v_Bone, float f_Fov) {
return GetHypotenuse(v_Bone) < f_Fov * 6;
}
};
если с рисовкой не через ImGui то не слитыйчел оно слито...
C++:bool perebor(cchar sName, cchar sClassName, IEntity * pExp, int& gBoneId, Vec3 & vBonePos) { if (!pExp->GetCharacter(0)) return false; ISkeletonPose* _pSkeleton = pExp->GetCharacter(0)->GetISkeletonPose(); gBoneId = _pSkeleton->GetJointIdByName("Bip01 Spine3"); if (!gBoneId) return false; vBonePos = pExp->Ge__tBonePos(_pSkeleton, gBoneId); return true; } static int fov = 15; if (perebor(Name, ClassName, Entity, PartId, Pos)) { if (pRenderer->IsFov(Pos, fov)) { pWeapon->SetFiringPos(Pos); } struct IRenderer { public: Vec3 GetViewCamera() { return *(Vec3*)((uintptr_t)this + 0x1740); } float GetWidth() { return (float)p8call<int(__fastcall*)(PVOID)>(this, 0x330)(this); } float GetHeight() { return (float)p8call<int(__fastcall*)(PVOID)>(this, 0x338)(this); } bool ProjectToScreen(SWorldToScreen * pWorldToScreen) { return p8call<bool(__thiscall*)(PVOID, SWorldToScreen*)>(this, 0x380)(this, pWorldToScreen); } bool WorldToScreen(Vec3 vPos, Vec3 & vOut) { SWorldToScreen p_WorldToScreen; p_WorldToScreen.toX = vPos.x; p_WorldToScreen.toY = vPos.y; p_WorldToScreen.toZ = vPos.z; p_WorldToScreen.outX = &vOut.x; p_WorldToScreen.outY = &vOut.y; p_WorldToScreen.outZ = &vOut.z; ProjectToScreen(&p_WorldToScreen); vOut.x *= (GetWidth() * 0.01f); vOut.y *= (GetHeight() * 0.01f); vOut.z *= 1.0f; return ((vOut.z < 1.0f) && (vOut.x > 0) && (vOut.x < GetWidth()) && (vOut.y > 0) && (vOut.y < GetHeight())); } float GetHypotenuse(Vec3 vPos) { Vec3 p_Screen; { float PositionX = 0.f; float PositionY = 0.f; float ScreenCenterX = (GetWidth() / 2.0f); float ScreenCenterY = (GetHeight() / 2.0f); if (WorldToScreen(vPos, p_Screen) == false) return 9999.0f; PositionX = p_Screen.x > ScreenCenterX ? p_Screen.x - ScreenCenterX : ScreenCenterX - p_Screen.x; PositionY = p_Screen.y > ScreenCenterY ? p_Screen.y - ScreenCenterY : ScreenCenterY - p_Screen.y; return _sqrt(PositionX * PositionX + PositionY * PositionY); } return 9999.0f; } bool p_IsFov(Vec3 v_Bone, float f_Fov) { return GetHypotenuse(v_Bone) < f_Fov * 6; } };
да круг можно через игровую рисовку нарисовать на изи, ещё проще чем имгуи юзатьесли с рисовкой не через ImGui то не слитый
Ну не у всех ума хватит что бы это сделатьда круг можно через игровую рисовку нарисовать на изи, ещё проще чем имгуи юзать
Мда, щас кину код тогда.Ну не у всех ума хватит что бы это сделать
void DrawCircle(float x, float y, float r, int cLine, float resolution)
{
float PointX = 0.f;
float PointY = 0.f;
for (int i = 0; i <= resolution; ++i)
{
float X = x + r * cos(2 * 3.14159265358979323846264 * i / resolution);
float Y = y - r * sin(2 * 3.14159265358979323846264 * i / resolution);
if (i > 0) DrawLine(X, Y, PointX, PointY, cLine);
PointX = X; PointY = Y;
}
}
void RenderFOV(){
static int FovSize = 15;
IRenderer* pRenderer = SSystemGlobalEnvironment::Singleton()->GetRenderer();
DrawCircle(pRenderer->GetWidth()/2, pRenderer->GetHeight() / 2, FovSize, Color(195, 220, 245, 240), 200);
}
у меня есть тебе предложения* поможешь мне а я заплачу 28*зарплата придет*переведу 700рМда, щас кину код тогда.
Рисуем круг по центру экрана xD Размер круга, должен совпадать со значением FOV в вашем фаст-аиме!
C++:void DrawCircle(float x, float y, float r, int cLine, float resolution) { float PointX = 0.f; float PointY = 0.f; for (int i = 0; i <= resolution; ++i) { float X = x + r * cos(2 * 3.14159265358979323846264 * i / resolution); float Y = y - r * sin(2 * 3.14159265358979323846264 * i / resolution); if (i > 0) DrawLine(X, Y, PointX, PointY, cLine); PointX = X; PointY = Y; } } void RenderFOV(){ static int FovSize = 15; IRenderer* pRenderer = SSystemGlobalEnvironment::Singleton()->GetRenderer(); DrawCircle(pRenderer->GetWidth()/2, pRenderer->GetHeight() / 2, FovSize, Color(195, 220, 245, 240), 200); }
поможешь ? lime_0x1c#3883 в долгу не останусьМда, щас кину код тогда.
Рисуем круг по центру экрана xD. Вставляете в ваш рендер после меню. Размер круга, должен совпадать со значением FOV в вашем фаст-аиме!
C++:void DrawCircle(float x, float y, float r, int cLine, float resolution) { float PointX = 0.f; float PointY = 0.f; for (int i = 0; i <= resolution; ++i) { float X = x + r * cos(2 * 3.14159265358979323846264 * i / resolution); float Y = y - r * sin(2 * 3.14159265358979323846264 * i / resolution); if (i > 0) DrawLine(X, Y, PointX, PointY, cLine); PointX = X; PointY = Y; } } void RenderFOV(){ static int FovSize = 15; IRenderer* pRenderer = SSystemGlobalEnvironment::Singleton()->GetRenderer(); DrawCircle(pRenderer->GetWidth()/2, pRenderer->GetHeight() / 2, FovSize, Color(195, 220, 245, 240), 200); }
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz