Code by me , need help please.

Posts 1–4 of 4 · Page 1 of 1
Code by me , need help please.
bool DrawModelExecute ( ModelRenderInfo_t &pInfo )
{
C_BaseEntity *pBaseEntity;

if ( pInfo.entity_index > 0 && pInfo.entity_index <= g_pEngine->GetMaxClients() )
{
if ( g_pEntList->Ge***ientEntity ( pInfo.entity_index ) != NULL )
{
pBaseEntity = g_pEntList->Ge***ientEntity ( pInfo.entity_index )->GetBaseEntity();

if ( pBaseEntity == NULL )
return false;

g_iTeam = g_pGameResource->GetTeam ( pBaseEntity->entindex() ) ;

if ( g_iTeam == 2 ) // NRF
{
flColor[0] = 255;
flColor[1] = 255;
flColor[2] = 0;
flColor[3] = 255;
}
else if ( g_iTeam == 1 ) // EU
{
flColor[0] = 0;
flColor[1] = 0;
flColor[2] = 255;
flColor[3] = 255;
}

g_pRenderView->SetBlend ( 1.0f );
g_pRenderView->SetColorModulation ( flColor );

pChamsMaterial->SetMaterialVarFlag ( MATERIAL_VAR_IGNOREZ, true );
pChamsMaterial->SetMaterialVarFlag ( MATERIAL_VAR_ZNEARER, true );
pChamsMaterial->SetMaterialVarFlag ( MATERIAL_VAR_FLAT, true );

g_pModelRender->ForcedMaterialOverride ( pChamsMaterial );

g_pModelRenderHook->UnHook();

cout << "Arephalline's Pub Hook";
g_pModelRender->DrawModelEx ( pInfo );

if ( g_iTeam == 2 ) // NRF
{
flColor[0] = 255;
flColor[1] = 0;
flColor[2] = 0;
flColor[3] = 255;
}
else if ( g_iTeam == 1 ) // EU
{
flColor[0] = 0;
flColor[1] = 255;
flColor[2] = 0;
flColor[3] = 255;
}

g_pRenderView->SetBlend ( 1.0f );
g_pRenderView->SetColorModulation ( flColor );

pChamsMaterial->SetMaterialVarFlag ( MATERIAL_VAR_IGNOREZ, false );
pChamsMaterial->SetMaterialVarFlag ( MATERIAL_VAR_ZNEARER, false );
pChamsMaterial->SetMaterialVarFlag ( MATERIAL_VAR_FLAT, false );

g_pModelRender->DrawModelEx ( pInfo );

g_pModelRender->ForcedMaterialOverride ( pChamsMaterial );

g_pModelRenderHook->ReHook();

g_pModelRender->ForcedMaterialOverride ( NULL );

return true;
}
}

return false;
}
int __stdcall hook_DrawModelEx ( ModelRenderInfo_t &pInfo )
{
bool bRet;

__asm
{
PUSHAD
}

bRet = DrawModelExecute ( pInfo );

__asm
{
POPAD
}

if ( bRet == false )
return pDrawModelEx ( pInfo );
else
return 1;

return 0;
}


Ok , now i need help.
The thing is that the code i can do but i dont know how to bypass gameguard.
There's my source all you need to do is compile in a DLL.
Obs:Already try'd with Valk,x1injec,OMFGZ,Arcstemp.
¬¬ "The game has been closed by an unknown error" .
Any coder wanna help? Feel free to modify that code if something's wrong.
lol obvious
detouring is your friend
Even so. This isn't a coding section. go to C++ and post it. Not here.
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?