11.10.2015, 10:40
i've Create this ******* Play Music But i can't heart nothing Please help me
Help me +rep and Sry For My bad english
PHP код:
#define DIALOG_MUSIC 280
PHP код:
if(dialogid == DIALOG_MUSIC)
{
if(!response) return 1;
if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_MUSIC,DIALOG_STYLE_INPUT,"PlayTube by iRaiDeN", "Please input the URL of the song you want (Example: wwww.youtube.com/watch?v=VID Change the VID!)","Play","Cancel");
if(strfind(inputtext,"www.*******.com",true) == -1) return ShowPlayerDialog(playerid,DIALOG_MUSIC,DIALOG_STYLE_INPUT,"PlayTube", "Please input the URL of the song you want (Example: wwww.youtube.com/watch?v=VID Change the VID!)","Play","Cancel");
new localURL[128];
strmid(localURL,inputtext,strfind(inputtext, "v=")+2,strfind(inputtext, "v=")+19);
new localString[128];
format(localString, 128, "http://*******InMP3.com/fetch/?video=%s",localURL);
for(new i; i != MAX_PLAYERS; i++) PlayAudioStreamForPlayer(i,localString);
return 1;
}
PHP код:
CMD:ytplay(playerid, params[])
{
ShowPlayerDialog(playerid,DIALOG_MUSIC,DIALOG_STYLE_INPUT,"PlayTube by iRaiDeN", "Please input the URL of the song you want (Example: wwww.youtube.com/watch?v=VID Change the VID!)","Play","Cancel");
return 1;
}
CMD:ytstop(playerid, params[])
{
StopAudioStreamForPlayer(playerid);
return 1;
}