XBoom31 / ApocalyseCheatsSC

42 stars 31 forks source link

Better NoScope and NoSmoke #32

Closed eeioruewo0iruwe closed 7 years ago

eeioruewo0iruwe commented 7 years ago

For NoScope In Hooks under (void __fastcall PaintTraverse_Hooked)

IClientEntity *pLocal = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());

if (!strcmp(("HudZoom"), Interfaces::Panels->GetName(vguiPanel)) && Menu::Window.VisualsTab.OtherNoScope.GetState() > 0 && pLocal->IsScoped() && Interfaces::Engine->IsConnected() && Interfaces::Engine->IsInGame() && pLocal->IsAlive())
{
    return;
}

In Visual.cpp

add NoScopeBorder(); so that it looks like this in CVisuals:Draw

void CVisuals::Draw() { if (!Menu::Window.VisualsTab.OtherCrosshair.GetIndex()) Interfaces::Engine->ClientCmd_Unrestricted("crosshair 1");

// Crosshair
if (Menu::Window.VisualsTab.OtherCrosshair.GetIndex())
{
    Interfaces::Engine->ClientCmd_Unrestricted("crosshair 0");

    if (Menu::Window.VisualsTab.OtherCrosshair.GetIndex())
    {
        DrawCrosshair();
    }
    else
    {
        Interfaces::Engine->ClientCmd_Unrestricted("crosshair 1");
    }
}

// Recoil Crosshair
DrawRecoilCrosshair();

//No Scope Border
NoScopeBorder();

if (!hackManager.pLocal())
    return;

} replace NoScopeBorder with this:

void CVisuals::NoScopeBorder() { ConVar* matpostprocessing = Interfaces::CVar->FindVar("mat_postprocess_enable");

if (Menu::Window.VisualsTab.OtherNoScope.GetState())
{
    matpostprocessing->SetValue("0");
    if (hackManager.pLocal()->IsScoped() && hackManager.pLocal()->IsAlive())
    {
        int Width;
        int Height;
        Interfaces::Engine->GetScreenSize(Width, Height);

        Color cColor = Color(0, 0, 0, 255);
        Render::Line(Width / 2, 0, Width / 2, Height, cColor);
        Render::Line(0, Height / 2, Width, Height / 2, cColor);

    }
    else
    {

    }
}

}

===================================================================

For NoSmoke Go to Hooks

and above Hooked_FrameStageNotify put this

std::vector<const char*> smoke_materials = { "particle/vistasmokev1/vistasmokev1_smokegrenade", "particle/vistasmokev1/vistasmokev1_emods", "particle/vistasmokev1/vistasmokev1_emods_impactdust", "particle/vistasmokev1/vistasmokev1_fire", };

and under third person put this: if (curStage == FRAME_RENDER_START) { for (int i = 1; i <= Interfaces::Globals->maxClients; i++) { if (i == Interfaces::Engine->GetLocalPlayer()) continue;

        IClientEntity* pCurEntity = Interfaces::EntList->GetClientEntity(i);
        if (!pCurEntity) continue;

        *(int*)((uintptr_t)pCurEntity + 0xA30) = Interfaces::Globals->framecount; //we'll skip occlusion checks now
        *(int*)((uintptr_t)pCurEntity + 0xA28) = 0;//clear occlusion flags
    }
    for (auto matName : smoke_materials)
    {
        IMaterial* mat = Interfaces::MaterialSystem->FindMaterial(matName, "Other textures");
        mat->SetMaterialVarFlag(MATERIAL_VAR_NO_DRAW, Menu::Window.VisualsTab.OtherNoSmoke.GetState());
    }
}

Extra Help:

https://gyazo.com/1ccc4c65112cef4608a4b2fb4faa897b https://gyazo.com/555e22909b042056f3d8d058636b28ed https://gyazo.com/fcfb1a0b14b83afcf67c4cc23948b213 https://gyazo.com/b545f3b953f97beac1c9e0cf0c1e0e1b https://i.gyazo.com/d7adea43e9ba33ebf4cee391433acc10.png

XBoom31 commented 7 years ago

this is how the no scope is supposed to look? and no smoke is doing the same thing https://steamuserimages-a.akamaihd.net/ugc/861726381331289037/394F22B23DA2DB68338F98AE660B78A2ED5BC14E/

Dimitriblyater commented 7 years ago

It looks like this for me http://i.imgur.com/dgnW6Iv.png

eeioruewo0iruwe commented 7 years ago

https://i.gyazo.com/d7adea43e9ba33ebf4cee391433acc10.png

forgot to add this

NoScopeBorder();

eeioruewo0iruwe commented 7 years ago

Also the no smoke looks the same but ur not spoofing any console commands that way.

For the noscope, I goofed up and forgot to tell you to add NoScopeBorder(); under CVisuals:Draw...

eeioruewo0iruwe commented 7 years ago

Next time I try to help, I'm going to be more thorough and try pasting it to a diff source and see if it works before i post anything.

XBoom31 commented 7 years ago

looks nice, but a problem, you can't see your health and ammo

eeioruewo0iruwe commented 7 years ago

You should be able to... did you use what I put or did you use the cl_drawhud 0 stuff.

edit: or should i say you still have the other Noscope Function from before in hooks