Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:carradio(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new stringy[MAX_STRING],strings[500],listen[20];
- for(new x; x < 20; x++)
- {
- foreach(new i : Player)
- {
- if(Listening[i] == x) listen[x]++;
- }
- }
- format(strings, sizeof(strings), "Radio station\tListeners\n{FF2080}Turn Off Radio\t\nPro FM Romania\t%d\nRadio Bandit Romania\t%d\nRadio Taraf Romania\t%d\nRadio Hot Romania\t%d\nRadio Gangsta Dance\t%d\nRadio Gangsta Manele\t%d\n.977 Hitz\t%d\n",listen[0],listen[1],listen[2],listen[3],listen[4],listen[5],listen[6]);
- strcat(stringy, strings);
- format(strings, sizeof(strings), ".977 Mix\t%d\n.977 Alternative\t%d\nRadio BBC One UK\t%d\nDubstep.fm\t%d\nRadio Hit Romania\t%d\nRadio ClubMix Romania\t%d\nKiss FM Romania [Audio Plugin]\t%d\nRadio Zu Romania [Audio Plugin]\t%d\n",listen[7],listen[8],listen[9],listen[10],listen[11],listen[12],listen[13],listen[14]);
- strcat(stringy, strings);
- format(strings, sizeof(strings), "Radio Popular\t%d\nTrap.FM\t%d\nRadio Tequila Hip Hop\t%d\nYoutube Music/Custom URL\t%d",listen[15],listen[16],listen[17],listen[18]);
- strcat(stringy, strings);
- ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_TABLIST_HEADERS, "Vehicle Radio", stringy, "Play", "Cancel");
- }
- return 1;
- }
- CMD:carmusic(playerid, params[])
- {
- if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
- return cmd_carradio(playerid, params);
- }
- if(dialogid == DIALOG_RADIO)
- {
- if(response)
- {
- new strings[128],name[30],so;
- GetPlayerName(playerid, name, sizeof(name));
- if(listitem == 0)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- vehRadio[vehicleid] = 0;
- format(strings, sizeof(strings), "* %s turned off radio.",name);
- }
- if(listitem == 1)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://stream.profm.ro:8012/profm.mp3");
- vehRadio[vehicleid] = 1;
- format(strings, sizeof(strings), "* %s changed the radio station to Pro FM Romania.",name);
- }
- if(listitem == 2)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://live.radiobandit.ro:8000");
- vehRadio[vehicleid] = 2;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio Bandit Romania.",name);
- }
- if(listitem == 3)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://radiotaraf.com/live.m3u");
- vehRadio[vehicleid] = 3;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio Taraf Romania.",name);
- }
- if(listitem == 4)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://live.radiohot.ro:8000/");
- vehRadio[vehicleid] = 4;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio Hot Romania.",name);
- }
- if(listitem == 5)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://dance.radiogangsta.ro:8800");
- vehRadio[vehicleid] = 5;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio Gangsta Dance.",name);
- }
- if(listitem == 6)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://live.radiogangsta.ro:8800");
- vehRadio[vehicleid] = 6;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio Gangsta Manele.",name);
- }
- if(listitem == 7)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://7619.live.streamtheworld.com:80/977_HITS_SC");
- vehRadio[vehicleid] = 7;
- format(strings, sizeof(strings), "* %s changed the radio station to .977 Hitz.",name);
- }
- if(listitem == 8)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://7639.live.streamtheworld.com:80/977_MIX_SC");
- vehRadio[vehicleid] = 8;
- format(strings, sizeof(strings), "* %s changed the radio station to .977 Mix.",name);
- }
- if(listitem == 9)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://7579.live.streamtheworld.com:80/977_ALTERN_SC");
- vehRadio[vehicleid] = 9;
- format(strings, sizeof(strings), "* %s changed the radio station to .977 Alternative.",name);
- }
- if(listitem == 10)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://www.listenlive.eu/bbcradio1.m3u");
- vehRadio[vehicleid] = 10;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio BBC One UK.",name);
- }
- if(listitem == 11)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://dubstep.fm/128.pls");
- vehRadio[vehicleid] = 11;
- format(strings, sizeof(strings), "* %s changed the radio station to Dubstep.fm.",name);
- }
- if(listitem == 12)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://www.radio-hit.ro/asculta.m3u");
- vehRadio[vehicleid] = 12;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio Hit Romania.",name);
- }
- if(listitem == 13)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://live.radioclubmix.ro:9999");
- vehRadio[vehicleid] = 13;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio ClubMix Romania.",name);
- }
- if(listitem == 14)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://80.86.106.136/listen.pls");
- vehRadio[vehicleid] = 14;
- format(strings, sizeof(strings), "* %s changed the radio station to Kiss FM Romania [Audio Plugin].",name);
- }
- if(listitem == 15)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://www.radiozu.ro/live.m3u");
- vehRadio[vehicleid] = 15;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio Zu Romania [Audio Plugin].",name);
- }
- if(listitem == 16)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://livemp3.radiopopular.ro:7777");
- vehRadio[vehicleid] = 16;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio Popular.",name);
- }
- if(listitem == 17)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://radio.trap.fm/listen128.pls");
- vehRadio[vehicleid] = 17;
- format(strings, sizeof(strings), "* %s changed the radio station to Trap.FM.",name);
- }
- if(listitem == 18)
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, "http://radiotequila.ro/hiphop.m3u");
- vehRadio[vehicleid] = 18;
- format(strings, sizeof(strings), "* %s changed the radio station to Radio Tequila Hip Hop.",name);
- }
- if(listitem == 19)
- {
- ShowPlayerDialog(playerid, DIALOG_CUSTOMRADIO, DIALOG_STYLE_INPUT, "Custom Url", "Enter a URL:", "Play", "Cancel");
- so = 1;
- }
- if(so != 1)
- {
- ProxDetector(20.0, playerid, strings, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- Listening[playerid] = listitem-1;
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_CUSTOMRADIO)
- {
- if(response)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new stringg[128],length,name[30];
- if(strfind(inputtext, "youtube.com", true) != -1)
- {
- length = strlen(inputtext)-11;
- strdel(inputtext, 0, length);
- format(stringg, sizeof(stringg), "http://youtubeplaylist-mp3.com/download/index/%s",inputtext);
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, stringg);
- format(customRadio[GetPlayerVehicleID(playerid)], 128, stringg);
- vehRadio[GetPlayerVehicleID(playerid)] = 19;
- GetPlayerName(playerid, name, sizeof(name));
- format(stringg, sizeof(stringg), "* %s changed the radio station to Custom URL.",name);
- ProxDetector(20.0, playerid, stringg, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- Listening[playerid] = 18;
- }
- else
- {
- StopAudioStreamForPlayersInCar(vehicleid);
- PlayAudioStreamForPlayersInCar(vehicleid, inputtext);
- format(customRadio[GetPlayerVehicleID(playerid)], 128, inputtext);
- vehRadio[GetPlayerVehicleID(playerid)] = 19;
- GetPlayerName(playerid, name, sizeof(name));
- format(stringg, sizeof(stringg), "* %s changed the radio station to Custom URL.",name);
- ProxDetector(20.0, playerid, stringg, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- Listening[playerid] = 18;
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment