AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   emit_sound but with customizable sound parameters like in sentences.txt (https://forums.alliedmods.net/showthread.php?t=325899)

condoriano90 07-10-2020 12:09

emit_sound but with customizable sound parameters like in sentences.txt
 
So, as you might know, doing this
PHP Code:

client_cmd("spk ^"radio/ctwin(p80)^""

or
PHP Code:

client_cmd("spk ^"radio/ctwin(p80).wav^""

will make the pitch lower, but this will also affect the duration of the audio to become longer. So, to fix this, I can simply change the code to
PHP Code:

client_cmd("spk ^"radio/ctwin(p80t30)^""

or
PHP Code:

client_cmd("spk ^"radio/ctwin(p80t30).wav^""


My question is, how can I achieve something similar to this with emit_sound, or SVC_SOUND and other messages for that matter?

condoriano90 07-14-2020 07:48

Re: emit_sound but with customizable sound parameters like in sentences.txt
 
Bump. Does anyone know this? There's another method which is creating a new sentences.txt entry maybe in plugin_precache() or something but I don't think there's a function for this, so this is likely not possible. I also don't know of any forwards called during the engine parsing sentences.txt otherwise we can just add a new entry there.

CrazY. 07-14-2020 07:59

Re: emit_sound but with customizable sound parameters like in sentences.txt
 
There's a pitch paramater in emit_sound function.
More info here https://www.amxmodx.org/api/amxmodx/emit_sound

condoriano90 07-14-2020 08:03

Re: emit_sound but with customizable sound parameters like in sentences.txt
 
Changing pitch alone will make the sound longer and that's not what I need.

CrazY. 07-14-2020 08:10

Re: emit_sound but with customizable sound parameters like in sentences.txt
 
I'm not sure if this is possible. You will probably need to edit the sound in an audio editor


All times are GMT -4. The time now is 16:57.

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