How would I go about using the input dialog
#1

I want to make it so the dialogue shows and asks for an audio URL and when you insert one in, an audio stream plays from the link you in putted.

Help please.
Reply
#2

I think it would look something like this:
pawn Код:
#define DIALOG_MUSIC 545
CMD:music(playerid,params[])
{
    ShowPlayerDialog(playerid,DIALOG_MUSIC,DIALOG_STYLE_INPUT,"Music Player","Please enter the exact URL for the audio file!","Play","Close");
   
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
     switch(dialogid)
    {  
        new Float:x,Float:y,Float:z;
        GetPlayerPos(playerid,x,y,z);
        case DIALOG_MUSIC:
        {
            PlayAudioStreamForPlayer(playerid, inputtext, x, y, z, 50.0, 0);
        }
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)