Audio
#7

Is that good?

Код:
#include <a_samp>

new OneTimeOnly[MAX_PLAYERS];


public OnPlayerUpdate(playerid)
{
   if(OneTimeOnly[playerid] == 0)
   {
      if(IsPlayerConnected(playerid) && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z)
      {
         PlayAudioStreamForPlayer(playerid, "link");
         OneTimeOnly[playerid] = 1;
         }
    	else
    	{
        StopAudioStreamForPlayer(playerid);
    	}
      if(IsPlayerConnected(playerid) && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z))
      {
         PlayAudioStreamForPlayer(playerid, "link");
         OneTimeOnly[playerid] = 1;
      }
      if(IsPlayerConnected(playerid) && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z)
      {
         PlayAudioStreamForPlayer(playerid, "link");
         OneTimeOnly[playerid] = 1;
      }
      if(IsPlayerConnected(playerid) && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z)
      {
         PlayAudioStreamForPlayer(playerid, "link");
         OneTimeOnly[playerid] = 1;
      }
      if(IsPlayerConnected(playerid) && IsPlayerInRangeOfPoint(playerid, 20.0, x, y, z))
      {
         PlayAudioStreamForPlayer(playerid, "link");
         OneTimeOnly[playerid] = 1;
      }
   }
   return 1;
}
Reply


Messages In This Thread
Audio - by PawelQ - 04.02.2014, 12:47
AW: Audio - by ReD_HunTeR - 04.02.2014, 14:28
Re: Audio - by PawelQ - 04.02.2014, 14:52
AW: Audio - by ReD_HunTeR - 04.02.2014, 17:31
Re: Audio - by PawelQ - 04.02.2014, 17:43
Re: Audio - by PawelQ - 04.02.2014, 17:52
Re: Audio - by PawelQ - 04.02.2014, 18:02
Re: Audio - by Vince - 04.02.2014, 18:48
Re: Audio - by PawelQ - 04.02.2014, 18:51
Re: Audio - by Vince - 04.02.2014, 20:13

Forum Jump:


Users browsing this thread: 1 Guest(s)