Начинающий
-
Автор темы
- #1
Всем хай! Я решил сделать Night Mode для кс, а он, п*длa такая, не работает! Помогите мне, люди добрые!
C#:
public static void NightMode()
{
int LocalPlayer = mem.Read<int>(client_dll + Offsets.dwLocalPlayer);
int ToneMapControllerIndex = mem.Read<int>(LocalPlayer + Offsets.m_hTonemapController) & 0xFFF;
for (int i = 0; i < 2048; i++)
{
int EntityList = mem.Read<int>(client_dll + Offsets.dwEntityList + i * 0x10);
if (EntityList != 0)
{
var ToneMapControllerHandle = mem.Read<int>(client_dll + Offsets.dwEntityList + ToneMapControllerIndex * 0x10);
if (NightModeEnabled)
{
mem.Write<int>(ToneMapControllerHandle + Offsets.m_bUseCustomAutoExposureMin, 1);
mem.Write<int>(ToneMapControllerHandle + Offsets.m_bUseCustomAutoExposureMax, 1);
mem.Write<float>(ToneMapControllerHandle + Offsets.m_flCustomAutoExposureMin, 0.075f);
mem.Write<float>(ToneMapControllerHandle + Offsets.m_flCustomAutoExposureMax, 0.075f);
}
else
{
mem.Write<int>(ToneMapControllerHandle + Offsets.m_bUseCustomAutoExposureMin, 0);
mem.Write<int>(ToneMapControllerHandle + Offsets.m_bUseCustomAutoExposureMax, 0);
mem.Write<float>(ToneMapControllerHandle + Offsets.m_flCustomAutoExposureMin, 1f);
mem.Write<float>(ToneMapControllerHandle + Offsets.m_flCustomAutoExposureMax, 1f);
}
}
}
}