who can help me ??
#1

PHP код:
     if(dialogid == 366)
     {
         new 
url;
         new 
file ini_openFile("radio.ini");
        if(
ini_getInteger(fileinputtexturl) == 0)
        {
            new 
string[256];
            
format(string,sizeof(string),"[Radio]You start Radio ID:%s",inputtext);
            new 
string2[256];
            
format(string2,sizeof(string2),"http://%d/listen.pls",url);
            
PlayAudioStreamForPlayer(playeridstring2 );
            
SendClientMessage(playerid,-1,string);
        }
        else
        {
            new 
string2[256];
            
format(string2,sizeof(string2),"[Radio]Invalid ID:%s",inputtext);
            
SendClientMessage(playerid,-1,string2);
        }
        
iniClose(file);
     } 
what params need to use to format this
PHP код:
79.124.67.182:8030 
in this line whats need ? %d dont work
PHP код:
format(string2,sizeof(string2),"http://%d/listen.pls",url); 
Reply
#2

URL's are strings, so you need %s instead of %d
Reply
#3

Quote:
Originally Posted by Pangea
Посмотреть сообщение
URL's are strings, so you need %s instead of %d
do not work :X:X write me Audio Steam: http://O/listen.pls
Reply
#4

Please help me
Reply
#5

try to use %f , not really sure
Reply
#6

You didn't define the variable url as a string.
Modify your code so the variable actually is a string. And make sure you save it in the variable as such.
Reply
#7

Quote:
Originally Posted by Pangea
Посмотреть сообщение
You didn't define the variable url as a string.
Modify your code so the variable actually is a string. And make sure you save it in the variable as such.
i dont know how to modift can you help ?
Reply
#8

Try this:

Код:
if(dialogid == 366) 
     { 
        new url[124]; 
        new file = ini_openFile("radio.ini"); 
        if(ini_getInteger(file, inputtext, url) == 0) 
        { 
            new string[256]; 
            format(string,sizeof(string),"[Radio]You start Radio ID:%s",inputtext); 
            new string2[256]; 
            format(string2,sizeof(string2),"http://%s/listen.pls",url); 
            PlayAudioStreamForPlayer(playerid, string2 ); 
            SendClientMessage(playerid,-1,string); 
        } 
        else 
        { 
            new string2[256]; 
            format(string2,sizeof(string2),"[Radio]Invalid ID:%s",inputtext); 
            SendClientMessage(playerid,-1,string2); 
        } 
        iniClose(file); 
     }
Also, to format the IP you use "%s" as it counts as a string.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)