diff options
| author | navewindre <nw@moneybot.cc> | 2023-12-04 18:06:10 +0100 |
|---|---|---|
| committer | navewindre <nw@moneybot.cc> | 2023-12-04 18:06:10 +0100 |
| commit | aef0d1c1268ab7d4bc18996c9c6b4da16a40aadc (patch) | |
| tree | 43e766b51704f4ab8b383583bdc1871eeeb9c698 /sourcemod/scripting/gokz-quiet/gokz-sounds.sp | |
| parent | 38f1140c11724da05a23a10385061200b907cf6e (diff) | |
bbbbbbbbwaaaaaaaaaaa
Diffstat (limited to 'sourcemod/scripting/gokz-quiet/gokz-sounds.sp')
| -rw-r--r-- | sourcemod/scripting/gokz-quiet/gokz-sounds.sp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/sourcemod/scripting/gokz-quiet/gokz-sounds.sp b/sourcemod/scripting/gokz-quiet/gokz-sounds.sp new file mode 100644 index 0000000..02cf681 --- /dev/null +++ b/sourcemod/scripting/gokz-quiet/gokz-sounds.sp @@ -0,0 +1,71 @@ +/* + Volume options for various GOKZ sounds. +*/ + +public Action GOKZ_OnEmitSoundToClient(int client, const char[] sample, float &volume, const char[] description) +{ + int volumeFactor = 10; + if (StrEqual(description, "Checkpoint") || StrEqual(description, "Set Start Position")) + { + volumeFactor = GOKZ_QT_GetOption(client, QTOption_CheckpointVolume); + if (volumeFactor == -1) + { + return Plugin_Continue; + } + } + else if (StrEqual(description, "Checkpoint")) + { + volumeFactor = GOKZ_QT_GetOption(client, QTOption_TeleportVolume); + if (volumeFactor == -1) + { + return Plugin_Continue; + } + } + else if (StrEqual(description, "Timer Start") || StrEqual(description, "Timer End") || StrEqual(description, "Timer False End") || StrEqual(description, "Missed PB")) + { + volumeFactor = GOKZ_QT_GetOption(client, QTOption_TimerVolume); + if (volumeFactor == -1) + { + return Plugin_Continue; + } + } + else if (StrEqual(description, "Error")) + { + volumeFactor = GOKZ_QT_GetOption(client, QTOption_ErrorVolume); + if (volumeFactor == -1) + { + return Plugin_Continue; + } + } + else if (StrEqual(description, "Server Record")) + { + volumeFactor = GOKZ_QT_GetOption(client, QTOption_ServerRecordVolume); + if (volumeFactor == -1) + { + return Plugin_Continue; + } + } + else if (StrEqual(description, "World Record")) + { + volumeFactor = GOKZ_QT_GetOption(client, QTOption_WorldRecordVolume); + if (volumeFactor == -1) + { + return Plugin_Continue; + } + } + else if (StrEqual(description, "Jumpstats")) + { + volumeFactor = GOKZ_QT_GetOption(client, QTOption_JumpstatsVolume); + if (volumeFactor == -1) + { + return Plugin_Continue; + } + } + + if (volumeFactor == 10) + { + return Plugin_Continue; + } + volume *= float(volumeFactor) * 0.1; + return Plugin_Changed; +}
\ No newline at end of file |
