Author Topic: Sound help  (Read 2151 times)

[EG]~[S]aha~

  • Jr. Member
  • **
  • Posts: 54
  • Karma: +1/-9
  • Liberty Unleashed!
    • View Profile
Sound help
« on: September 28, 2012, 08:44:26 am »
you need to do so in this script after spawning music stop


function onScriptLoad()
{
     spawn_Sound <- null;
}

function onClientRequestClass( player )
{
    if ( !spawn_Sound )
    {
         spawn_Sound = FindSound( "welcome2.mp3" );
         if ( spawn_Sound )
         {
              spawn_Sound.Open();
              spawn_Sound.Play();
         
              return 1;
         }
    }
    else
    {
        spawn_Sound.Open();
         spawn_Sound.Play();
      
         return 1;
    }
}

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Sound help
« Reply #1 on: September 28, 2012, 10:11:53 am »
You want the music to stop when you spawn?
In that case, Add the following:
Code: [Select]
function onClientSpawn( spawnclass )
{
   spawn_Sound.Stop();
   return 1;
}

 

© Liberty Unleashed Team.