Portal SAMP
[Ajuda] Jbl - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] Jbl (/showthread.php?tid=1569)

Páginas: 1 2


RE: Jbl - xbruno1000x - 31/08/2021

Código:
//===================================== Sistema de JBL ========================================
        for(new j; j < MAX_SOM_TOTAL; j++)
        {
              if(!ChegouPerto[i])
               {
                  if(!TotalJBL[j])
                    continue;

                  if(IsPlayerInRangeOfPoint(i, DistanciaJBL, CorXJBL[j], CorYJBL[j], CorZJBL[j]))
                {
                    PlayerX[i] = CorXJBL[j];
                    PlayerY[i] = CorYJBL[j];
                    PlayerZ[i] = CorZJBL[j];
                    ChegouPerto[i] = 1;
                    Player[i][EscutandoMusica] = false;
                    StopAudioStreamForPlayer(i);

                    if(!strcmp(CapturarSom[j], "Radio"))
                        PlayAudioStreamForPlayer(i, "http://"URL_RADIO"", PlayerX[i], PlayerY[i], PlayerZ[i],DistanciaJBL,1);
                    else
                        PlayAudioStreamForPlayer(i, CapturarSom[j], PlayerX[i], PlayerY[i], PlayerZ[i],DistanciaJBL,1);
                    }
            }
            else if(ChegouPerto[i] == 1)
            {
                if(!TotalJBL[j])
                    continue;

                if(!IsPlayerInRangeOfPoint(i, DistanciaJBL, PlayerX[i], PlayerY[i], PlayerZ[i]))
                {
                    PlayerX[i] = PlayerY[i] = PlayerZ[i] = ChegouPerto[i] = 0;
                    StopAudioStreamForPlayer(i);
                }

            }

        }