Woooohoooo !!!! smile it WORKS
THANK YOU VERY MUCH FOR YOUR HELP ALL

THE FINAL CODE:


#include <acknex.h>;
#include <default.c>;
BMAP* sight_png = "sight.png";
SOUND* shoot_wav = "gun_1.wav";
SOUND* explode_wav = "explode.wav";

var wavhandle;
var wavhandle2;

function gunsound();
function gunsound2();

function gunsound()
{
while(1)
{
if(mouse_left)
{
wavhandle = snd_play(explode_wav,50,2);
wait(-1);
// snd_remove(wavsound);
}
wait(1);
}
}


function gunsound2()
{
while(1)
{
if(mouse_right)
{
wavhandle2 = snd_play(shoot_wav,50,-2);
wait(-0.1);
// snd_remove(wavsound);
}
wait(1);
}
}



function main()
{
screen_size.x = 800; // set the screen size
screen_size.y = 600;
video_screen = 2; // Window mode

mouse_spot.x = bmap_width(sight_png) /2; // sets the mouse spot
mouse_spot.y = bmap_height(sight_png)/2;
mouse_map = sight_png; // mouse bitmap
mouse_mode = 1; //mouse mode

gunsound();
gunsound2();
while(1)
{
vec_set(mouse_pos,mouse_cursor);
wait(1);
}
} // end main

Last edited by warkarma; 05/25/09 19:13.

Trust NoOne (only me =])
_________________________