Raised This Month: $32 Target: $400
 8% 

emit_sound but with customizable sound parameters like in sentences.txt


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
condoriano90
Member
Join Date: May 2020
Old 07-10-2020 , 12:09   emit_sound but with customizable sound parameters like in sentences.txt
Reply With Quote #1

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 is offline
condoriano90
Member
Join Date: May 2020
Old 07-14-2020 , 07:48   Re: emit_sound but with customizable sound parameters like in sentences.txt
Reply With Quote #2

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.
condoriano90 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-14-2020 , 07:59   Re: emit_sound but with customizable sound parameters like in sentences.txt
Reply With Quote #3

There's a pitch paramater in emit_sound function.
More info here https://www.amxmodx.org/api/amxmodx/emit_sound
__________________








CrazY. is offline
condoriano90
Member
Join Date: May 2020
Old 07-14-2020 , 08:03   Re: emit_sound but with customizable sound parameters like in sentences.txt
Reply With Quote #4

Changing pitch alone will make the sound longer and that's not what I need.
condoriano90 is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-14-2020 , 08:10   Re: emit_sound but with customizable sound parameters like in sentences.txt
Reply With Quote #5

I'm not sure if this is possible. You will probably need to edit the sound in an audio editor
__________________








CrazY. is offline
Reply



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 02:30.


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