Emit_sound but different sound on every client
Hi,
I want to play a sound from a given location, so I use emit_sound, but I also want this sound to be different for each player on server. Is it possible? |
Re: Emit_sound but different sound on every client
|
Re: Emit_sound but different sound on every client
I already tried to check the syntax for any further information, but i didnt succed. Can you give me an example? Because i still dont see the solution.
To be clear: I want to emit sound Peter.wav from client 1. If client 2 set his personal setting to not Peter .wav, but Alise.wav then client 1 should hear the Peter.wav and client 2 the Alise.wav from the same emit. |
Re: Emit_sound but different sound on every client
PHP Code:
and there already is a plugin that is doing a great job and get s updates when it needs: https://forums.alliedmods.net/showthread.php?p=2117299 |
Re: Emit_sound but different sound on every client
In this sma, (if im not mistaken) if someone emits sound from menu, or via cmd it will play the sound the player chose.
Here: PHP Code:
PHP Code:
If im wrong, please enlight me. |
Re: Emit_sound but different sound on every client
in variable
PHP Code:
so, if player select second song in menu, song id will be 1. PHP Code:
PHP Code:
PHP Code:
g_szSongs[iSongID][szPatth] is sounds/misc/song2.wav |
Re: Emit_sound but different sound on every client
so, let's say you want a command that will emit a sound for all connected players that selected a sound
you can do something like this PHP Code:
|
Re: Emit_sound but different sound on every client
Thank you for taking time, but Im not quite sure that you understand my question.
What function you just wrote is emitting sound from all players, but I want to emit a sound from ONLY 1 player, and every client should hear that sound BUT that sound what each of them chosen already. 1 emit, different sounds for different players. Lets say, there are 16 players on the server. One of them emits a sound, but the other 15 players hear a different sound what they chose from lets say a menu. |
Re: Emit_sound but different sound on every client
that's exactly what the above code is doing. we store player selected song id in a variable then we use that variable to emit the song he selected.
my explanations are really bad maybe that s why you don't understand what i did |
Re: Emit_sound but different sound on every client
Maybe I dont understand yea, but the code u sent is emitting sound from all players online and selected a sound, so if 16 players online + selected sound it will be played 16 times, 16 different places. its not exactly what I want, because I want to emit from 1 place, but 16 different sound for each player.
The exact thing i want to do: I want to replace shooting sounds. I already did it, but I also want for example if someone shoots with ak, then each player should hear different sounds that they chose from a menu, when the player with ak shoots. |
| All times are GMT -4. The time now is 00:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.