From c1ff555e1756e90e5810cc295efaa781022398dc Mon Sep 17 00:00:00 2001 From: Wizzard <25581244+Wizzard@users.noreply.toomuchslop.com> Date: Tue, 19 Sep 2023 18:54:15 -0400 Subject: [PATCH] Add sounds on injection --- src/include/game_detection.h | 1 + src/main.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/include/game_detection.h b/src/include/game_detection.h index 3de898f..b7df132 100644 --- a/src/include/game_detection.h +++ b/src/include/game_detection.h @@ -13,5 +13,6 @@ GameType get_current_game(void); int IsCS16(void); int IsHalfLife(void); int IsDayOfDefeat(void); +int IsTFC(void); #endif diff --git a/src/main.c b/src/main.c index 428e324..4be8849 100644 --- a/src/main.c +++ b/src/main.c @@ -40,6 +40,20 @@ void load(void) { /* Get game version after injecting */ //this_game_id = get_cur_game(); + if (IsCS16()) { + i_engine->pfnClientCmd("play 'sound/radio/go.wav'"); + } + else if (IsDayOfDefeat()) { + i_engine->pfnClientCmd("play 'sound/player/gersniper.wav'"); + } + else if (IsTFC()) { + i_engine->pfnClientCmd("play 'sound/misc/party2.wav'"); + } + else + { + i_engine->pfnClientCmd("play 'valve/sound/vox/suit.wav'"); + } + i_engine->pfnClientCmd("echo \"goldsource-cheat loaded successfully!\""); i_engine->pfnClientCmd("echo \"Deadzone rulez!\""); i_engine->pfnClientCmd("echo \"https://git.deadzone.lol/Wizzard/goldsource-cheat\"");