AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Emit Sound at origin? (https://forums.alliedmods.net/showthread.php?t=63397)

BigDontCry 11-20-2007 07:55

Emit Sound at origin?
 
Hey.

Is it possible to emit a sound from a specific origin for only one player? If so, how? The only thing I need help with is emitting the sound, not finding out the origin... Say "Player2" would emit a sound that only "Player1" could hear from "Player2"s origin

Thanks

ConnorMcLeod 11-20-2007 11:48

Re: Emit Sound at origin?
 
You can do better : make the player himself emit a sound ;)

SchlumPF* 11-20-2007 12:46

Re: Emit Sound at origin?
 
client_cmd( id, "spk PATH" ) // plays wave files
client_cmd( id, "mp3 play PATH" ) // playes mp3 files

ConnorMcLeod 11-20-2007 12:51

Re: Emit Sound at origin?
 
http://www.amxmodx.org/funcwiki.php?...ound&go=search

BigDontCry 11-20-2007 13:05

Re: Emit Sound at origin?
 
Quote:

Originally Posted by connorr (Post 554986)

Wouldn't that just do so all the players around him hear the sound? I want a specific player hear a sound emitting from another player, if he's close enough... not all players

M249-M4A1 11-20-2007 15:35

Re: Emit Sound at origin?
 
Then, like posted above, your better off just doing a client_cmd(target, "spk ^"misc/haha^"") or something

ConnorMcLeod 11-20-2007 15:45

Re: Emit Sound at origin?
 
If you want the sound to be located, you have to use emit_sound, then, all players that are close enough (depend on attenution) will here the sound.

BigDontCry 11-20-2007 15:52

Re: Emit Sound at origin?
 
Quote:

Originally Posted by connorr (Post 555053)
If you want the sound to be located, you have to use emit_sound, then, all players that are close enough (depend on attenution) will here the sound.

Yes, I know... But I don't want all the players that are close enough to hear the sound. Just a specific player... Maybe that's not possible to achieve? :cry:

P34nut 11-20-2007 16:15

Re: Emit Sound at origin?
 
The way you want is posssible via client_cmd(id, "spk mysound")

travo 11-22-2007 01:06

Re: Emit Sound at origin?
 
make a entity and move it to your origin then emit_sound at the entity


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

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