- Sponsored Advertisement -
Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Direct3D hacking programming reversing
You are Unregistered, please register to gain Full access.
Wolrd To Screen Issue
08-06-2010, 12:47 AM
#1 n00bie Join Date: Aug 2010
Posts: 7
Reputation: 10 Rep Power: 19
Wolrd To Screen Issue
hi all i hope some1 can help me
here my wts for warrock
Code:
D3DVIEWPORT9 gViewport = {0};
D3DXMATRIX oProjection, pViewInfo, world, oIdentity,oView;
bool WorldToScreen(LPDIRECT3DDEVICE9 pDevice,D3DVECTOR Player, D3DVECTOR &PlayerScaled)
{
if(!pDevice)
return NULL;
D3DXVECTOR3 vScreenCoord;
D3DDISPLAYMODE pViewInfo;
D3DXVECTOR3 vWorldLocation(Player.x,Player.y,Player.z);
pDevice->GetTransform(D3DTS_VIEW,&oView);
pDevice->GetTransform(D3DTS_PROJECTION,&oProjection);
pDevice->GetTransform(D3DTS_WORLD,&world);
pDevice->GetViewport(&gViewport);
pDevice->GetDisplayMode(NULL,&pViewInfo);
gViewport.X = 0;
gViewport.Y = 0;
gViewport.Height = GetSystemMetrics(SM_CYSCREEN);
gViewport.Width = GetSystemMetrics(SM_CXSCREEN);
gViewport.MinZ = 0;
gViewport.MaxZ = 1;
D3DXMatrixIdentity( &oIdentity );
D3DXVec3Project(&vScreenCoord, &vWorldLocation, &gViewport, &oProjection, &oView, &oIdentity);
if(vScreenCoord.z < 1)
{
PlayerScaled.x = vScreenCoord.x;
PlayerScaled.y = vScreenCoord.y;
return true;
}
return false;
} but it seems to not work propely because if i turn on esp it show only 1 name but if i go closer to other player it show
NoNamez is offline
08-06-2010, 03:22 AM
#2 Level 3
Join Date: May 2005
Posts: 1,103
Reputation: 38964 Rep Power: 494
Quote:
Originally Posted by
NoNamez hi all i hope some1 can help me
here my wts for warrock
Code:
D3DVIEWPORT9 gViewport = {0};
D3DXMATRIX oProjection, pViewInfo, world, oIdentity,oView;
bool WorldToScreen(LPDIRECT3DDEVICE9 pDevice,D3DVECTOR Player, D3DVECTOR &PlayerScaled)
{
if(!pDevice)
return NULL;
D3DXVECTOR3 vScreenCoord;
D3DDISPLAYMODE pViewInfo;
D3DXVECTOR3 vWorldLocation(Player.x,Player.y,Player.z);
pDevice->GetTransform(D3DTS_VIEW,&oView);
pDevice->GetTransform(D3DTS_PROJECTION,&oProjection);
pDevice->GetTransform(D3DTS_WORLD,&world);
pDevice->GetViewport(&gViewport);
pDevice->GetDisplayMode(NULL,&pViewInfo);
gViewport.X = 0;
gViewport.Y = 0;
gViewport.Height = GetSystemMetrics(SM_CYSCREEN);
gViewport.Width = GetSystemMetrics(SM_CXSCREEN);
gViewport.MinZ = 0;
gViewport.MaxZ = 1;
D3DXMatrixIdentity( &oIdentity );
D3DXVec3Project(&vScreenCoord, &vWorldLocation, &gViewport, &oProjection, &oView, &oIdentity);
if(vScreenCoord.z < 1)
{
PlayerScaled.x = vScreenCoord.x;
PlayerScaled.y = vScreenCoord.y;
return true;
}
return false;
} but it seems to not work propely because if i turn on esp it show only 1 name but if i go closer to other player it show
log your projection matrix and check/play with gViewport.MaxZ = 1;
also why D3DXMatrixIdentity( &oIdentity ); ? why not just use the world matrix since your calling for it. I know you dont need it but meh dont call for it :/
Last edited by fatboy88; 08-06-2010 at 03:35 AM .
fatboy88 is online now
08-06-2010, 11:32 AM
#3 Join Date: Jul 2009
Posts: 1,068
Reputation: 49844 Rep Power: 551
It may also depend on which xyz vector you call from the struct.
__________________
Shad0w_'s Alter Ego
disavow is online now
08-06-2010, 03:01 PM
#4 s0beit's bitch
Join Date: Dec 2007
Posts: 343
Reputation: 15059 Rep Power: 207
as i know warrock blocks all pDevice->Get calls .. ( on win xp )
hook settransform and grab all needed data...
also you use
pDevice->GetTransform(D3DTS_WORLD,&world);
but dont even use "world" since you use D3DXMatrixIdentity ...
and why you get viewport if you fill it right after with your own values? you could just leave the getviewport call out...
pDevice->GetViewport(&gViewport);
Last edited by NeoIII; 08-06-2010 at 03:11 PM .
NeoIII is online now
08-06-2010, 03:30 PM
#5 Level 3
Join Date: May 2005
Posts: 1,103
Reputation: 38964 Rep Power: 494
Quote:
Originally Posted by
NeoIII as i know warrock blocks all pDevice->Get calls .. ( on win xp )
hook settransform and grab all needed data...
also you use
pDevice->GetTransform(D3DTS_WORLD,&world);
but dont even use "world" since you use D3DXMatrixIdentity ...
and why you get viewport if you fill it right after with your own values? you could just leave the getviewport call out...
pDevice->GetViewport(&gViewport);
if the calls are blocked then why did one name draw 0_o
also if they are blocked you can unblock them
D3DCREATE (Windows)
D3DCREATE_PUREDEVICE
fatboy88 is online now
08-06-2010, 03:42 PM
#6 n00bie
Threadstarter Join Date: Aug 2010
Posts: 7
Reputation: 10 Rep Power: 19
im hooking set transform as you said same effect
NoNamez is offline
08-06-2010, 04:17 PM
#7 Level 3
Join Date: May 2005
Posts: 1,103
Reputation: 38964 Rep Power: 494
Quote:
Originally Posted by
NoNamez im hooking set transform as you said same effect
then try playing w/ maxz or use the diff coords like he said above ;D
reason im saying maxz is cuz it part of the depth calculation in vec3project..though im not sure if it play a huge part since you can w2s w/o it(try diff coords first)
fatboy88 is online now
08-06-2010, 04:27 PM
#8 Retired Admin Join Date: Sep 2006
Posts: 5,249
Reputation: 93628 Rep Power: 1106
if you do not play fullscreen, you need another way of obtaining the game's screen size
learn_more is offline
08-06-2010, 04:41 PM
#9 n00bie
Threadstarter Join Date: Aug 2010
Posts: 7
Reputation: 10 Rep Power: 19
wr is full screen
NoNamez is offline
08-07-2010, 10:53 AM
#10 s0beit's bitch
Join Date: Dec 2007
Posts: 343
Reputation: 15059 Rep Power: 207
maybe the w2s is correct and there is something wrong in your player loop?
did you added a distance check
NeoIII is online now
08-07-2010, 08:59 PM
#11 n00bie
Threadstarter Join Date: Aug 2010
Posts: 7
Reputation: 10 Rep Power: 19
no there isnt any dist check XD and i think my playerloop is right o.o
Quote:
if(CH_NameEsp)
{
for(int i = 0; i < 32; i++)
{
if(!g_pBase->player || !g_pBase->local) break;
CPlayerInfo *pInfo = (CPlayerInfo*) (Addr_Basepointer+ (i*Ofs_PlayerSize));
CPlayer* pPlayer = g_pBase->player[i];
DWORD Color;
D3DVECTOR Player;
D3DVECTOR PlayerScaled;
DWORD Userbase = *(DWORD *)Addr_Userbase;
DWORD _Userbase = *(DWORD *)(Userbase + (i * 4));
Player.z = *(FLOAT *)(_Userbase + Z_OffSet);
Player.y = 20.0f + *(FLOAT *)(_Userbase + Y_OffSet);
Player.x = *(FLOAT *)(_Userbase + X_OffSet);
if(pInfo && pPlayer)
{
CPlayerInfo *pLocalInfo = (CPlayerInfo*)(Addr_Basepointer+ (g_pBase->local->index*Ofs_PlayerSize));
if(CH_NameEsp)
{
if(WorldToScreen(pDevice, Player, PlayerScaled)==true)
{
if(pLocalInfo->team != pInfo->team)
Color = RED;
else
Color = CYAN;
if(CH_EnemyOnly == 1 && pInfo->health > 0)
{
if(CH_NameEsp)DrawText(pInfo->name,(float)PlayerScaled.x,(float)PlayerScaled.y,Color,g_pFont);
}
if(CH_EnemyOnly == 2 && pInfo->health > 0 && pInfo->team != pLocalInfo->team)
{
if(CH_NameEsp)DrawText(pInfo->name,(float)PlayerScaled.x,(float)PlayerScaled.y,Color,g_pFont);
}
}
}
}
}
}
Last edited by NoNamez; 08-07-2010 at 09:03 PM .
NoNamez is offline
08-07-2010, 09:32 PM
#12 Donator
Join Date: May 2008
Location: Germany
Posts: 251
Reputation: 18729 Rep Power: 239
Points: 13,610, Level: 15
Last Achievements Quote:
Originally Posted by
NoNamez no there isnt any dist check XD and i think my playerloop is right o.o
why using
Code:
CPlayer* pPlayer = g_pBase->player[i]; if you don't use it? also sure the offsets you're using for x,y,z are correct? maby you have a mistake and you're passing the wrong coordinate, try playing with the x,y,z and also use tabs omg :P
ZeaS is online now
08-07-2010, 09:35 PM
#13 :3 1337 :3
Join Date: Nov 2008
Location: The Netherlands
Posts: 979
Reputation: 14563 Rep Power: 204
Points: 13,900, Level: 15
Last Achievements Also youre checking 4 times wether CH_NameEsp is enabled, kinda useless?-.-
__________________
hai
Wieter20 is offline
08-07-2010, 10:10 PM
#14 n00bie
Threadstarter Join Date: Aug 2010
Posts: 7
Reputation: 10 Rep Power: 19
ofs are right and wieter it dont affect the function xD
this is how it look :S
http://img696.imageshack.us/img696/4228/immagineis.png
Last edited by NoNamez; 08-07-2010 at 10:30 PM .
NoNamez is offline
08-08-2010, 12:11 AM
#15 s0beit's bitch
Join Date: Dec 2007
Posts: 343
Reputation: 15059 Rep Power: 207
i think the players that you see on your screen are not really in the air, try to change x y z
i mean use z as y or another change...
Player.z = *(FLOAT *)(_Userbase + Z_OffSet);
Player.y = 20.0f + *(FLOAT *)(_Userbase + Y_OffSet);
Player.x = *(FLOAT *)(_Userbase + X_OffSet);
just try it
NeoIII is online now
08-08-2010, 12:24 AM
#16 n00bie
Threadstarter Join Date: Aug 2010
Posts: 7
Reputation: 10 Rep Power: 19
neo if i change is same but strange player names arent drawed on all player but if i change my visual player names will move too
NoNamez is offline
08-08-2010, 12:32 AM
#17 Join Date: Jul 2009
Posts: 1,068
Reputation: 49844 Rep Power: 551
Log what kind of values your getting for the xyz and compare with your own xyz.
Also log xy after w2s, see if they are zero.
Maybe you will be able to track down the issue from there.
__________________
Shad0w_'s Alter Ego
disavow is online now
10-04-2010, 11:32 PM
#18 n00bie Join Date: Nov 2008
Posts: 15
Reputation: -3 Rep Power: 0
Last Achievements NoNamez possible a little error in code, becouse today i get a time for code the esp and worked normal.
Working in Windows 7 and Vista:
Edited:
Quote:
Originally Posted by
NeoIII as i know warrock blocks all pDevice->Get calls .. ( on win xp )
hook settransform and grab all needed data...
also you use
pDevice->GetTransform(D3DTS_WORLD,&world);
but dont even use "world" since you use D3DXMatrixIdentity ...
and why you get viewport if you fill it right after with your own values? you could just leave the getviewport call out...
pDevice->GetViewport(&gViewport);
Hi NeoIII, really blocks all pDevice->Get calls .. ( on win xp ), becouse worked only on Windows 7 and Windows Vista, now in Windows XP just getting a name as NoNamez said and when you moved the screen, getting some names on the up map.
Working wrong in Windows XP:
Last edited by WE11ington; 10-09-2010 at 05:52 AM .
WE11ington is offline
10-05-2010, 08:46 PM
#19 Join Date: Aug 2010
Location: Germany
Posts: 47
Reputation: -91 Rep Power: 0
How did you get the weapon?
My ESP only shows Knuckles or Knife o.O
M.Holder is offline
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 07:35 AM .