Raised This Month: $ Target: $400
 0% 

[Solved]Spk/Speak Volume-Undesired Outcome Ingame


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
tryout101
Member
Join Date: Mar 2009
Old 02-05-2013 , 20:22   [Solved]Spk/Speak Volume-Undesired Outcome Ingame
Reply With Quote #1

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?

Last edited by tryout101; 02-12-2013 at 20:39. Reason: Solved
tryout101 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode