int previousTotalHits = 0; // outside ur cheat loop
if (Settings::misc::hitsound) {
uintptr_t pBulletServices = driver.readv(global_pawn + 0x1698);
int totalHits = driver.readv(pBulletServices + 0x40);
if (totalHits != previousTotalHits) {
if (totalHits == 0 && previousTotalHits != 0) {
// `totalHits` changed from non-zero to zero, do not play hitsound
}
else {
// Play the hitsound
PlaySoundW(L"ur hitsound here.wav", NULL, SND_FILENAME | SND_ASYNC);
}
previousTotalHits = totalHits; // Update the previousTotalHits
}
This is an example of external hitsound.
int previousTotalHits = 0; // outside ur cheat loop if (Settings::misc::hitsound) { uintptr_t pBulletServices = driver.readv(global_pawn + 0x1698);
int totalHits = driver.readv(pBulletServices + 0x40);
}