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

Solved Play directional sound to some of the clients only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
felhasznalo
AlliedModders Donor
Join Date: Aug 2015
Location: Hungary
Old 09-20-2017 , 14:12   Play directional sound to some of the clients only
Reply With Quote #1

I can use emit_sound to play a global directional sound (a sound with an origin).
Also, I can use client_cmd(id, "spk ...") to play sound to some of the clients only.

How could I play a sound with an origin to only some of the clients?
(Something like EmitSoundToClient in SourceMod.)

Last edited by felhasznalo; 09-20-2017 at 14:37.
felhasznalo is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 09-20-2017 , 14:15   Re: Play directional sound to some of the clients only
Reply With Quote #2

Get the origin use find ent by sphere play the sound to all the players found in the sphere by using client_cmd(id, "spk....")
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 09-20-2017 at 14:16.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
felhasznalo
AlliedModders Donor
Join Date: Aug 2015
Location: Hungary
Old 09-20-2017 , 14:27   Re: Play directional sound to some of the clients only
Reply With Quote #3

Unfortunately the client spk command is not directional, it does not have an origin. You can't hear where the sound is coming form.
felhasznalo is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-20-2017 , 14:34   Re: Play directional sound to some of the clients only
Reply With Quote #4

see my answer here
https://forums.alliedmods.net/showthread.php?t=301323

there is also the emit_sound2 module if you don't mind the hassle of installing a module for this
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.

Last edited by aron9forever; 09-20-2017 at 14:35.
aron9forever is offline
felhasznalo
AlliedModders Donor
Join Date: Aug 2015
Location: Hungary
Old 09-20-2017 , 14:40   Re: Play directional sound to some of the clients only
Reply With Quote #5

Thank you!

Marked as solved.
felhasznalo is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 10-13-2017 , 02:52   Re: Play directional sound to some of the clients only
Reply With Quote #6

You can try using BuildSoundMsg.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
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 17:43.


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