Guest User

Sad_Violin

a guest
Dec 22nd, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. namespace Sad_Violin
  2. {
  3.     using GTA;
  4.     using NAudio.Wave;
  5.     using System;
  6.  
  7.     public class Violin : Script
  8.     {
  9.         public Violin()
  10.         {
  11.             base.Interval = 0x1388;
  12.             base.Tick += new EventHandler(this.tickEvent);
  13.         }
  14.  
  15.         public void tickEvent(object sender, EventArgs e)
  16.         {
  17.             new WaveFileReader(@".\Scripts\Violin\1.wav");
  18.             WaveChannel32 waveProvider = new WaveChannel32(new WaveFileReader(@".\Scripts\Violin\1.wav"));
  19.             DirectSoundOut @out = new DirectSoundOut();
  20.             if (base.Player.Character.isDead)
  21.             {
  22.                 @out.Init(waveProvider);
  23.                 @out.Play();
  24.                 base.Wait(0x2710);
  25.                 @out.Stop();
  26.                 @out.Dispose();
  27.             }
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment