S0biet probleming with ATB

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
Hi guys I added ATB into sobiet now..
Whenever I toggle on the bars the s0b player names and hp is fucked up, look at those SS:
Before enable:
msiCPcJ.png

After enable:
ZWElsd8.jpg


If I toggle Bars off then it fixes, How should I fix this?
This is my Tw_Init and Tw_ToggleMaiNBar
Code:
void TwFuncs_Init(void *device, int __res[2])
{
TwInit(TW_DIRECT3D9, device); // DirectX 9 :)
TwWindowSize(__res[0], __res[1]);
iBar[0] = TwNewBar("Main");
TwDefine(" Main label='[#>- Project Fuego -<#]' color='0 183 255' alpha='128' size='450 450' valueswidth=fit resizable=true moveable=true");
TwAddButton(iBar[0], "show_cmds", btn_ShowCmds, NULL, " label='Show Commands' ");
}

void TwFuncs_ToggleMainBar() // I also have one more thing to ask, Whenever I minimize the bar how to make it come back? visible=true dosent work.. as far as I know it will only toggle it off and on.
{
set.bar_show ^= 1;
if(set.bar_show == 1) 
{
TwDefine(" Main visible=true");
toggleATBCursor (true);
}
else
toggleATBCursor (false);
}
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
I found something, I have added upto 4 bars right now and when I toggle em sometimes the buggy thing dosent appear but when I move the bars the buggy thing appears, If I press the s0b panic key (f12) and turn it off for the time being, the normal health bars and everything looks good but my s0biet is having problems...
I have just added this in my s0b d3d9 rendering function
I have not modified other functions except Initiating AntTweakBar and setting the bars(but they are harmless)
Code:
if ( isBeginRenderWIN ) // this is where my AntTweakBar rendering goes, : void renderHandler()
	{
		static int	game_inited;
		if ( set.bar_show )
		{
			if (!g_Scoreboard->iIsEnabled) 
			{
				TwDraw();
			}
		}

I have also tried to reinstall directX SDK, No help but I had a error on writing 2 files while installation they were something called like "Txblablabalbal".dll and one but with 64 at end (64bit version)
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
If you're using mod_sa add your TwDraw calls inside of renderHandler(), specifically between BeginRender/EndRender calls.
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
springfield said:
If you're using mod_sa add your TwDraw calls inside of renderHandler(), specifically between BeginRender/EndRender calls.
VU3WXtV.png

Thanks, +REP.
I fixed it.
Ok now let me tell what I exactly did..
After hearing springfield's saying between BeginRender and EndRender. I tried to find the middle but I couldnt know it so I moved my Draw Code after renderSAMP() and render nametag, It did fix but it only fixed the issue of player tags it didnt fix other d3d9 rendering issue so then I played a little bit I learned that if I put my code before the rendering the things rendered after the bar will f..k up so I decided to put it before EndRender and voila it worked! I've got no issues now Thank you very much springfield it was impossible without you
This is my end code:
Code:
	renderSAMP();	// sure why not
		renderPlayerTags();

		if ( cheat_state->_generic.teletext )
			RenderTeleportTexts();
		if ( cheat_state->debug_enabled )
			RenderDebug();
		if ( cheat_state->render_vehicle_tags )
			renderVehicleTags();
		if ( cheat_state->_generic.map )
			RenderMap();

		// render menu
		if ( cheat_state->_generic.menu )
			RenderMenu();

		if ( set.bar_show )
		{
			if (!g_Scoreboard->iIsEnabled) 
			{
				TwDraw();
			}
		}	

no_render: ;
		render->EndRender();
	}

	mapMenuTeleport();

	traceLastFunc( "it_wasnt_us()" );
}
 
Top