Sound emission? (I just need a command, not an entire peice of coding).
1 replies, posted
Okay, so, I found a really nice addon allowing people to click a button, and a voice sound would play. I found it pretty nice, but I want it to be serverside instead of clientside. I'm not planning on publishing it or anything, so I'm not "stealing", I'm just making it useable.
It does this:
"surface.PlaySound( "american/US_1_mp_commands_07.wav" )"
But I want other players to be able to hear it, and if I understand correctly, that command will only make the client hear it. So could anyone hand me a nice command to replace it with?
Urm...
player:EmitSound("Soundname",75,100)
75 = Volume, its 75 by default.
100 = Pitch, its 100 by default.
Either that or...
Client side --
local function MusicForyou(UM)
surface.PlaySound(um:ReadString())
end
usermessage.Hook( "PlayMusicForAll", MusicForyou )
--
Server side --
umsg.Start("PlayMusicForAll")
umsg.String("music/hl2_song24.mp3")
umsg.End()
--
And that usermessage would play music to everyone in the server client side.
Sorry, you need to Log In to post a reply to this thread.