13.07.2010, 21:20
Alright, thanks for your help, I solved it, this did the trick:
This way the script keep checking if you are in the range of the point or not.
Thanks again!
Код:
for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
{
if(IsPlayerInRangeOfPoint(i, 15, 835.6853, -2019.2902, 12.8672))
{
if(muziekspelen[i] == 0)
{
muziekspelen[i] = 1;
GameTextForPlayer(i, "~w~Music is now ~g~on", 5000, 5);
PlayerPlaySound(i, 1068, 835.6853, -2019.2902, 12.8672);
}
//PlayerPlaySound(i, 1076, 0.0, 0.0, 10.0); //start music
}else{
if(muziekspelen[i] == 1)
{
muziekspelen[i] = 0;
GameTextForPlayer(i, "~w~Music is now ~r~off", 5000, 5);
PlayerPlaySound(i, 1069, 835.6853, -2019.2902, 12.8672);
}
//PlayerPlaySound(i, 1077, 0.0, 0.0, 10.0); // stop music
}
}
Thanks again!

