-
Автор темы
- #1
код:
(я знаю что лучше использовать другую библиотеку для памяти)
C++:
static void DrawGlow(int dwGlowObjectManager , int entityList,int m_iTeamNum, int dwLocalPlayerPawn , int dwGlowManager)
{
Swed swed = new Swed("cs2");
IntPtr client = swed.GetModuleBase("client.dll");
int m_iGlowIndex = 0x30;
IntPtr glowObjectManager = swed.ReadPointer(client, dwGlowObjectManager);
while(true)
{
Thread.Sleep(5);
int localplayer = swed.ReadInt(client, dwLocalPlayerPawn);
int TeamNum = swed.ReadInt(localplayer, m_iTeamNum);
for (int i = 0; i < 64; i++)
{
int EntityList = swed.ReadInt(client, entityList + i * 0x10);
int enemyteam = swed.ReadInt(entityList, m_iTeamNum);
if(EntityList != 0)
{
if (enemyteam != 0 && enemyteam != TeamNum)
{
int glowIndex = swed.ReadInt(EntityList, m_iGlowIndex);
DrawEntity(glowIndex, 255, 0, 0, dwGlowManager);
}
}
}
}
}
static void DrawEntity(int glowIndex,int red,int green,int blue,int dwGlowManager)
{
Swed swed = new Swed("cs2");
IntPtr client = swed.GetModuleBase("client.dll");
int GlowObject = swed.ReadInt(client, dwGlowManager);
swed.WriteFloat(GlowObject + (glowIndex * 0x38) + 4, red / 100f);
swed.WriteFloat(GlowObject + (glowIndex * 0x38) + 8, green / 100f);
swed.WriteFloat(GlowObject + (glowIndex * 0x38) + 12, blue / 100f);
swed.WriteFloat(GlowObject + (glowIndex * 0x38) + 0x10, 255 / 100f);
swed.WriteBool(GlowObject + (glowIndex * 0x38) + 0x24, true);
swed.WriteBool(GlowObject + (glowIndex * 0x38) + 0x25, false);
}