Help with *******_Stream.inc
#1

Hey guyss..!! I really need your help.
What's wrong with this code? this code is not working (Can not get data from link)

For example I use converter from convertmp3.io and Alan Walker - The Spectre song
Код:
convertmp3.io/fetch/?format=text&video=LINK
it would be like this
The page works well and shows like this

Код:
Title: Alan Walker - The Spectre
Length: 207
Link: https://www.convertmp3.io/download/get/?i=0KZqUN4qjeKFopUxwyYY1VoEeWAjteG9&e=78
And how to be able to play a song with links on that page?

This is the code to play songs from *******. This from my Gamemode

PHP код:
//PLAY ******* FUNCTION (GAMEMODE)
if(dialogid == DIALOG_AUDIOB1)
    {
        if(
response == 1)
        {
            if(
isnull(inputtext))
            {
                
SendClientMessageEx(playeridCOLOR_LIGHTBLUE"[SERVER-AUDIO] {FFFFFF}Masukkan URL Audio!");
            }
            if(
strlen(inputtext))
            {
                for(new 
iMAX_PLAYERS++)
                {
                    
Play*******StreamForPlayer(iinputtext);
                    
format(stringsizeof(string), "[SERVER-AUDIO] {FF0000}%s {FFFFFF}telah memutar sebuah lagu dari *******! Enjoy the song!"GetPlayerNameEx(playerid));
                    
SendClientMessageEx(iCOLOR_LIGHTBLUEstring);
                }
                
SVR******* 1;
            }
        }
    } 
And this code is from *******_stream.inc
PHP код:
stock Play*******StreamForPlayer(playeridurl[], Float:posX 0.0Float:posY 0.0Float:posZ 0.0Float:distance 50.0usepos 0)
{
    if(!
IsPlayerConnected(playerid))
        return 
false;
    
#if defined USE_REGEX
    
if(!IsValid*******Url(url))
    {
        if(!
Convert*******Url(url256))
            return 
false;
    }
    
#else
    
if(strfind(url"*********/") != -1)
        if(!
Convert*******Url(url256))
            return 
false;
    
#endif
    
static string[256];
    
format(stringsizeof(string), "convertmp3.io/fetch/?format=text&video=%s"url);
    
HTTP(playeridHTTP_GETstring"""*******Response");
    
*******_posX[playerid]        = posX;
    
*******_posY[playerid]        = posY;
    
*******_posZ[playerid]        = posZ;
    
*******_distance[playerid]    = distance;
    
*******_usepos[playerid]    = usepos;
    
*******_title[playerid]{0} = '\0';
    
*******_len[playerid] = 0;
    return 
true;
}
forward *******Response(playeridresponsedata[]);
public 
*******Response(playeridresponsedata[])
{
    if(
response == 200)
    {
        if(
strfind(data"No video was found") != -|| strfind(data"<meta http-equiv=") != -1)
        {
            
#if defined OnPlay*******Url
                
OnPlay*******Url(playerid"\0"0, -1);
            
#endif
            
return;
        }
        new
            
title[60],
            
len[5],
            
Find
        
;
        
Find strfind(data"<br/>");
        
strmid(titledata7Find-1);
        
strdel(data0Find+5);
        
Find strfind(data"<br/>");
        
strmid(lendata8Find-1);
        
strdel(data0Find+11);
        
strpack(*******_title[playerid], title);
        
*******_len[playerid] = strval(len);
        
PlayAudioStreamForPlayer(playeriddata*******_posX[playerid], *******_posY[playerid], *******_posZ[playerid], *******_distance[playerid], *******_usepos[playerid]);
        
#if defined *******_USE_TEXTDRAW
            
PlayerTextDrawSetString(playerid*******_textdraw[playerid], title);
            
PlayerTextDrawShow(playerid*******_textdraw[playerid]);
            print(
"Show");
        
#endif
        #if defined USE_TIMER
        
*******_timer[playerid] = SetTimerEx("intern_OnStopUrl"strval(len)*1000false"d"playerid);
        
#endif
        #if defined OnPlay*******Url
            
OnPlay*******Url(playeridtitlestrval(len), 1);
        
#endif
    
}
    else
    {
        
#if defined OnPlay*******Url
            
OnPlay*******Url(playerid"\0"0, -2);
        
#endif
    
}

Reply
#2

Correct me if I'm wrong, ******* streams isn't working since a long time ago..
Reply
#3

Quote:
Originally Posted by Verc
Посмотреть сообщение
Correct me if I'm wrong, ******* streams isn't working since a long time ago..
Yes, that does not work, because the converter of the include does not work. and I'm trying to update the converter to a different link (convertmp3.io). and it looks like convertmp3.io is not much different from the built-in converter from include
Reply
#4

Quote:
Originally Posted by Verc
Посмотреть сообщение
Correct me if I'm wrong, ******* streams isn't working since a long time ago..
And also, is there any new ******* player for SAMP for now? If there is, tell me I really need it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)