13.07.2010, 20:42
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 } } }