[Request] Show Location beside FPS and Ping

01/18/2020 10:07 matonskie23#1
i currently looking for this code . Thanks in advance
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
01/18/2020 11:35 ZeroTwo02#2
Search in source "FPS", oh... WndWorld ? that sound right... let's see !

Code:
	if( g_pPlayer && m_bRenderFPS )
	{
		TCHAR strFPS[32];
		_stprintf( strFPS, "%.02f FPS", g_Neuz.m_fFPS );
		p2DRender->TextOut( 5,  105 , strFPS, D3DCOLOR_ARGB( 255, 0, 255, 255 ) );				
	}
Amazing, that the code i was looking for !
So let's now add the position... How can i do hummmm...
OH ! I got a idea, we can use the /position !

Search "TextCmd_Position" because we know it's a command
Yikes, i found a result on functextcmd, so hard !

Code:
BOOL TextCmd_Position( CScanner& scanner )          
{ 
#ifdef __CLIENT
	CString string;
	D3DXVECTOR3 vPos = g_pPlayer->GetPos();
	string.Format( prj.GetText(TID_GAME_NOWPOSITION), vPos.x, vPos.y, vPos.z );
	g_WndMng.PutString( string, NULL, prj.GetTextColor( TID_GAME_NOWPOSITION ) );
#endif // __CLIENT
	return TRUE;
}
And now i just need to merge on the WndWorld !

Code:
	if( g_pPlayer && m_bRenderFPS )
	{
		//Fps
		TCHAR strFPS[32];
		_stprintf( strFPS, "%.02f FPS", g_Neuz.m_fFPS );
		p2DRender->TextOut( 5,  105 , strFPS, D3DCOLOR_ARGB( 255, 0, 255, 255 ) );

		//Position
		D3DXVECTOR3 vPos = g_pPlayer->GetPos();
		TCHAR strPOSI[64];
		_stprintf( strPOSI, "Position : x = %f, y = %f, z = %f", vPos.x, vPos.y, vPos.z );
		p2DRender->TextOut( 5,  115 , strPOSI, D3DCOLOR_ARGB( 255, 0, 255, 255 ) );				
	}
01/18/2020 21:45 matonskie23#3
Quote:
Originally Posted by ZeroTwo02 View Post
Search in source "FPS", oh... WndWorld ? that sound right... let's see !

Code:
	if( g_pPlayer && m_bRenderFPS )
	{
		TCHAR strFPS[32];
		_stprintf( strFPS, "%.02f FPS", g_Neuz.m_fFPS );
		p2DRender->TextOut( 5,  105 , strFPS, D3DCOLOR_ARGB( 255, 0, 255, 255 ) );				
	}
Amazing, that the code i was looking for !
So let's now add the position... How can i do hummmm...
OH ! I got a idea, we can use the /position !

Search "TextCmd_Position" because we know it's a command
Yikes, i found a result on functextcmd, so hard !

Code:
BOOL TextCmd_Position( CScanner& scanner )          
{ 
#ifdef __CLIENT
	CString string;
	D3DXVECTOR3 vPos = g_pPlayer->GetPos();
	string.Format( prj.GetText(TID_GAME_NOWPOSITION), vPos.x, vPos.y, vPos.z );
	g_WndMng.PutString( string, NULL, prj.GetTextColor( TID_GAME_NOWPOSITION ) );
#endif // __CLIENT
	return TRUE;
}
And now i just need to merge on the WndWorld !

Code:
	if( g_pPlayer && m_bRenderFPS )
	{
		//Fps
		TCHAR strFPS[32];
		_stprintf( strFPS, "%.02f FPS", g_Neuz.m_fFPS );
		p2DRender->TextOut( 5,  105 , strFPS, D3DCOLOR_ARGB( 255, 0, 255, 255 ) );

		//Position
		D3DXVECTOR3 vPos = g_pPlayer->GetPos();
		TCHAR strPOSI[64];
		_stprintf( strPOSI, "Position : x = %f, y = %f, z = %f", vPos.x, vPos.y, vPos.z );
		p2DRender->TextOut( 5,  115 , strPOSI, D3DCOLOR_ARGB( 255, 0, 255, 255 ) );				
	}
i forgot the image that showing what i need.
[Only registered and activated users can see links. Click Here To Register...]
01/18/2020 21:54 ZeroTwo02#4
Code:
	if( g_pPlayer && m_bRenderFPS )
	{
		//Fps
		TCHAR strFPS[32];
		_stprintf( strFPS, "%.02f FPS", g_Neuz.m_fFPS );
		p2DRender->TextOut( 5,  105 , strFPS, D3DCOLOR_ARGB( 255, 0, 255, 255 ) );

		//Position
		CWorld* pWorld = g_WorldMng.GetWorldStruct(g_pPlayer->GetWorld()->GetID());
		TCHAR strPOSI[64];
		_stprintf( strPOSI, You're at: %s", g_pPlayer->GetWorld()->m_szWorldName );
		p2DRender->TextOut( 5,  115 , strPOSI, D3DCOLOR_ARGB( 255, 0, 255, 255 ) );				
	}
01/18/2020 22:16 .S0ulSeller#5
Unbelievable! It's like your navigation in RL telling you
"You are here: Earth" - How cool is that?!
I'd open threads for that any time.