AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Emit_sound for only one player? (https://forums.alliedmods.net/showthread.php?t=130142)

ot_207 06-20-2010 17:08

Emit_sound for only one player?
 
Is there a possibility of emitting a sound to only one player?

Alucard^ 06-20-2010 17:14

Re: Emit_sound for only one player?
 
PHP Code:

emit_sound indexchannelsample[], Float:volFloat:att,flagspitch 

Just using the index of that player? I never used this native but... i think this is the correct way ><

ConnorMcLeod 06-20-2010 17:19

Re: Emit_sound for only one player?
 
http://www.mail-archive.com/hlcoders.../msg03222.html

I remember i had test without any success with emit_sound, you can try with EmitAmbientSound though.
Or PM_PlaySound since you seems to want that for a plugin using orpheu.

ot_207 06-20-2010 17:44

Re: Emit_sound for only one player?
 
Quote:

Originally Posted by Alucard^ (Post 1214750)
PHP Code:

emit_sound indexchannelsample[], Float:volFloat:att,flagspitch 

Just using the index of that player? I never used this native but... i think this is the correct way ><

No no no. Index is the entity that is emitting the sound.

Quote:

Originally Posted by ConnorMcLeod (Post 1214757)
http://www.mail-archive.com/hlcoders.../msg03222.html

I remember i had test without any success with emit_sound, you can try with EmitAmbientSound though.
Or PM_PlaySound since you seems to want that for a plugin using orpheu.

Will try this! Thanks a lot!

Edit: Tried it. No luck.

Alucard^ 06-20-2010 18:59

Re: Emit_sound for only one player?
 
Oh sry... didn't know that.

bumpforyou

ot_207 06-21-2010 03:16

Re: Emit_sound for only one player?
 
Has anyone tested EngFunc_BuildSoundMessage.

PHP Code:

EF_BuildSoundMSG ( const ENTITYchannel, const SAMPLE[], Float:volumeFloat:attenuationfFlagspitchmsg_destmsg_type, const Float:ORIGIN[3], const ED 


I have used these arguments and my client disconnects from the server.
PHP Code:

// This was used in a command where the id is the "player_id" and the origin the player origin!
// And yes the sounds do exist!
EF_BuildSoundMSG 0CHAN_AUTO"weapons/generic_reload.wav"VOL_NORM,  ATTN_NORM0PITCH_NORMMSG_BROADCASTSVC_SOUNDoriginid



All times are GMT -4. The time now is 14:48.

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