How can I play music on the client side that still does have volume editing? At the moment I'm using surface.PlaySound( "soundpath" ) but it doesn't support volume. My next guess is EmitSound, but I'm not sure if that would work because for some reason my LuaSearch website is down at the moment.
Also, if I DO use EmitSound on the client side, will that make it play only for that client? Or will people hear it the closer they get to that player?
Also, I have a different problem here... Basically I'm trying to make it to where a player can set his own convar so he can choose his color he wants to be on the scoreboard. I tried making them set a ClientConVar but then I realized... I need to get the ConVar of a DIFFERENT client and then send that back to the original client so the scoreboard knows what color to set.... How do I fix this?
Bamp.
LocalPlayer():EmitSound(sound, volume, pitch)
Okay, thought so. Now how about my second problem, any solution? :/
If by volume editing you mean adjusting the volume while the sound is still playing, you can use [url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexf385.html?title=CSoundPatch]CSoundPatch[/url] to do that as well as change the pitch too.
However, it's not very good with long sound files (music); I think I remember it having a memory leak.
I just needed it so I can set the volume before hand, but I just need help with the second thing now.
"Also, I have a different problem here... Basically I'm trying to make it to where a player can set his own convar so he can choose his color he wants to be on the scoreboard. I tried making them set a ClientConVar but then I realized... I need to get the ConVar of a DIFFERENT client and then send that back to the original client so the scoreboard knows what color to set.... How do I fix this?"
You could replace the convar with a concommand and then just usermessage the color to all of the players when it's changed/when a player connects
Use player:GetInfoNum("scoreboard_red")
Then how do I set the InfoNum? I don't see anything like SetInfoNum in the Player Class :S
[editline]24th May 2012[/editline]
Oh you know what, I probably could use PData too....
GetInfoNum returns the value of a convar, provided it has the userdata argument to true.
Ooh. I'm sorry I just woke up, I'm a little foggy.. What do you mean provided it has the userdata argument to true?
[code]CreateClientConVar( String convarName, String or Number default, Boolean shouldSave, [highlight]Boolean userdata[/highlight] )[/code]
Ah. I see.
Sorry, you need to Log In to post a reply to this thread.