emit_sound help
hi again. i want add sound effects on menu, when you have not access to item and select that it will play no access sound for that player, but when i put sound all players can hear it.
i use this code for sound emit_sound(id, CHAN_STATIC, "ambience/noaccess.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) and 1 player plays it everyone hear that how can i make it only for that player? or is there other code for it? |
Re: emit_sound help
Use client_cmd(id, "spk ^"ambience/noaccess.wav^"");
|
Re: emit_sound help
it worked :)
|
Re: emit_sound help
also i wonder how can i disable emit or spk sound while its playing?
|
Re: emit_sound help
Quote:
for emit sound, you can emit a new sound with the same channel of your previous emit sound, that new emit sound it will be a null sound( a .wav of 1 seg and 0% of volume ) |
Re: emit_sound help
Quote:
stopsound -> console command! |
Re: emit_sound help
Quote:
|
Re: emit_sound help
Stopsound is a client command and I would consider this slowhacking because it affects way more than just the sound that you force the player to hear.
|
Re: emit_sound help
Well, slowhacking is a grey area depending on how you use it - but aside that, you are right it also stops map sounds as well (for example de_train airplane, or even the truck sounds in T spawn), also nades and etc.
I guess stopsound would only be useful in very specific cases. |
Re: emit_sound help
Quote:
|
| All times are GMT -4. The time now is 15:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.