Новая ава блеять
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
1.
Делом заменяем везде client.dll на client_panorama.dll
2.
В Render.cpp заменяем BeginRender и EndRender на эти:
3.
Заменяем EmitSound 1 и 2 на эти:
4. Заменяем ваши virtual int EmitSound 1 и 2 на эти:
5.Заменяем ваши GetItemDefinitionIndex() и GetItemDefinitionIndex2() на:
6. В HOOK.CPP вставляем:
В HOOK.CPP Initialize():
7.Ищем:
И заменяем на:
Ниже void PlaySound(const char* pszSoundName) вставляем:
Делом заменяем везде client.dll на client_panorama.dll
2.
В Render.cpp заменяем BeginRender и EndRender на эти:
Код:
void CRender::BeginRender()
{
m_pDevice->CreateStateBlock(D3DSBT_ALL, &m_pStateBlockDraw);
m_pDevice->CreateStateBlock(D3DSBT_ALL, &m_pStateBlockText);
if (m_pStateBlockDraw)
m_pStateBlockDraw->Capture();
m_pDevice>GetRenderState(D3DRS_COLORWRITEENABLE,&dwOld_D3DRS_COLORWRITEENABLE);
m_pDevice->SetRenderState(D3DRS_COLORWRITEENABLE, 0xffffffff);
DWORD colorwrite, srgbwrite;
m_pDevice->GetRenderState(D3DRS_COLORWRITEENABLE, &colorwrite);
m_pDevice->GetRenderState(D3DRS_SRGBWRITEENABLE, &srgbwrite);
m_pDevice->SetRenderState(D3DRS_COLORWRITEENABLE, 0xffffffff);
m_pDevice->SetRenderState(D3DRS_SRGBWRITEENABLE, false);
//draw here
}
void CRender::EndRender()
{
m_pDevice->SetRenderState(D3DRS_COLORWRITEENABLE, dwOld_D3DRS_COLORWRITEENABLE);
DWORD colorwrite, srgbwrite;
m_pDevice->SetRenderState(D3DRS_COLORWRITEENABLE, colorwrite);
m_pDevice->SetRenderState(D3DRS_SRGBWRITEENABLE, srgbwrite);
if (m_pStateBlockDraw)
{
m_pStateBlockDraw->Apply();
m_pStateBlockDraw->Release();
}
if (m_pStateBlockText)
m_pStateBlockText->Release();
}
Заменяем EmitSound 1 и 2 на эти:
Код:
int WINAPI Hook_EmitSound1(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSoundEntry, unsigned int nSoundEntryHash, const char *pSample,
float flVolume, soundlevel_t iSoundlevel, int nSeed, int iFlags = 0, int iPitch = PITCH_NORM,
const Vector *pOrigin = NULL, const Vector *pDirection = NULL, CUtlVector< Vector >* pUtlVecOrigins = NULL, bool bUpdatePositions = true, float soundtime = 0.0f, int speakerentity = -1, int test = 0)
{
SoundTable.UnHook();
int ret = Interfaces::Sound()->EmitSound1(filter, iEntIndex, iChannel, pSoundEntry, nSoundEntryHash, pSample,
flVolume, iSoundlevel, nSeed, iFlags, iPitch,
pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity, test);
SoundTable.ReHook();
return ret;
}
int WINAPI Hook_EmitSound2(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSoundEntry, unsigned int nSoundEntryHash, const char *pSample,
float flVolume, float flAttenuation, int nSeed, int iFlags = 0, int iPitch = PITCH_NORM,
const Vector *pOrigin = NULL, const Vector *pDirection = NULL, CUtlVector< Vector >* pUtlVecOrigins = NULL, bool bUpdatePositions = true, float soundtime = 0.0f, int speakerentity = -1, int test = 0)
{
SoundTable.UnHook();
int ret = Interfaces::Sound()->EmitSound2(filter, iEntIndex, iChannel, pSoundEntry, nSoundEntryHash, pSample,
flVolume, flAttenuation, nSeed, iFlags, iPitch,
pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity, test);
SoundTable.ReHook();
return ret;
}
Код:
virtual int EmitSound1( IRecipientFilter& filter , int iEntIndex , int iChannel , const char *pSoundEntry , unsigned int nSoundEntryHash , const char *pSample ,
float flVolume , soundlevel_t iSoundlevel , int nSeed , int iFlags = 0 , int iPitch = PITCH_NORM ,
const Vector *pOrigin = NULL , const Vector *pDirection = NULL , CUtlVector< Vector >* pUtlVecOrigins = NULL , bool bUpdatePositions = true , float soundtime = 0.0f , int speakerentity = -1, int test = 0) = 0;
virtual int EmitSound2( IRecipientFilter& filter , int iEntIndex , int iChannel , const char *pSoundEntry , unsigned int nSoundEntryHash , const char *pSample ,
float flVolume , float flAttenuation , int nSeed , int iFlags = 0 , int iPitch = PITCH_NORM ,
const Vector *pOrigin = NULL , const Vector *pDirection = NULL , CUtlVector< Vector >* pUtlVecOrigins = NULL , bool bUpdatePositions = true , float soundtime = 0.0f , int speakerentity = -1, int test = 0) = 0;
Код:
short* CBaseAttributableItem::GetItemDefinitionIndex()
{
// DT_BaseAttributableItem -> m_AttributeManager -> m_Item -> m_iItemDefinitionIndex
return (short*)((DWORD)this + Offset::Entity::m_iItemDefinitionIndex);
}
short& CBaseAttributableItem::GetItemDefinitionIndex2()
{
return *(short*)((DWORD)this + Offset::Entity::m_iItemDefinitionIndex);
}
Код:
void WINAPI Hook_LockCursor()
{
SurfaceTable.UnHook();
Interfaces::Surface()->LockCursor();
SurfaceTable.ReHook();
if (bIsGuiVisible)
Interfaces::Surface()->UnlockCursor();
}
Код:
SurfaceTable.HookIndex(TABLE::ISurface::LockCursor, Hook_LockCursor);
Код:
enum
{
DrawSetColor1 = 14,
DrawSetColor2 = 15,
DrawFilledRect = 16,
DrawOutlinedRect = 18,
DrawLine = 19,
DrawSetTextFont = 23,
DrawSetTextColor = 24,
DrawSetTextPos = 26,
DrawPrintText = 28,
FontCreate = 71,
SetFontGlyphSet = 72,
GetTextSize = 79,
PlaySound = 82
};
Код:
enum
{
DrawSetColor1 = 14,
DrawSetColor2 = 15,
DrawFilledRect = 16,
DrawOutlinedRect = 18,
DrawLine = 19,
DrawSetTextFont = 23,
DrawSetTextColor = 24,
DrawSetTextPos = 26,
DrawPrintText = 28,
UnlockCursor = 66,
LockCursor = 67,
FontCreate = 71,
SetFontGlyphSet = 72,
GetTextSize = 79,
PlaySound = 82
};
Код:
void UnlockCursor()
{
typedef void(__thiscall* OriginalFn)(void*);
GetMethod< OriginalFn >(this, TABLE::ISurface::UnlockCursor)(this);
}
void LockCursor()
{
typedef void(__thiscall* OriginalFn)(void*);
GetMethod< OriginalFn >(this, TABLE::ISurface::LockCursor)(this);
}