This is WAY beyond the scope of this forum. Most people here just want to use script menus and sell stolen keys.
I want to make a hack for dayz standalone where there is a line drawn from bottom of the screen to the object (loot)
So far i have got the shader constants for the object by dissambling the vertexshader, here is the output
Inside my DrawIndexPrimitive Hook
if(primCount == 474) //gprimCount)
{
//doDisassembleShader(pDevice,"ShovelShaderLog.txt") ;
WorldToScreen(pDevice);
pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
pDevice->SetPixelShader(RedShader);
}
// Registers:
//
// Name Reg Size
// ----------------------------------------------------- ----- ----
// FogModeA b0 1
// FogModeB b1 1
// ShadowReceiverFlag b4 1
// EnableAlignNormal b6 1
// ShadowReceiverSSSM b7 1
// VSC_PointLoopCount i0 1
// VSC_SpotLoopCount i1 1
// VSC_ViewMatrix c0 3
// VSC_ProjMatrix c3 4
// VSC_CameraPosition c7 1
// VSC_TexTransform c8 12
// VSC_InstanceColor c25 1
// VSC_SpecularPower_Alpha_FogEnd_RCPFogEndMinusFogSt art c31 1
// VSC_Free_ExpFog_AFogEnd_RCPAFogEndMinusAFogStart c34 1
// VSC_ShadowmapMatrix c35 3
// VSC_InstanceLandShadowIntensity c38 1
// VSC_LWSMatrix c43 3
// LPSData c214 20
//
So this is my function
void WorldToScreen(IDirect3DDevice9* Device)
{
D3DVIEWPORT9 Viewport;
Device->GetViewport(&Viewport);
Device->GetVertexShaderConstantF(0,ViewMatrix,3);//VSC_ViewMatrix
Device->GetVertexShaderConstantF(3,Projecti********,4);//VSC_ProjMatrix
D3DXMatrixIdentity(&WorldToLocal);
D3DXVec3Project(&Vector2D,
&Vector3D,
&Viewport,
&Projecti********,
&ViewMatrix,
&WorldToLocal);
if(Vector2D.z < 1.0f)
{
X = static_cast<int>(Vector2D.x);
Y = static_cast<int>(Vector2D.y);
}
}
But its not working at all,looking for help to solve this so X,Y point to the correct location on screen
The Screenshot is the effect i want
Last edited by Anddos; 05-08-2014 at 12:43 PM.
This is WAY beyond the scope of this forum. Most people here just want to use script menus and sell stolen keys.
I think my friend knows how