Liberty Unleashed

Scripting => Script Help => Topic started by: Kevin on January 27, 2013, 06:43:01 pm

Title: sound
Post by: Kevin on January 27, 2013, 06:43:01 pm
hi guys please help I need a script to start the game when I leave I want sound please help 8)
Title: Re: sound
Post by: Mido_Pop on January 27, 2013, 08:07:28 pm
function onScriptLoad()
{
     spawn_Sound <- null;
}

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

~~~~~~~~~~~~~~~~

Script :<script file="welcome.nut" client="1"/>
          <sound file="welcome.mp3"/>

. :P
Title: Re: sound
Post by: Kevin on February 04, 2013, 08:43:37 pm
Thanks for your help I worked great
Title: Re: sound
Post by: SugarD on April 06, 2013, 09:32:50 pm
Moved to the correct board.

Issue resolved, topic locked. :)