08.09.2012, 16:58
PHP код:
#include <a_samp>
#include <mxini>
#include <zcmd>
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/radio", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,748,DIALOG_STYLE_INPUT,"Enter radio id","Enter Id","Go","Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 748)
{
new donate;
new file = ini_openFile("radio.ini");
if(ini_getInteger(file, inputtext, donate) == 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(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);
}
return 1;
}
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
1 = http://79.124.67.182:8030/listen.pls