[Ajuda] Radio dando erro
#1

Resolvido !
Reply
#2

Qual a linha 12 meu amigo.
Reply
#3

Resolvido !
Reply
#4

Testado!

pawn Код:
#include <a_samp>
#define ListadeMusica 9924
new EscutandoMusica[MAX_PLAYERS];
//-------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/radio",true) == 0)
    {
        new String[2000];
        format(String, sizeof(String), "Mc Kauan -{FF0000} Nos й os Meninos\n{FFFFFF}Mc Kauan -{FF0000} Mol Chavгo\n{FFFFFF}Mc Kauan -{FF0000} Mestre do Desastre\n{FFFFFF}Mc Kauan -{FF0000} Mestre das Fugas\n");
        format(String, sizeof(String), "%sMc Kauan -{FF0000} Elas nao usa Tamanquinho\n{FFFFFF}Mc Daleste -{FF0000} Angra dos Reis\n{FFFFFF}Mc Daleste -{FF0000} Eu descobri\n{FFFFFF}Mc Daleste -{FF0000} Mae de Traficante\n", String);
        format(String, sizeof(String), "%sMc Daleste -{FF0000} Nunca Vendeu Maconha\n{FFFFFF}Mc Magrinho -{FF0000} Empurra Empurra\n{FFFFFF}Mc Guime -{FF0000} Plaque de 100\n{FFFFFF}Mc Lon -{FF0000} Novinha vem que tem\n", String);
        format(String, sizeof(String), "%sMc Boy do Charme -{FF0000} Eles tao tirando onda\n{FFFFFF}Mc Roba Cena -{FF0000} Poxa vida em Uol\n{FF00FF}Parar de Tocar\n", String);
        ShowPlayerDialog(playerid, ListadeMusica, DIALOG_STYLE_LIST, "Musicas", String, "Ouvir", "Fechar");
        return true;
    }
    return false;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == ListadeMusica)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Kauan - Nos й os Meninos
                PlayAudioStreamForPlayer(playerid, "http://dc346.4shared.com/img/794250376/7ac85131/dlink__2Fdownload_2F52jIagtu_3Ftsid_3D20120930-221613-9dc7f8bb_26dsid_3Dhpx5e.cd20b199658b22c8d13f23c67dfd4f14/preview.mp3");
                return true;
            }
            if(listitem == 1)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Kauan - Mol Chavгo
                PlayAudioStreamForPlayer(playerid, "http://dc93.4shared.com/img/78252245/5073c61e/dlink__2Fdownload_2FZ7mYk7HX_3Ftsid_3D20110913-200010-e328e31c/preview.mp3");
                return true;
            }
            if(listitem == 2)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Kauan - Mestre do Desastre
                PlayAudioStreamForPlayer(playerid, "http://dc250.4shared.com/img/335123204/961f8bcd/dlink__2Fdownload_2Fr7HXE28I_3Ftsid_3D20110913-175631-2861127d/preview.mp3");
                return true;
            }
            if(listitem == 3)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Kauan - Mestre das Fugas
                PlayAudioStreamForPlayer(playerid, "http://dc251.4shared.com/img/308678631/27eddab7/dlink__2Fdownload_2FEMEhSFR2_3Ftsid_3D20110913-174425-f241abe5/preview.mp3");
                return true;
            }
            if(listitem == 4)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Kauan - Elas nгo usa tamanquinho
                PlayAudioStreamForPlayer(playerid, "http://dc424.4shared.com/img/746176870/4a5b610f/dlink__2Fdownload_2F1jcIn-qy_3Ftsid_3D20110913-180243-6044a397/preview.mp3");
                return true;
            }
            if(listitem == 5)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // MC Daleste - Angra dos reis
                PlayAudioStreamForPlayer(playerid, "http://dc219.4shared.com/img/749605517/c165f3d6/dlink__2Fdownload_2FJvaHFy98_3Ftsid_3D20110913-180147-b793cb74/preview.mp3");
                return true;
            }
            if(listitem == 6)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Daleste - Eu Descobri
                PlayAudioStreamForPlayer(playerid, "http://dc236.4shared.com/img/336902468/d2b9b027/dlink__2Fdownload_2FRL2oeFcS_3Ftsid_3D20110913-180245-7dc5917c/preview.mp3");
                return true;
            }
            if(listitem == 7)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                SendClientMessage(playerid, -1, "Essa Mъsica Pode Demorar 20 Segundos Para Tocar. Pois й Original.");
                // Mc Daleste - Mae de traficante
                PlayAudioStreamForPlayer(playerid, "http://dc152.4shared.com/img/125284859/2be1fc4d/dlink__2Fdownload_2Fi1kXd0e_5F_3Ftsid_3D20110913-180402-3df03ebb/preview.mp3");
                return true;
            }
            if(listitem == 8)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Daleste - Nunca Vendeu Maconha
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return true;
            }
            if(listitem == 9)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Magrinho - Empurra Empurra
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return true;
            }
            if(listitem == 10)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Guime - Plaque de 100
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return true;
            }
            if(listitem == 11)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Lon - Novinha vem que tem
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return true;
            }
            if(listitem == 12)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Boy do Charme - Eles tгo tirando onda
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return true;
            }
            if(listitem == 13)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Roba Cena - Poxa vida em Uol
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return true;
            }
            if(listitem == 14)
            {
                EscutandoMusica[playerid] = 0;
                SendClientMessage(playerid, -1, "{FF0000}Mъsica Desligada.");
                StopAudioStreamForPlayer(playerid);
                return true;
            }
            return true;
        }
        return true;
    }
    return true;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        if(EscutandoMusica[playerid] == 0)
        {
            new String[2000];
            format(String, sizeof(String), "Mc Kauan -{FF0000} Nos й os Meninos\n{FFFFFF}Mc Kauan -{FF0000} Mol Chavгo\n{FFFFFF}Mc Kauan -{FF0000} Mestre do Desastre\n{FFFFFF}Mc Kauan -{FF0000} Mestre das Fugas\n");
            format(String, sizeof(String), "%sMc Kauan -{FF0000} Elas nao usa Tamanquinho\n{FFFFFF}Mc Daleste -{FF0000} Angra dos Reis\n{FFFFFF}Mc Daleste -{FF0000} Eu descobri\n{FFFFFF}Mc Daleste -{FF0000} Mae de Traficante\n", String);
            format(String, sizeof(String), "%sMc Daleste -{FF0000} Nunca Vendeu Maconha\n{FFFFFF}Mc Magrinho -{FF0000} Empurra Empurra\n{FFFFFF}Mc Guime -{FF0000} Plaque de 100\n{FFFFFF}Mc Lon -{FF0000} Novinha vem que tem\n", String);
            format(String, sizeof(String), "%sMc Boy do Charme -{FF0000} Eles tao tirando onda\n{FFFFFF}Mc Roba Cena -{FF0000} Poxa vida em Uol\n{FF00FF}Parar de Tocar\n", String);
            ShowPlayerDialog(playerid, ListadeMusica, DIALOG_STYLE_LIST, "Musicas", String, "Ouvir", "Fechar");
            return true;
        }
    }
    else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
        StopAudioStreamForPlayer(playerid);
        EscutandoMusica[playerid] = 0;
    }
    return true;
}

testei aki e ouvi certinho teste tb ^^
Reply
#5

Resolvido !
Reply
#6

@Sim mais o que vc Passou abri ai nгo modifiquei ^^
Reply
#7

Resolvido !
Reply
#8

й nгo Olhei a fs direito so concertei ta blz pegue esta intгo


pawn Код:
#include <a_samp>
#define ListadeMusica 9924
new EscutandoMusica[MAX_PLAYERS];
//-------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/radio",true) == 0)
    {
        new String[2000];
        format(String, sizeof(String), "Mc Kauan -{FF0000} Nos й os Meninos\n{FFFFFF}Mc Kauan -{FF0000} Mol Chavгo\n{FFFFFF}Mc Kauan -{FF0000} Mestre do Desastre\n{FFFFFF}Mc Kauan -{FF0000} Mestre das Fugas\n");
        format(String, sizeof(String), "%sMc Kauan -{FF0000} Elas nao usa Tamanquinho\n{FFFFFF}Mc Daleste -{FF0000} Angra dos Reis\n{FFFFFF}Mc Daleste -{FF0000} Eu descobri\n{FFFFFF}Mc Daleste -{FF0000} Mae de Traficante\n", String);
        format(String, sizeof(String), "%sMc Daleste -{FF0000} Nunca Vendeu Maconha\n{FFFFFF}Mc Magrinho -{FF0000} Empurra Empurra\n{FFFFFF}Mc Guime -{FF0000} Plaque de 100\n{FFFFFF}Mc Lon -{FF0000} Novinha vem que tem\n", String);
        format(String, sizeof(String), "%sMc Boy do Charme -{FF0000} Eles tao tirando onda\n{FFFFFF}Mc Roba Cena -{FF0000} Poxa vida em Uol\n{FF00FF}Parar de Tocar\n", String);
        ShowPlayerDialog(playerid, ListadeMusica, DIALOG_STYLE_LIST, "Musicas", String, "Ouvir", "Fechar");
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == ListadeMusica)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Kauan - Nos й os Meninos
                PlayAudioStreamForPlayer(playerid, "http://dc346.4shared.com/img/794250376/7ac85131/dlink__2Fdownload_2F52jIagtu_3Ftsid_3D20120930-221613-9dc7f8bb_26dsid_3Dhpx5e.cd20b199658b22c8d13f23c67dfd4f14/preview.mp3");
                return 1;
            }
            if(listitem == 1)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Kauan - Mol Chavгo
                PlayAudioStreamForPlayer(playerid, "http://dc93.4shared.com/img/78252245/5073c61e/dlink__2Fdownload_2FZ7mYk7HX_3Ftsid_3D20110913-200010-e328e31c/preview.mp3");
                return 1;
            }
            if(listitem == 2)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Kauan - Mestre do Desastre
                PlayAudioStreamForPlayer(playerid, "http://dc250.4shared.com/img/335123204/961f8bcd/dlink__2Fdownload_2Fr7HXE28I_3Ftsid_3D20110913-175631-2861127d/preview.mp3");
                return 1;
            }
            if(listitem == 3)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Kauan - Mestre das Fugas
                PlayAudioStreamForPlayer(playerid, "http://dc251.4shared.com/img/308678631/27eddab7/dlink__2Fdownload_2FEMEhSFR2_3Ftsid_3D20110913-174425-f241abe5/preview.mp3");
                return 1;
            }
            if(listitem == 4)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Kauan - Elas nгo usa tamanquinho
                PlayAudioStreamForPlayer(playerid, "http://dc424.4shared.com/img/746176870/4a5b610f/dlink__2Fdownload_2F1jcIn-qy_3Ftsid_3D20110913-180243-6044a397/preview.mp3");
                return 1;
            }
            if(listitem == 5)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // MC Daleste - Angra dos reis
                PlayAudioStreamForPlayer(playerid, "http://dc219.4shared.com/img/749605517/c165f3d6/dlink__2Fdownload_2FJvaHFy98_3Ftsid_3D20110913-180147-b793cb74/preview.mp3");
                return 1;
            }
            if(listitem == 6)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Daleste - Eu Descobri
                PlayAudioStreamForPlayer(playerid, "http://dc236.4shared.com/img/336902468/d2b9b027/dlink__2Fdownload_2FRL2oeFcS_3Ftsid_3D20110913-180245-7dc5917c/preview.mp3");
                return 1;
            }
            if(listitem == 7)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                SendClientMessage(playerid, -1, "Essa Mъsica Pode Demorar 20 Segundos Para Tocar. Pois й Original.");
                // Mc Daleste - Mae de traficante
                PlayAudioStreamForPlayer(playerid, "http://dc152.4shared.com/img/125284859/2be1fc4d/dlink__2Fdownload_2Fi1kXd0e_5F_3Ftsid_3D20110913-180402-3df03ebb/preview.mp3");
                return 1;
            }
            if(listitem == 8)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Daleste - Nunca Vendeu Maconha
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return 1;
            }
            if(listitem == 9)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Magrinho - Empurra Empurra
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return 1;
            }
            if(listitem == 10)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Guime - Plaque de 100
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return 1;
            }
            if(listitem == 11)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Lon - Novinha vem que tem
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return 1;
            }
            if(listitem == 12)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Boy do Charme - Eles tгo tirando onda
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return 1;
            }
            if(listitem == 13)
            {
                if(EscutandoMusica[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк Jб Estб Escultando Mъsica, Desligue Ela");
                EscutandoMusica[playerid] = 1;
                // Mc Roba Cena - Poxa vida em Uol
                PlayAudioStreamForPlayer(playerid, "http://dc260.4shared.com/img/470143579/9ff3ce06/dlink__2Fdownload_2FHb6cQBGZ_3Ftsid_3D20110913-180637-6ee36551/preview.mp3");
                return 1;
            }
            if(listitem == 14)
            {
                EscutandoMusica[playerid] = 0;
                SendClientMessage(playerid, -1, "{FF0000}Mъsica Desligada.");
                StopAudioStreamForPlayer(playerid);
                return 1;
            }
        }
        return 1;
    }
    return 0;
}
Reply
#9

Resolvido !
Reply
#10

Arrumei ^^ copie di nv
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)