Music won't stop
#3

Nah, thats not what I want, I want the music to play automatic when somebody walks into the area, and it needs to stop automatic when he/she walks out of the area, now I tried this but it's still not working:

Код:
public isPlayerInArea()
{
   new Float:X, Float:Y, Float:Z; //We use this to store player position
   for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
   {
       GetPlayerPos(i, X, Y, Z); //Here we are storing the player position on the variables X, Y, and Z defined previously
       if (X <= 852.5654 && X >= 820.3245 && Y <= -2067.6201 && -2016.4636 >= 37)
       /* This line is the important one!. Here, is where you change those numbers, by the ones
       you get from the /pos command. As you can see, those coordinates, are only the X and Y ones, the Z
       doesnt matter*/
       {
           	PlayerPlaySound(i, 1076, 0.0, 0.0, 10.0); //start muziek
       }else{
       		PlayerPlaySound(i, 1077, 0.0, 0.0, 10.0); // stop muziek
       }
   }
}
Reply


Messages In This Thread
Music won't stop - by [KMA]DlennartD - 13.07.2010, 20:26
Re: Music won't stop - by felipex - 13.07.2010, 20:37
Re: Music won't stop - by [KMA]DlennartD - 13.07.2010, 20:42
Re: Music won't stop - by felipex - 13.07.2010, 20:49
Re: Music won't stop - by [KMA]DlennartD - 13.07.2010, 21:20

Forum Jump:


Users browsing this thread: 1 Guest(s)