ULX

Author Topic: Sound Question...  (Read 5594 times)

0 Members and 1 Guest are viewing this topic.

Offline Brett900

  • Newbie
  • *
  • Posts: 44
  • Karma: -2
Sound Question...
« on: August 07, 2006, 10:17:02 AM »
Can someone tell me by step by step how to use "ulx_playsound" because i have tryed and tryed to find out and i just dont get it.Like i would like to know were to put the sounds and then how to play them or wut to type to play them.I might sound stupid but i need help please.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Sound Question...
« Reply #1 on: August 07, 2006, 10:53:02 AM »
I presume you are using Ulx v1.13..
As discussed in
http://forums.ulyssesmod.net/index.php/topic,238.0.html and
http://forums.ulyssesmod.net/index.php/topic,272.0.html , but possibly hard to tell ...

Place sound files in C:/your/steam/server/path/gmod9/sound
I recommend a sub-folder, such as /mysounds, so
C:/your/steam/server/path/gmod9/sound/mysounds

Then to play it
ulx_playsound "mysounds/your sound.XXX"

If your sounds don't have spaces, you don't need quotes "
.XXX will be .mp3 or .wav

Other players must have the sound to hear it.
You can use ForceDownload to send files to your users.

See ..
Problems with 1.13 ForceDownload
http://forums.ulyssesmod.net/index.php/topic,261.0.html
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Brett900

  • Newbie
  • *
  • Posts: 44
  • Karma: -2
Re: Sound Question...
« Reply #2 on: August 07, 2006, 11:32:44 AM »
okay thanks that will help alot and will others be able to here the music or sound?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Sound Question...
« Reply #3 on: August 07, 2006, 05:02:25 PM »

Yes, they will
As I've stated, they must have the sound, in same location relative to thier gmod9/sound directory, to hear it.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Brett900

  • Newbie
  • *
  • Posts: 44
  • Karma: -2
Re: Sound Question...
« Reply #4 on: August 07, 2006, 05:40:01 PM »
i put it in my source dediacted server is that were its soposta be?,or does it haft to go into

sourcemods:Local disk/program files/valve/steam/steamapps/sourcemods/gmod9/sound/mysounds

Source dedicated server:Local disk/program files/valve/steam/steamapps/******/Source dedicated server/gmod9/sound/mysounds/then my music

(and why doent it now work on v2? theres a section on there thats called "ulx playsound")

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Sound Question...
« Reply #5 on: August 07, 2006, 07:27:12 PM »
Brett, please stop making multiple posts with the same question.

If you are running a dedicated server, yes, the sounds have to be there.
blah/Source Dedicated Server/gmod9/sound/mysounds/test sound.wav
For you, or your players connecting to hear them, you/they also have to have them.
blah/SteamApps/SourceMods/gmod9/sound/mysounds/test sound.wav

To play from 1.13
From Console
ulx_playsound "mysounds/test sound.wav"
(I forget the chat command)

To play from v2
From Console
ulx playsound "mysounds/test sound.wav"
From chat:
!playsound "mysounds/test sound.wav"

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Brett900

  • Newbie
  • *
  • Posts: 44
  • Karma: -2
Re: Sound Question...
« Reply #6 on: August 07, 2006, 08:58:04 PM »
okay,i'm sorry im very new i joined today and i think i know why it didnt work a min ago i typed

ulx playsound admin/humanvictory.mp3

i missed the " " and i got one more question will the people just download the sounds or do i haft to more things to make it so they download it once they join the server?


                                                                                           PS:I will remove this post one it works.
« Last Edit: August 07, 2006, 09:00:17 PM by Brett900 »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Sound Question...
« Reply #7 on: August 08, 2006, 05:18:40 AM »
Brett, don't worry about removing any. I've already removed any duplicate posts I've found in other topics.

You must configure your server to send clients the sound.
Read your
blah/Source Dedicated Server/Gmod9/ulx/configs/forcedownload.ini for how to edit that file.
Quick example...lets say you have 3 sounds in your sound/admin folder...
kick me.wav
Seeya sucker.wav
Nah Nah Nah.mp3 ... you would edit your forcedownload.ini, adding three additional lines like so...
"sound/admin/kick me.wav"
"sound/admin/Seeya sucker.wav"
"sound/admin/Nah Nah Nah.mp3"

You _do_ have to include the 'sound' folder location.
For the forcedownload.ini file, the 'root' path starts in blah/gmod9, not "sound/" like the playsound command

PLEASE remember for your users sake to keep files small. If most servers have a maxrate set at 7000, this means for someone to download files adding up to even something as small as 1mb would take 146 seconds (2 minute, 26 seconds)
 I don't know about others, but if I have to wait more than 30 seconds (sometimes less depending on mood) to download files...I usually find another server.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Brett900

  • Newbie
  • *
  • Posts: 44
  • Karma: -2
Re: Sound Question...
« Reply #8 on: August 08, 2006, 09:26:12 AM »
Okay!,thanks and i got one more question its easy its a yes or no question.
will MPGE4 music work? and also would this work i typed it in like this
------------------------------------------------------------------------------------------------------
//ULX-Dynamic res generator
//Put files you wish to force the client to download in this file, seperated by newlines.
//For example, you might put "sound/supafly.mp3" in here, make sure it has the quotes.
                                  <--------------------
"sound/gmod/humanvictory.mp3"                  |
"sound/gmod/rotten.wav"                            |
"sound/gmod/DontFuckWithMe.wav"              |
"sound/gmod/Asshole.wav"                          |
"sound/gmod/uglystick.wav"                         |
"sound/gmod/behave.wav"                           |
                                                              |
(is there sposta be a space here?)------------|
« Last Edit: August 08, 2006, 09:55:17 AM by Brett900 »

Offline Brett900

  • Newbie
  • *
  • Posts: 44
  • Karma: -2
Re: Sound Question...
« Reply #9 on: August 08, 2006, 05:59:55 PM »
Well i found out that for some reason "mp3" music dont work only "wav" music works,the weird thing is peopel say the dl the mp3 music but they dont here it but when i play it but i do here it do you wut the problem is?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Sound Question...
« Reply #10 on: August 08, 2006, 07:27:15 PM »
No, not really.
Odd that they hear some but not all.
There is a server variable that limits the size of files that can be sent to users. Perhaps your is set high enough for the wavs, but not high enough to send the mp3?

Also, test it yourself.
Your custom directory is named gmod, yes? /gmod9/sound/gmod?

Remove your custom sounds from your game directory /blah/gmod9/sound/gmod/....
Leave the sounds in your Source dedicated server/gmod9/sound directory
Make sure you don't have the same sounds in your gmod9/mods/~modcache/sound/gmod directory

Then, connect to your server, see if all download, and see if they can be played.
Then, search your game directory for the downloaded sounds.

Other than that, I dont have an idea what to try
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Brett900

  • Newbie
  • *
  • Posts: 44
  • Karma: -2
Re: Sound Question...
« Reply #11 on: August 09, 2006, 08:46:13 AM »
Okay,you still helped me i wanted to get rid of the sounds from my game decorctoty and i jut thought of a question it will help me server ans how good the server will seem to players.The question is do you know how to add scrrols on the MOTD? i know this is a fourm for only ulx but i cant get FP its a yes or no question really or if you can give me a garrys mod site were i can ask questions so you dont need to awser it or if you dont know.


                                                                              PS:Thanks for aweransing all my questions so far.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Sound Question...
« Reply #12 on: August 09, 2006, 03:15:28 PM »
Don't know.
Try Google.
"HL2 scroll motd"
I found something about a <body scroll=yes> tag in html code earlier today when I looked.
I'm now at home and don't remember

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming