server-side sound
Hello, I'm trying to emit sounds on server-side (spk or mp3 play), so I will not need to replay sound when player connect.
I noticed that the call of client_cmd with index 0 will loop through all connected players, so won't work. https://github.com/alliedmodders/amx...modx.cpp#L2008 I tried with server_cmd but doesn't work. Any suggestion? |
Re: server-side sound
What do "server-side sound" means?
Client can hear a sound because it has sound file in his /sound/ dir. To start playing a sound the client has to recieve "play this sound" command from the server, by client_cmd() ("spk" or "mp3 play") or emit_sound(). If the client is not connected when the command is sent, it won't hear anything after connect. |
Re: server-side sound
Quote:
|
Re: server-side sound
I tested following code. I want to trigger at any time calling "CAmbientGeneric::ToggleUse" (force_use or Ham_Use), but for some reason it's not working; The sound it's emitted properly without spawnflag SF_AMBIENT_SOUND_NOT_LOOPING but I can't toggle it on/off.
Code:
|
| All times are GMT -4. The time now is 07:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.