[Ajuda] Com Dialog de Input
#1

O cara digita musica no input e ela toca simples nгo?
Sн que nгo pega e nao manda e messagem ela manda, mas sem texto e nao toca nada tbm

pawn Код:
if(dialogid == 5)
    {
        if(!strlen(inputtext))
        {
            SendClientMessage(playerid,0x00000000, "Escreva algo!");
            return 1;
        }
        new audio = strval(inputtext);
        new link[128];
        format(link,128,"%s",audio);
        SendClientMessage(playerid,0xFFFFFFFF,link);
        PlayAudioStreamForPlayer(playerid,link);
    }
Reply
#2

Vocк sabe pra que serve este 'strval(inputtext);' ?

@EDIT

Creio que nгo...

pawn Код:
new audio = strval(inputtext); // strval = converter string em integer
new link[128];
format(link, 128, "%s", audio); //como aqui vocк pretende imprimir uma integer com %string ?
SendClientMessage(playerid,0xFFFFFFFF,link);
PlayAudioStreamForPlayer(playerid,link);
Localizou algum erro?
Reply
#3

Sim, o tuto q eu lide nгo mencionou que era itenger...

Qual й o de string?
Reply
#4

ao meu ver se usaria apenas...
pawn Код:
if(dialogid == 5)
    {
        if(!strlen(inputtext))
        {
            SendClientMessage(playerid,0x00000000, "Escreva algo!");
            return 1;
        }
        new link[128];
        format(link,128,"%s",inputtext);
        SendClientMessage(playerid,0xFFFFFFFF,link);
        PlayAudioStreamForPlayer(playerid,link);
    }
Tente...
Reply
#5

Obrigado professor...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)