Music won't stop
#5

Alright, thanks for your help, I solved it, this did the trick:

Код:
	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
       }
   }
This way the script keep checking if you are in the range of the point or not.

Thanks again!
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: 2 Guest(s)