[Ajuda] Erro no meu Player de Musica
#1

Estou desenvolvendo uma Lista de musicas HipHop e da erro quando compila aew vai o cуdigo:
pawn Код:
#include <a_samp>

#define D_MUSICA    (993)

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" FS DE MUSICA HIP HOP [CLANdok]");
    print("--------------------------------------\n");
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/musica", true))
        return ShowPlayerDialog(playerid, D_MUSICA, DIALOG_STYLE_LIST, "Lista de Hip Hop","Ice Cube - it was a good day \nIce Cube - westside connection \nIce Cube - friday\nNotorious B.I.G - big poppa\nNotorious B.I.G - juicy\nNotorious B.I.G - mo money mo problems\nNotorious B.I.G - everyday struggle\n2 PAC - only god can judge me\n2 PAC - do for love\n2 PAC - hit em up\nCommon - love is\nCommon - the Light\n50 Cent - they burn me\n50 Cent - best friends","Reproducir","Salir");
    else if(!strcmp(cmdtext, "/nomusica", true))
        return StopAudioStreamForPlayer(playerid);

    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid){
        case D_MUSICA:
            if(response){
                switch(listitem){
                    case 0:
                    {
                        StopAudioStreamForPlayer(playerid);
                        PlayAudioStreamForPlayer(playerid, "http://austintownhall.com/wp-content/uploads/2008/12/itwasagoodday.mp3");
                    }
                    case 1:
                    {
                        StopAudioStreamForPlayer(playerid);
                        PlayAudioStreamForPlayer(playerid, "http://www.chinaskateboards.cn/UploadFile/200771114012454.mp3");
                    }
                    case 2:
                    {
                        StopAudioStreamForPlayer(playerid);
                        PlayAudioStreamForPlayer(playerid, "http://quietcolor.com/media/mp3/2009_1/Friday.mp3");
                    }
                    case 3:
                    {
                        StopAudioStreamForPlayer(playerid);
                        PlayAudioStreamForPlayer(playerid, "http://hillside-bullyz.com/media/Biggie_Smalls_-_Big_PaPa.mp3");
                    }
                    case 4:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://fuzi0n.free.fr/Notorious%20BIG%20-%20Juicy.mp3");
                       }
                    case 5:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://8106.tv/blog/audio/2009_02/money/04.mp3");
                       }
                    case 6:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_lpdzm33aFf1qgw1r9o1.mp3");
                       }
                    case 7:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://api.ning.com/files/lGusU0wbPXS10DwpJ79getmQJHHekhxnvokOtYexbNpkVmTYznxHINqIz6ezZqRAe4krFnR4v2H2niu1ebW219jFY3xM9jfL/ip9-d6Snfq6Xo5iKmZCKoZdoqJaja5G2nnaEWDU$.mp3");
                       }
                    case 8:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://prestige86.allmyblog.com/images/prestige86/prestige86_20060414_135940.mp3");
                       }
                    case 9:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://passionweiss.com/wp-content/uploads/2008/09/1-12-hit-em-up-1.mp3");
                       }
                       case 10:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://www.physics.sfsu.edu/~jgregory/life_shift/new/res/mp3s/Love_Is.mp3");
                       }
                      case 11:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://media.youthoutlook.org/audio/Common%20-The%20Light.mp3");
                       }
                   case 12:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://208.93.192.103/featuredAudio/17248.mp3");
                       }
                       case 13:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://damzikc.free.fr/Site/50%20cent/50%20Cent%20-%20Best%20Friends.mp3");
                       }
                }
            }
    }
    return 1;
}
Segue os erros:
pawn Код:
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(19) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(32) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(33) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(37) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(38) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(42) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(43) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(47) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(48) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(52) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(53) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(57) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(58) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(62) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(63) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(67) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(68) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(72) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(73) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(77) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(78) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(82) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(83) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(87) : error 017: undefined symbol "StopAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(88) : error 017: undefined symbol "PlayAudioStreamForPlayer"
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(92) : error 017: undefined symbol "StopAudioStreamForPlayer"

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
o Que devo fazer ? Obrigado!
Reply
#2

tenta colocar abaixo da include

pawn Код:
#include <a_samp>
isto

pawn Код:
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native StopAudioStreamForPlayer(playerid);
e ver se resolve
Reply
#3

Compilo,Valeu Brigadгo +1 Reputation , Mais agora sabe aode tem a Linha:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/musica", true))
        return ShowPlayerDialog(playerid, D_MUSICA, DIALOG_STYLE_LIST, "Lista de Hip Hop","Ice Cube - it was a good day \nIce Cube - westside connection \nIce Cube - friday\nNotorious B.I.G - big poppa\nNotorious B.I.G - juicy\nNotorious B.I.G - mo money mo problems\nNotorious B.I.G - everyday struggle\n2 PAC - only god can judge me\n2 PAC - do for love\n2 PAC - hit em up\nCommon - love is\nCommon - the Light\n50 Cent - they burn me\n50 Cent - best friends","Reproduzir","Sair");
    else if(!strcmp(cmdtext, "/pararmusica", true))
        return StopAudioStreamForPlayer(playerid);

    return 0;
}
No comando Parar musica Quado a pessoa desse o comando queria que Exibisse um Texto Dizendo que a Musica foi parada.
Reply
#4

PHP код:
    if(!strcmp(cmdtext"/musica"true))
        return 
ShowPlayerDialog(playeridD_MUSICADIALOG_STYLE_LIST"Lista de Hip Hop","Ice Cube - it was a good day \nIce Cube - westside connection \nIce Cube - friday\nNotorious B.I.G - big poppa\nNotorious B.I.G - juicy\nNotorious B.I.G - mo money mo problems\nNotorious B.I.G - everyday struggle\n2 PAC - only god can judge me\n2 PAC - do for love\n2 PAC - hit em up\nCommon - love is\nCommon - the Light\n50 Cent - they burn me\n50 Cent - best friends","Reproduzir","Sair");
    else if(!
strcmp(cmdtext"/pararmusica"true))
        
SendClientMessage(playerid, -1"Vocк parou a mъsica!");
        return 
StopAudioStreamForPlayer(playerid);

    return 
0;

Seria assim ?
Reply
#5

Sim funciono mais deu 3 avisos
pawn Код:
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(21) : warning 217: loose indentation
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(23) : warning 225: unreachable code
C:\Documents and Settings\Administrador\Desktop\sa-mp2\filterscripts\Musica.pwn(23) : warning 217: loose indentation
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.
Reply
#6

nao precisar usar o

pawn Код:
else
ali

basta

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/musica", true))
        return ShowPlayerDialog(playerid, D_MUSICA, DIALOG_STYLE_LIST, "Lista de Hip Hop","Ice Cube - it was a good day \nIce Cube - westside connection \nIce Cube - friday\nNotorious B.I.G - big poppa\nNotorious B.I.G - juicy\nNotorious B.I.G - mo money mo problems\nNotorious B.I.G - everyday struggle\n2 PAC - only god can judge me\n2 PAC - do for love\n2 PAC - hit em up\nCommon - love is\nCommon - the Light\n50 Cent - they burn me\n50 Cent - best friends","Reproduzir","Sair");
   
    if(!strcmp(cmdtext, "/pararmusica", true))
    {
        SendClientMessage(playerid, -1, "Vocк parou a mъsica!");
        StopAudioStreamForPlayer(playerid);
        return 1;
    }
   
    return 0;
}
Reply
#7

Valeu fiz isso ficando assim:
pawn Код:
#include <a_samp>
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native StopAudioStreamForPlayer(playerid);
#define D_MUSICA    (993)

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" FS DE MUSICA HIP HOP [CLANdok]");
    print("--------------------------------------\n");
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/musica", true))
        return ShowPlayerDialog(playerid, D_MUSICA, DIALOG_STYLE_LIST, "Lista de Hip Hop","Ice Cube - it was a good day \nIce Cube - westside connection \nIce Cube - friday\nNotorious B.I.G - big poppa\nNotorious B.I.G - juicy\nNotorious B.I.G - mo money mo problems\nNotorious B.I.G - everyday struggle\n2 PAC - only god can judge me\n2 PAC - do for love\n2 PAC - hit em up\nCommon - love is\nCommon - the Light\n50 Cent - they burn me\n50 Cent - best friends","Reproduzir","Sair");

    if(!strcmp(cmdtext, "/pararmusica", true))
    {
        SendClientMessage(playerid, -1, "Vocк parou a mъsica, Digite {FF0000}/musica{FF0000} Para continuar a ouvir.");
        StopAudioStreamForPlayer(playerid);
        return 1;
    }

    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid){
        case D_MUSICA:
            if(response){
                switch(listitem){
                    case 0:
                    {
                        StopAudioStreamForPlayer(playerid);
                        PlayAudioStreamForPlayer(playerid, "http://austintownhall.com/wp-content/uploads/2008/12/itwasagoodday.mp3");
                    }
                    case 1:
                    {
                        StopAudioStreamForPlayer(playerid);
                        PlayAudioStreamForPlayer(playerid, "http://www.chinaskateboards.cn/UploadFile/200771114012454.mp3");
                    }
                    case 2:
                    {
                        StopAudioStreamForPlayer(playerid);
                        PlayAudioStreamForPlayer(playerid, "http://quietcolor.com/media/mp3/2009_1/Friday.mp3");
                    }
                    case 3:
                    {
                        StopAudioStreamForPlayer(playerid);
                        PlayAudioStreamForPlayer(playerid, "http://hillside-bullyz.com/media/Biggie_Smalls_-_Big_PaPa.mp3");
                    }
                    case 4:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://fuzi0n.free.fr/Notorious%20BIG%20-%20Juicy.mp3");
                       }
                    case 5:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://8106.tv/blog/audio/2009_02/money/04.mp3");
                       }
                    case 6:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_lpdzm33aFf1qgw1r9o1.mp3");
                       }
                    case 7:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://api.ning.com/files/lGusU0wbPXS10DwpJ79getmQJHHekhxnvokOtYexbNpkVmTYznxHINqIz6ezZqRAe4krFnR4v2H2niu1ebW219jFY3xM9jfL/ip9-d6Snfq6Xo5iKmZCKoZdoqJaja5G2nnaEWDU$.mp3");
                       }
                    case 8:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://prestige86.allmyblog.com/images/prestige86/prestige86_20060414_135940.mp3");
                       }
                    case 9:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://passionweiss.com/wp-content/uploads/2008/09/1-12-hit-em-up-1.mp3");
                       }
                       case 10:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://www.physics.sfsu.edu/~jgregory/life_shift/new/res/mp3s/Love_Is.mp3");
                       }
                      case 11:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://media.youthoutlook.org/audio/Common%20-The%20Light.mp3");
                       }
                   case 12:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://208.93.192.103/featuredAudio/17248.mp3");
                       }
                       case 13:
                    {
                       StopAudioStreamForPlayer(playerid);
                       PlayAudioStreamForPlayer(playerid, "http://damzikc.free.fr/Site/50%20cent/50%20Cent%20-%20Best%20Friends.mp3");
                       }
                }
            }
    }
    return 1;
}
Agora queria saber como fasso para criar uma lista de generos de musicas e quando a pessoa clikar ir para uma lista de musicas
Reply
#8

e apenas criando 1 sequencia de dialogs simples

pensa cmg

o player quando digita o comando aparece uma dialog ( com os tipos ) essa dialog leva a outra que mostra as musicas e as faz reproduzir.. logo e

comando > dialog dos tipos > dialog das musicas do genero > reproduзгo

espero que consiga me entender.
Reply
#9

Quote:
Originally Posted by PT
Посмотреть сообщение
e apenas criando 1 sequencia de dialogs simples

pensa cmg

o player quando digita o comando aparece uma dialog ( com os tipos ) essa dialog leva a outra que mostra as musicas e as faz reproduzir.. logo e

comando > dialog dos tipos > dialog das musicas do genero > reproduзгo

espero que consiga me entender.
ntendo sim o poblema й que sou Super iniciante Sou o "Landerson" cara to nesse area a 7 dias. dava pra voзe me mandar um ex de como eu fasso ?
Reply
#10

isto aqui

https://sampforum.blast.hk/showthread.php?tid=247845

te ajudara.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)