Emit sound to specific team
When player reload specific sound is played. That sound can hear all players,from TS and CT.
How can I make this sound heard only players on my team? PHP Code:
|
Re: Emit sound to specific team
Create a variable that will hold player's team, loop through all players and check if looped player's team isn't equal to the player who is reloading, if true use continue, else emit_sound with the variable that you looped.
Code:
|
Re: Emit sound to specific team
I don't think you can do that, even the name suggests it, "emit a sound ( from a location )"
The only official way to do something like that is using the spk command But, there may be a workaround, but i'm not sure if it would work.. One thing i was thinking was blocking the sound by hooking the emit sound forward ( if i remember right there should be something like that ) Another thing would be to use a specific channel, then for the specific players emit a mute sound on the same channel it should replace the previous sound... |
Re: Emit sound to specific team
I'm tired of repeating it, but edon, that's not how you loop through all players. Your code will throw errors in 99,99% of cases.
|
Re: Emit sound to specific team
Quote:
|
Re: Emit sound to specific team
PHP Code:
|
Re: Emit sound to specific team
edon1337 tested and dont work.
|
Re: Emit sound to specific team
Quote:
|
Re: Emit sound to specific team
Quote:
|
Re: Emit sound to specific team
Quote:
That's not about speed after all, it's about keeping good practices while coding. If not, you'll just keep using poor ways over and over again, because who cares, right? At some points all this small things will start to matter. You already messed it by not adding the is_user_connected in the first place. If you would simply go with the right way you would not had any issue. Do whatever you want, if you can't see that I'm trying to help, fine by me. Just don't tell other people to do the same. |
| All times are GMT -4. The time now is 17:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.