SA-MP Forums Archive
[AJUDA] Radio n funcionando - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Radio n funcionando (/showthread.php?tid=302239)



[AJUDA] Radio n funcionando - Aquilis - 08.12.2011

Alguйm sabe o pq n ta aparecendo o som?

pawn Код:
new RadioID[MAX_PLAYERS];
new Radio[MAX_PLAYERS];

    if(dialogid == 995)
    {
        switch(listitem)
        {
            case 0:
            {
                ChangeRadioStation(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1274603");
            }
            case 1:
            {
                ChangeRadioStation(playerid,  "http://yp.shoutcast.com/sbin/tunein-station.pls?id=2947897");
            }
            case 2:
            {
                ChangeRadioStation(playerid,  "http://yp.shoutcast.com/sbin/tunein-station.pls?id=616366");
            }
            case 3:
            {
                ChangeRadioStation(playerid,  "http://yp.shoutcast.com/sbin/tunein-station.pls?id=37586");
            }
            case 4:
            {
                ChangeRadioStation(playerid,  "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1177953");
            }
            case 5:
            {
                ChangeRadioStation(playerid,  "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280610");
            }
        }
    }


stock ChangeRadioStation(playerid, const url[])
{
    format(Radio[playerid],strlen(url), url);
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new Float:X, Float:Y, Float:Z, Float:Distance = 25.0;
            GetPlayerPos(i, X, Y, Z);
            StopAudioStreamForPlayer(i);
            PlayAudioStreamForPlayer(i, Radio[i], X, Y, Z, Distance, 1);
            RadioID[playerid] = i;
        }
    }
    return 0;
}



Re: [AJUDA] Radio n funcionando - Victor Cesaroni - 08.12.2011

Tenta assim;
pawn Код:
stock ChangeRadioStation(playerid, const url[])
{
    format(Radio[playerid],strlen(url), url);
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
           if(IsPlayerInAnyVehicle(i))
           {
               new Float:X, Float:Y, Float:Z, Float:Distance = 25.0;
               GetPlayerPos(i, X, Y, Z);
               StopAudioStreamForPlayer(i);
               PlayAudioStreamForPlayer(i, Radio[i], X, Y, Z, Distance, 1);
               RadioID[playerid] = i;
           }
        }
    }
    return 0;
}



Re: [AJUDA] Radio n funcionando - Aquilis - 08.12.2011

pawn Код:
stock ChangeRadioStation(playerid, const url[])
{
    format(Radio[playerid],strlen(url), url);
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new Float:X, Float:Y, Float:Z, Float:Distance = 25.0;
            GetPlayerPos(i, X, Y, Z);
            StopAudioStreamForPlayer(i);
            PlayAudioStreamForPlayer(i, Radio[i], X, Y, Z, Distance, 1);
            RadioID[playerid] = i;
        }
    }
    return 0;
}
Desculpe, й fora do veнculo que eu quero, coloquei aquilo sem querer, msm assim n funciona


Re: [AJUDA] Radio n funcionando - ViniBorn - 08.12.2011

Antes de mais nada.

Esses links funcionam fora do sistema?


Re: [AJUDA] Radio n funcionando - Aquilis - 08.12.2011

Ele executa td blz, atй aparece a mensagem do samp no chat com a url da mъsica, mas nгo executa... Ninguem ouve, e nem eu =/


Respuesta: [AJUDA] Radio n funcionando - ErickOwnZ - 08.12.2011

Quando й uma streaming Shoutcast vocк nгo precisa colocar o listen.pls, somente o IP da shoutcast que vai operar normalmente, porйm o SA:MP 0.3d nгo tem compatibilidade para codec AAC Plus.


Re: Respuesta: [AJUDA] Radio n funcionando - ReDKiiL - 08.12.2011

Quote:
Originally Posted by ErickOwnZ
Посмотреть сообщение
Quando й uma streaming Shoutcast vocк nгo precisa colocar o listen.pls, somente o IP da shoutcast que vai operar normalmente, porйm o SA:MP 0.3d nгo tem compatibilidade para codec AAC Plus.
Verdade Isso me Deu Raiva HUNF !!!


Re: [AJUDA] Radio n funcionando - Aquilis - 08.12.2011

Mas atй mъsicas .mp3 nгo rodam


Re: [AJUDA] Radio n funcionando - telmo_ferreira - 13.12.2011

Boas..
Experimenta meter apenas esse codigo para ver se ouves alguma coisa .
Код:
if (strcmp("/playradio", cmdtext, true) == 0)
    {
       SendClientMessage(playerid, COLOR_RED, "Radio XtremeMetal. Aguarda...");
       PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1275071");
       return 1;
    }