[Problem] Sounds

02/25/2011 08:26 Spirited42#1
I've got sounds working on every single source I've ever made; however, this source has a problem and I have no idea why. It repeats the sound over and over again. The server isn't sending the client anything. It just sends the initial string packet.

#removed incorrect code

I tried it on other versions of clients too. I'm very, very confused.
02/25/2011 14:16 Syst3m_W1z4rd#2
Maybe this can help.
Code:
Take from epvp, release on 4botters.
02/25/2011 18:57 Arco.#3
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
02/25/2011 19:45 Iron~Man#4
Quote:
Originally Posted by Syst3m_W1z4rd View Post
Maybe this can help.
Code:
        public byte[] SoundPacket(string SoundName, int Volume)
        {
            ServerClientPacket Pkkt = new ServerClientPacket();

            Pkkt.AddShort(15 + SoundName.Length);
            Pkkt.AddShort(0x3F7);
            Pkkt.AddInt(0);
            Pkkt.AddShort(0x214);
            Pkkt.AddByte(SoundName.Length);
            Pkkt.AddText(SoundName);
            Pkkt.AddShort(Volume);
            Pkkt.AddShort(0);

            return Pkkt.ReturnPacket();
        }

Ermm, When I Send The Packet, I Only Put the song name or the whole path?
02/25/2011 20:07 Arco.#5
Quote:
Originally Posted by Iron~Man View Post
Ermm, When I Send The Packet, I Only Put the song name or the whole path?
Learn to read some of the example threads.
Quote:
sound/rain.mp3
02/25/2011 21:13 Spirited42#6
Quote:
Originally Posted by Syst3m_W1z4rd View Post
Maybe this can help.
Code:
        public byte[] SoundPacket(string SoundName, int Volume)
        {
            ServerClientPacket Pkkt = new ServerClientPacket();

            Pkkt.AddShort(15 + SoundName.Length);
            Pkkt.AddShort(0x3F7);
            Pkkt.AddInt(0);
            Pkkt.AddShort(0x214);
            Pkkt.AddByte(SoundName.Length);
            Pkkt.AddText(SoundName);
            Pkkt.AddShort(Volume);
            Pkkt.AddShort(0);

            return Pkkt.ReturnPacket();
        }
Same Result.
I figured it out though.
I forgot to mention creating a NEW packet instead of reusing an old one... so it had junk left in the buffer. Hahaha. I really shouldn't code when I'm tired. Thanks for the help. I'll thank you. =p