Radio URL
#1

Hi i have problem with radio URL.Like i want to make radio link to URL.Like this "http://www.ehr.lv/" I want to make it as URL and place in my radio system.And Please can you say how to make as URL.

This is the filterscript what i use.



pawn Код:
#include <a_samp>

#define DEIALOG_ID 7777

new radiolist[][][] =
{
    {"http://scfire-ntc-aa04.stream.aol.com:80/stream/1071","HOT 108 JAMZ"},
    {"http://scfire-mtc-aa05.stream.aol.com:80/stream/1003","Trance Channel"},
    {"http://www.ehr.lv/","idobi Radio"},
    {"http://80.237.153.76:21000","MUSIK.DRUMSTEP"},
    {"http://scfire-mtc-aa04.stream.aol.com:80/stream/1023","181FM POP"},
    {"http://scfire-dtc-aa05.stream.aol.com:80/stream/1074","977 The Hitz Channel"},
    {"http://scfire-ntc-aa04.stream.aol.com:80/stream/1093","Energy 98"},
    {"http://72.232.2.83:8000","DUBSTEP.FM"},
    {"http://81.218.219.203:8000","Pulse-FM Israel"},
    {"http://icecast.clickfm.co.il:8002/click2dance","Click2Dance IL"}
};
new bool:Radio[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/radio",true))
    {
        new list[500];
        for(new i; i <= sizeof(radiolist); i++)
        {
            if(i == sizeof(radiolist)) format(list,500,"%s\n \n{FF0000}Stop Lisenig",list);
            else format(list,500,"%s\n{FAFAFA}%02d) {FF9900}%s",list,i+1,radiolist[i][1]);
        }
        ShowPlayerDialog(playerid,DEIALOG_ID,DIALOG_STYLE_LIST,"{00C8C8}Please select a Station",list,"Play","Close");
        return 1;
    }

    if(!strcmp(cmdtext,"/music-all-off",true) && IsPlayerAdmin(playerid))
    {
        for(new i,m=GetMaxPlayers(); i < m; i++) if(IsPlayerConnected(i) && Radio[i]) StopAudioStreamForPlayer(i),Radio[i] = false;
        return 1;
    }

    if(!strcmp(cmdtext,"/minfo",true)) return SendClientMessage(playerid,0xFFFFFFAA,"Radio List [V0.4] | By: BlueRey © Fxp.co.il"); // do not remove
   
    if(!strcmp(cmdtext,"/moff",true))
    {
        StopAudioStreamForPlayer(playerid);
        Radio[playerid] = false;
        return 1;
    }
    return 0;
}

public OnPlayerConnect(playerid) Radio[playerid] = false;

public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
{
    if(!response) return 1;
    if(dialogid == DEIALOG_ID)
    {
        if(listitem == sizeof(radiolist)) return OnPlayerCommandText(playerid,"/radio");
        if(listitem == sizeof(radiolist)+1) return StopAudioStreamForPlayer(playerid),Radio[playerid] = false;
        StopAudioStreamForPlayer(playerid);
        PlayAudioStreamForPlayer(playerid,radiolist[listitem][0]);
        new str[50]; format(str,50,"Now listening to \"%s\"...",radiolist[listitem][1]);
        SendClientMessage(playerid,0x33CCFFAA,str);
        SendClientMessage(playerid,0xFFFFFFAA,"Stop listening: /MOFF");
        Radio[playerid] = true;
        return 1;
    }
    return 0;
}
Reply
#2

redirect?
Reply
#3

What redirect ?
Reply
#4

Try this here:

Код:
CMD:radio (playerid, params[])
{
PlayAudioStreamForPlayer(playerid, "http://www.ehr.lv/"); // Your Radio URL
}
Reply
#5

Don't work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)