How to stop music in L4D2? It's not working.
PHP Code:
new const String:g_Music[2][] =
{
"music/witch",
"music/tank"
};
public Action:MusicSoundHook(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
if (i_Music == 1) { // Music sounds
for (new i = 0; i < sizeof(g_Music); i++) {
if (StrContains(sample, g_Music[i], false) > -1) {
volume = 0.0;
return Plugin_Changed;
}
}
}
return Plugin_Continue;
}