playeraudiosteam link help?
#1

Trying to make so you can put in URL link

pawn Код:
if(dialogid == 1339)
    {
        if(PlayerInfo[playerid][pAdministrator] >= 4)
        {
            new Float:aX, Float:aY, Float:aZ;
            GetPlayerPos(playerid, aX, aY, aZ);
pawn Код:
else if(listitem == 5)
            {
                if(IsPlayerInAnyVehicle(playerid))
                {
                    //SetPVarInt(playerid, "aURLrange");
                    ShowPlayerDialog(playerid, 1339, DIALOG_STYLE_INPUT, "Audio URL", "Enter Audio URL", "OK", "Cancel");
                }
Reply
#2

Mmm.. I didn't understand very well, what are you trying to do? Type a stream URL in a dialog and play it?
Reply
#3

Right, stream URL in a dialog.
Reply
#4

I just done this, give a try:
pawn Код:
if(strcmp(cmd, "/stream", true) == 0)
    {
        ShowPlayerDialog(playerid,1996,DIALOG_STYLE_INPUT,"Audio Streaming","Type the URL below:","Play","Exit");
        //http://k002.kiwi6.com/hotlink/732x86iw28/transformation.mp3  <-- Tested with this URL.
        return 1;
    }

//-----------------//
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1996) {
        if(response)  {
            new url[128];
            format(url,128,"%s",inputtext);
            PlayAudioStreamForPlayer(playerid,url);
        }
        return 1;
    }
    return 1;
}
It worked for me.
Reply
#5

Quote:
Originally Posted by irinel1996
Посмотреть сообщение
I just done this, give a try:
pawn Код:
if(strcmp(cmd, "/stream", true) == 0)
    {
        ShowPlayerDialog(playerid,1996,DIALOG_STYLE_INPUT,"Audio Streaming","Type the URL below:","Play","Exit");
        //http://k002.kiwi6.com/hotlink/732x86iw28/transformation.mp3  <-- Tested with this URL.
        return 1;
    }

//-----------------//
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1996) {
        if(response)  {
            new url[128];
            format(url,128,"%s",inputtext);
            PlayAudioStreamForPlayer(playerid,url);
        }
        return 1;
    }
    return 1;
}
It worked for me.
Thanks buddy, i will try this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)