Author Topic: Getting a sound to play for clients on connect?  (Read 2654 times)

0 Members and 1 Guest are viewing this topic.

Offline BlackRockShooter

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Getting a sound to play for clients on connect?
« on: June 21, 2013, 06:19:18 PM »
Okay so I am working on my TTT server and I have been attempting to set up an excerpt from a song to play for the client when they join the server.  Any ideas?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Getting a sound to play for clients on connect?
« Reply #1 on: June 21, 2013, 08:15:38 PM »
Use a hook to play the sound?
Experiencing God's grace one day at a time.

Offline BlackRockShooter

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Getting a sound to play for clients on connect?
« Reply #2 on: June 22, 2013, 01:59:42 PM »
Well that would be helpful but I am still a novice with lua and I do not know much about its use.  I was really hoping I would get help rather than a response such as this.
Use a hook to play the sound?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Getting a sound to play for clients on connect?
« Reply #3 on: June 22, 2013, 04:14:39 PM »
http://wiki.garrysmod.com/page/GM/PlayerConnect
Instead of printing a message as that hook example shows, research how to get gmod to play a sound to players
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline BlackRockShooter

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Getting a sound to play for clients on connect?
« Reply #4 on: June 22, 2013, 04:51:55 PM »
thank you
http://wiki.garrysmod.com/page/GM/PlayerConnect
Instead of printing a message as that hook example shows, research how to get gmod to play a sound to players

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Getting a sound to play for clients on connect?
« Reply #5 on: June 22, 2013, 09:51:04 PM »
While looking through releases today, I stumbled across an OLD thread release I made to play sounds to joining players...and only joining players, using sounds included with HalfLife I think.
(ie, think i avoided custom stuff)
It didn't use connect, it used playerauthed hook (basically, it made sure they stayed long enough to steam authenticate)
Look for UJoin sounder for old example code.
And, I mean OLD...pre GM12 I think...but, with little lua experience, would make good starting code to modify for your needs.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline thriftylol

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Getting a sound to play for clients on connect?
« Reply #6 on: June 28, 2013, 12:55:40 PM »
i found this thread, im pretty sure this is everything you were asking for c:

http://forums.ulyssesmod.net/index.php/topic,6036.0.html