Osiris icon indicating copy to clipboard operation
Osiris copied to clipboard

[QUESTION]

Open notaila opened this issue 7 years ago • 11 comments

is remove scoped overlay supposed to be like this? image 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.

notaila avatar May 05 '19 09:05 notaila

Try disabling blur.

danielkrupinski avatar May 05 '19 09:05 danielkrupinski

No blur doesn't do anything for me though image this is what i get(not zoomed in) image and this when zoomed in

notaila avatar May 05 '19 09:05 notaila

1more thing image this is how the console looks

notaila avatar May 05 '19 09:05 notaila

image enable this

mr-nv avatar May 05 '19 10:05 mr-nv

Then that's probably post-processing. Try disabling it.

danielkrupinski avatar May 05 '19 10:05 danielkrupinski

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.

notaila avatar May 05 '19 11:05 notaila

Ok, you should check "m_bIsScoped" netvar like in https://github.com/danielkrupinski/Osiris/blob/master/Osiris/Hacks/Chams.h#L25

danielkrupinski avatar May 05 '19 11:05 danielkrupinski

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);
		}
	}

notaila avatar May 05 '19 14:05 notaila

Check if is in game interfaces.engine->isInGame().

danielkrupinski avatar May 05 '19 14:05 danielkrupinski

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

notaila avatar May 05 '19 15:05 notaila

const auto activeWeapon = interfaces.entityList->getEntityFromHandle(localPlayer->getProperty<int>("m_hActiveWeapon"));

if (activeWeapon) {
    float inaccuracy = activeWeapon->getInaccuracy();
}

danielkrupinski avatar May 05 '19 17:05 danielkrupinski