Hi i just fixed circle strafe but it doesnt strafe(cstrafe)
idk why firstly i couldnt shoot+crouch+jump but thats fixed
Now it cant circle strafe.
Thanks.:sadwavey:
Code:
bool __fastcall CMiscHacks::CircleStrafer(Vector &angles, CUserCmd *pCmd) {
IClientEntity* LocalPlayer = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
if (Menu::Window.MiscTab.OtherStrafer.GetState()) {
static int add = 0;
if (Menu::Window.MiscTab.OtherMode.GetState()) {
if (angles.y - add > 360)
add -= 360;
static bool shouldspin = false;
static bool enabled = false;
if (GetAsyncKeyState((int)Key))
{
enabled = true;
}
else {
enabled = false;
}
if (enabled) {
shouldspin = true;
}
if (shouldspin) {
Vector Dir;
angleVectors(Vector(0, add, 0), Dir);
Dir *= 8218;
Ray_t ray;
CTraceWorldOnly filter;
trace_t trace;
IEngineTrace a;
IEngineTrace& TraceRay = a;
IEngineTrace* pfrytki;
ray.Init(LocalPlayer->GetEyePosition(), LocalPlayer->GetVecOrigin() + Dir);
a.TraceRay(ray, MASK_SHOT, &filter, &trace);
auto temp = 3.4f / ((trace.endpos - LocalPlayer->GetVecOrigin()).Length() / 100.f);
if (LocalPlayer->GetVecVelocity().Length2D() > 415) {
if (temp < 3.4f)
temp = 3.4f;
}
else if (LocalPlayer->GetVecVelocity().Length2D() > 200) {
if (temp < 6.8f)
temp = 6.8f;
}
else {
if (temp < 10.2f)
temp = 10.2f;
}
if (enabled) {
add += temp;
pCmd->sidemove = -450;
}
else {
if (angles.y - add < temp) {
add = angles.y;
shouldspin = false;
}
else
add += temp;
}
angles.y = add;
}
else {
add = angles.y;
return false;
}
}
else {
if (angles.y - add > 360)
add -= 360;
static bool shouldspin = false;
static bool enabled = false;
if (GetAsyncKeyState((int)Key)) {
enabled = true;
}
else {
enabled = false;
}
if (enabled) {
shouldspin = true;
}
if (shouldspin) {
Vector Dir;
angleVectors(Vector(0, add, 0), Dir);
Dir *= 8218;
Ray_t ray;
CTraceWorldOnly filter;
trace_t trace;
ray.Init(LocalPlayer->GetEyePosition(), LocalPlayer->GetVecOrigin() + Dir);
a.TraceRay(ray, MASK_SHOT, &filter, &trace);
auto temp = 3.4f / ((trace.endpos - LocalPlayer->GetVecOrigin()).Length() / 100.f);
if (temp < 3.4f)
temp = 3.4f;
if (enabled) {
add += temp;
pCmd->sidemove = -450;
}
else {
if (angles.y - add < temp) {
add = angles.y;
shouldspin = false;
}
else
add += temp;
}
angles.y = add;
}
else {
add = angles.y;
return false;
}
}
}
}