09.10.2013, 18:08
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.
Help please.
#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;
}