pawn Код:
//Radio System v1.0 Created by GBLTeam and updated By Xtreme_playa[by making it Plugin-Free] for 0.3d and above
//Please dont remove this Credits.. Thanks for using our FS
//------------[UPDATED 12.02.2012]-----------------------------//
#pragma tabsize 0
#include <a_samp>
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native StopAudioStreamForPlayer(playerid);
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define RADIO 3000
public OnFilterScriptInit()
{
print(" ..::: Radio System 1.0 by GBLTeam and Xtreme_playa [Plugin Free] :::..");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(r, 1, cmdtext);
return 0;
}
dcmd_r(playerid, params[])
{
#pragma unused params
ShowPlayerDialog(playerid,RADIO,DIALOG_STYLE_LIST,"Radio Stations","Jazz\nRock\nR&B\nCinemix\nReggae141\nInfowars\nGangsta Rap\nElectronic\nHip Hop\nXtreme Metal\nMetal\nDancepunk\nTrance\nUG Rap\nUrban\nAdult Comedy\nLatin\nHardcore Metal\nCountry\nMisc\n80's Gold\nFolk\nTop 40\nBritpop\nFunk\nSoul\nWoowop\nEnergy98\nTeenpop\nSTOP RADIO","Select","Exit");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == RADIO)
{
if(response)
{
if(listitem == 0)// (0-Jazz Radio)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=674096");
GameTextForPlayer(playerid, "Playing JAZZ RADIO...",2500,3);
}
if(listitem == 1)// (1-.977(Rock))
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280356");
GameTextForPlayer(playerid, "Playing 977FM...",2500,3);
}
if(listitem == 2)// (2-181FM(R&B)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=83968");
GameTextForPlayer(playerid, "Playing 181FM...",2500,3);
}
if(listitem == 3)// (3-Cinemix(CLassical))
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=614375");
GameTextForPlayer(playerid, "Playing CINEMIX...",2500,3);
}
if(listitem == 4)// (4-Reggae141)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280855");
GameTextForPlayer(playerid, "Playing REGGAE141...",2500,3);
}
if(listitem == 5)// (5-Infowars(Real talk))
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1026951");
GameTextForPlayer(playerid, "Playing INFOWARS...",2500,3);
}
if(listitem == 6)// (6-Gangsta Rap)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=13309");
GameTextForPlayer(playerid, "Playing GANGSTA RAP...",2500,3);
}
if(listitem == 7)// (7-Electronic)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377200");
GameTextForPlayer(playerid, "Playing ELECTRONIC...",2500,3);
}
if(listitem == 8)// (8-HotJamz(Hip Hop))
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
GameTextForPlayer(playerid, "Playing HOT JAMZ...",2500,3);
}
if(listitem == 9)// (9-Xtreme(Metal))
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1275071");
GameTextForPlayer(playerid, "Playing XTREME-METAL...",2500,3);
}
if(listitem == 10)// (10-Metal)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280610");
GameTextForPlayer(playerid, "Playing METAL...",2500,3);
}
if(listitem == 11)// (11-Dancepunk)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1267576");
GameTextForPlayer(playerid, "Playing DANCEPUNK...",2500,3);
}
if(listitem == 12)// (12-Trance)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1193516");
GameTextForPlayer(playerid, "Playing TRANCE...",2500,3);
}
if(listitem == 13)// (13- UG Rap)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=9054");
GameTextForPlayer(playerid, "Playing UG RAP...",2500,3);
}
if(listitem == 14)// (14-Urban)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=2897571");
GameTextForPlayer(playerid, "Playing URBAN...",2500,3);
}
if(listitem == 15)// (15-Adult Comedy)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=52807");
GameTextForPlayer(playerid, "Playing ADULT COMEDY...",2500,3);
}
if(listitem == 16)// (16-Latin)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=56349");
GameTextForPlayer(playerid, "Playing LATIN...",2500,3);
}
if(listitem == 17)// (17-Hardcore)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377376");
GameTextForPlayer(playerid, "Playing HARDCORE METAL...",2500,3);
}
if(listitem == 18)// (18-Country)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=2235429");
GameTextForPlayer(playerid, "Playing COUNTRY...",2500,3);
}
if(listitem == 19)// (19-Misc)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=130231");
GameTextForPlayer(playerid, "Playing MISC...",2500,3);
}
if(listitem == 20)// (20-80's GOLD)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=737152");
GameTextForPlayer(playerid, "Playing 80'S GOLD...",2500,3);
}
if(listitem == 21)// (21-Folk)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=251809");
GameTextForPlayer(playerid, "Playing FOLK...",2500,3);
}
if(listitem == 22)// (22-Top 40)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=663859");
GameTextForPlayer(playerid, "Playing TOP 40...",2500,3);
}
if(listitem == 23)// (23-Britpop)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=2221214");
GameTextForPlayer(playerid, "Playing Britpop...",2500,3);
}
if(listitem == 24)// (24-Funk)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1269641");
GameTextForPlayer(playerid, "Playing FUNK...",2500,3);
}
if(listitem == 25)// (25-Soul)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=185293");
GameTextForPlayer(playerid, "Playing Soul...",2500,3);
}
if(listitem == 26)// (26-Woowop)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=727560");
GameTextForPlayer(playerid, "Playing Woowop...",2500,3);
}
if(listitem == 27)// (27-Energy98)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=221706");
GameTextForPlayer(playerid, "Playing Energy98...",2500,3);
}
if(listitem == 28)// (28-Teenpop)
{
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=255961");
GameTextForPlayer(playerid, "Playing Teenpop...",2500,3);
}
if(listitem == 29)// (STOP RADIO)
{
StopAudioStreamForPlayer(playerid);
GameTextForPlayer(playerid, "RADIO ~r~STOPPED !",2500,3);
}
}
return 1;
}
return 0;
}
not sure if understood correctly..
As you are using dcmd, just change the command name and define to the one you would like to change.