Raised This Month: $ Target: $400
 0% 

Emitting Sounds From Player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 11-26-2010 , 13:42   Emitting Sounds From Player
Reply With Quote #1

How can I emitt a sound from a specific player. And while the sound is emitting, I want it to follow the player.

Meaning I don't want it to just emit from where he was standing when the sound started, I want it to be attached to him somewhat, so that while he's moving, it gives the effect that he's making the sound.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 11-26-2010 , 14:05   Re: Emitting Sounds From Player
Reply With Quote #2

emit_sound(id, CHAN_AUTO, "xxx/xxx.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

http://www.amxmodx.org/funcwiki.php?...ound&go=search
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 11-26-2010 , 14:26   Re: Emitting Sounds From Player
Reply With Quote #3

Quote:
Originally Posted by Flipper_SPb View Post
emit_sound(id, CHAN_AUTO, "xxx/xxx.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

http://www.amxmodx.org/funcwiki.php?...ound&go=search
I guess I should learn to use funcwiki more often. Thanks!

Edit: Wait, that will only emitt the sound to that one person. I want everyone to be able to hear it, but have the sound emit from that one player. They would have to be near him of course.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 11-26-2010 , 14:37   Re: Emitting Sounds From Player
Reply With Quote #4

I guess you could see if two people are close enough to each other to hear the sound, with get_distance? and then get their origins with get_user_origin.

Never used emit_sound, so idk.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 11-26-2010 , 15:09   Re: Emitting Sounds From Player
Reply With Quote #5

Quote:
Originally Posted by nikhilgupta345 View Post
I guess you could see if two people are close enough to each other to hear the sound, with get_distance? and then get their origins with get_user_origin.

Never used emit_sound, so idk.
Lol, emit_sound is the best way to play wav sounds with depth. If I use spk the sound would stay the same. Emit_sound depends on how close you are where the sound was emitted. It gives a more realistic effect.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 11-26-2010 , 15:03   Re: Emitting Sounds From Player
Reply With Quote #6

Quote:
as I know, it can be non-player entity
I just tried it it works well

Last edited by Flipper_SPb; 11-26-2010 at 15:16.
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 11-26-2010 , 15:16   Re: Emitting Sounds From Player
Reply With Quote #7

Quote:
Originally Posted by GXLZPGX View Post
Wait, that will only emitt the sound to that one person.
No.. Just try. Player with id will emit sound. Other players can hear it.
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 11-26-2010 , 15:18   Re: Emitting Sounds From Player
Reply With Quote #8

Oh, sorry. I have a trouble with editing of my post
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 11-26-2010 , 16:39   Re: Emitting Sounds From Player
Reply With Quote #9

Check the multiple plugins that already do this.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ 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 11:28.


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