ULX

Author Topic: PlaySound Help??  (Read 35987 times)

0 Members and 1 Guest are viewing this topic.

Offline ScopeTCR

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
PlaySound Help??
« on: April 08, 2011, 11:59:25 PM »
I need help, I've been working on my server all day and I have just one final thing I want to do before I make the server's site. WHERE DO I PUT THE SOUNDS I wanna play in !menu ?? I put them in the "Sound" folder in the server FTP (orangebox/garrysmod/sound) AND into the garrysmod folder IN the sound folder. Still when i use the menu, go to playsound, and type the name of the sound I want (eg. HolySh*t) it says that sound doesnt exist or something like that. Help?

Offline edk141

  • Newbie
  • *
  • Posts: 23
  • Karma: 5
Re: PlaySound Help??
« Reply #1 on: April 09, 2011, 01:32:55 AM »
ULX looks for sounds in sounds/ I think, and you need the whole filename including the file extension, e.g.:
ulx playsound music/portal_still_alive.mp3
would play Still Alive which is in sounds/music/.

You also have to add them to your server's download list if you want anyone to hear them. ULX has a way to do that but it depends on your version. If you're using SVN look in addons/ulx/data/ulx/downloads.txt, if not there's a FAQ thread but it might be out of date.

Offline ScopeTCR

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: PlaySound Help??
« Reply #2 on: April 09, 2011, 01:50:30 AM »
Alright I'll try that out, I have SVN btw, so just confirming this but It has to be in orangebox/garrysmod/sounds folder? also how do i add to my servers download list (SVN), I go to addons/ulx/data/ulx/downloads.txt file and I just add a command line such as "download killingspree.wav"

Offline edk141

  • Newbie
  • *
  • Posts: 23
  • Karma: 5
Re: PlaySound Help??
« Reply #3 on: April 09, 2011, 05:03:38 AM »
Ugh, I was wrong about the folder, it doesn't have an s at the end. So orangebox/garrysmod/sound/. Sorry :S

You should copy/paste the downloads.txt folder to data/ulx/ and then edit it there (if not, it'll mess up future SVN updates), it's just a file/folder per line. There are instructions in the file of exactly what to do.

Offline ScopeTCR

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: PlaySound Help??
« Reply #4 on: April 09, 2011, 05:41:20 AM »
Still not working, can you specify what i need to write in the ulx/data/downloads.txt file? I'll tell you what sounds I have and then if your nice you can write the commands for me :D (im no good with anything other than 3d models, animation, and sound) ok so the sounds I want to be able to play on the server are:

die.wav
dominating.mp3
explosion.wav
firstblood.mp3
godlike.mp3
headshot.mp3
holyshit.mp3
humiliation.mp3
killingspree.mp3
ludicrouskill.mp3
monsterkill.mp3
multikill.mp3
prepare.mp3
rampage.mp3
teamkiller.mp3
ultrakill.mp3
unstoppable.mp3
wickedsick.mp3

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: PlaySound Help??
« Reply #5 on: April 09, 2011, 06:26:05 AM »
Nvm, I was wrong.
« Last Edit: April 09, 2011, 08:34:54 AM by Aaron113 »

Offline edk141

  • Newbie
  • *
  • Posts: 23
  • Karma: 5
Re: PlaySound Help??
« Reply #6 on: April 09, 2011, 09:10:58 AM »
@Aaron113, on servers that's orangebox/garrysmod/sound

Well for die.wav I'd do this:
Upload to sound/die.wav on the server
Open garrysmod/data/ulx/downloads.txt and put die.wav on a new line at the end
Type ulx playsound die.wav

For that many I'd stick them all in a folder, like sound/something/, and then type sound/something in the downloads.txt file. Then everything in sound/something/ would be downloaded to clients.

I'll test that with my server in a minute, if I remember

Update:
So I tested it, and it works. Here is what I did (I'm using the directory that has gameinfo.txt in as the root, to avoid confusion. For you it'll be orangebox/garrysmod/garrysmod).
  • Uploaded holyshit.mp3 to /sound
  • Uploaded downloads.txt to /data/ulx. It looks like this:
Code: [Select]
;ATTENTION! /ADDONS/ulx/data/ulx/<this file> is a DEFAULT file. DO NOT EDIT THE /ADDONS/ULX/DATA/ULX FOLDER FILE!!!
; Instead, edit the version in <garrysmod root>/data/ulx/ if it exists. If it doesn't, copy this file to <gmod root>/data/ulx/ to create it.
; You can add forced downloads here. Add as many as you want, one file or
; folder per line. You can also add these to your map- or game-specific files.
; You can add a folder to add all files inside that folder recursively.
; Any line starting with ';' is a comment and WILL NOT be processed!!!
; Examples:
;sound/cheeseman.mp3 <-- Adds the file 'cheeseman.mp3' under the sound folder
;sound/my_music <-- Adds all files within the my_music folder, inside the sound folder
sound/holyshit.mp3
  • Spawned a few hundred bouncy balls and started throwing them around and eating them
  • Remembered why I was there and did: ulx playsound holyshit.mp3. It worked.
« Last Edit: April 09, 2011, 09:56:16 AM by edk141 »

Offline ScopeTCR

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: PlaySound Help??
« Reply #7 on: April 09, 2011, 09:44:45 AM »
Ok thanks you'v been alot of support

and it works btw :)