Hi there guys,
I have a weather plugin, not of my own code, but am trying to edit a part of it. But that is not what this post is about. It is just background info.
I know very little about scripting pawn, but enough to be able to customize plugins to my wants.
Anyways, a function within that weather plugin calls to emit an ambience rain sound on all clients [rain.wav] in condition zero when entity rain is in effect. However in game, it plays too loud and players dislike it.
So I did my research and found bits an pieces on how to control the spk command volume as follows :
1. client_cmd(0, "spk ambience/rain(v40)");
2. client_cmd(0, "spk ambience/rain.wav",40);
I went ahead to make a simple test plugin to see the results in action :
PHP Code:
#include <amxmodx>
public plugin_init(){
register_plugin("Volume Control", "1", "Meh..");
register_clcmd("say a","volume_c0");
register_clcmd("say s","volume_c1");
}
public volume_c0(){
client_cmd(0, "spk ambience/rain.wav",40);
}
public volume_c1(){
client_cmd(0, "spk ambience/rain(v40)");
}
The problem here is, in CS:CZ, is that the results are not favorable. What actually happens is, when the sound file activates it plays at normal volume[loud]. But when I shoot or knife the ground it only then changes to specified volume in the command. In addition the volume slowly raises back to normal volume within seconds if I remain idle.
Does anyone know whats going on and how this can be fixed?