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);
}
}
}