[QUESTION]
is remove scoped overlay supposed to be like this?
I tried to do some stuff and my result was what i needed except for the no scope lines staying on every time.
Tried even more modding then i again got what i need to be but this time the old issue was fixed and the new issue was the console and crosshair and net_graph doesn't work.
Try disabling blur.
No blur doesn't do anything for me though
this is what i get(not zoomed in)
and this when zoomed in
1more thing
this is how the console looks
enable this
Then that's probably post-processing. Try disabling it.
Thanks for suggesting that but nah i wanted to disable the lines when not scoped. In other words no scope lines like all other cheats that just removes the black part.
Since i can't actually code but do stuff to some extent by looking at the examples. I got no clue how to do that, i had a vague idea/algorithm but that didn't work.
Ok, you should check "m_bIsScoped" netvar like in https://github.com/danielkrupinski/Osiris/blob/master/Osiris/Hacks/Chams.h#L25
Didn't work : ( I insta crashed the code i used are:
if (!config.visuals.noScopeOverlay || interfaces.panel->getName(panel) != "HudZoom")
{
hooks.panel.callOriginal<void, unsigned int, bool, bool>(41, panel, forceRepaint, allowForce);
}
const auto localPlayer = interfaces.entityList->getEntity(interfaces.engine->getLocalPlayer());
if (localPlayer->isAlive())
{
if (localPlayer->getProperty<bool>("m_bIsScoped"))
{
const auto[screen_x, screen_y] = interfaces.surface->getScreenSize();
auto[center_x, center_y] = interfaces.surface->getScreenSize();
center_x /= 2; center_y /= 2;
interfaces.surface->drawLine(0, center_y, screen_x, center_y);
interfaces.surface->drawLine(center_x, 0, center_x, screen_y);
}
}
Check if is in game interfaces.engine->isInGame().
Thanks, it's working like a charm now. 1 more thing can i get an example of localPlayer->getInaccuracy(); to get inaccuracy of the current weapon
const auto activeWeapon = interfaces.entityList->getEntityFromHandle(localPlayer->getProperty<int>("m_hActiveWeapon"));
if (activeWeapon) {
float inaccuracy = activeWeapon->getInaccuracy();
}