SA-MP Forums Archive
radio help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: radio help (/showthread.php?tid=375948)



radio help - rumen98 - 08.09.2012

PHP код:
#include <a_samp>
#include <mxini>
#include <zcmd>
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/radio"cmdtexttrue10) == 0)
    {
        
ShowPlayerDialog(playerid,748,DIALOG_STYLE_INPUT,"Enter radio id","Enter Id","Go","Cancel");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
     if(
dialogid == 748)
     {
         new 
donate;
         new 
file ini_openFile("radio.ini");
        if(
ini_getInteger(fileinputtextdonate) == 0)
        {
            new 
string[256];
            
format(string,sizeof(string),"[Radio]You start Radio ID:%s",inputtext);
            new 
string2[256];
            
format(string2,sizeof(string2),"%s",donate);
            
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);
     }
    return 
1;

then type /radio and write ID 1 dont work
Dont Stream a radio only Write Audio Steam:
and then type in input dialog "1"
show me "[Radio]You Start Radio ID:53
why please help
here is my radio.ini file
PHP код:
ID RADIOURL
http://79.124.67.182:8030/listen.pls