Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if defined proking
- ================================Made by proking=================================
- ================================================================================
- This filterscript is created by proking and He reserved all the copyrights ©.
- If you want to use this script, Please don't remove the credits.
- ================================================================================
- ================================================================================
- Thanks to:
- Y_Less for his impressive foreach,
- ZeeX for his ZCMD,
- jueix for his tutorial.
- Babul for a dialog bug fixing.
- Ammo for testing the script.
- Shoutcast.com for links.
- ================================================================================
- ================================================================================
- Version 1.4ß (Beta) Features:
- ------------------------------------------------------
- | Only work in vehicles. |
- | When you exit from vehicles radio stop automatically.|
- | Only Best Radio stations are selected. |
- ------------------------------------------------------
- ================================================================================
- #endif
- //================================[INCLUDES]====================================
- #include <a_samp>
- #include <ZCMD>
- #include <foreach>
- //==============================[COLORS DEFINES]================================
- #define color1 0xB4B5B7FF
- #define color2 0xBFC0C2FF
- #define color3 0xCBCCCEFF
- #define radcat 327
- WasteDeAMXersTime()
- {
- new b;
- #emit load.pri b
- #emit stor.pri b
- }
- public OnFilterScriptInit()
- {
- WasteDeAMXersTime();
- print("=======================================");
- print("Radio Filter Script by proking - LOADED");
- print("=======================================");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("==========================================");
- print("Radio Filter Script by proking - UN-LOADED");
- print("==========================================");
- return 1;
- }
- //==============================[Radio Command]=================================
- CMD:radio(playerid, params[]) {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, color2, "You must be in a car to use a car radio.");//Comment this line if you want to play and where. Also remove on playerkeystate.
- ShowPlayerDialog(playerid, radcat, DIALOG_STYLE_INPUT, "{FFFF00}Online Car Radio","1.Radio HSL\n2.181.FM: The Buzz\n3.181.FM: Blues\n4.181.FM: Highway 181\n5.COOL93\n6.TechnoBase.FM\n7.Dubplate.FM\n8.Word of Truth Radio\n9.SKY.FM: New Age\n10..977 The Hitz Channel\n11.DEFJAY\n12.Stop MP3 Player\n\n","Ok","Exit");
- return 1;
- }
- //==============================[Dialog Response]===============================
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new string[128];
- if(dialogid == radcat)
- {
- if(response)
- {
- if(!strlen(inputtext)) return SendClientMessage(playerid, color1, "ERROR: You must enter the ID of a radio.!");
- if(!IsNumeric(inputtext)) return SendClientMessage(playerid, color1, "ERROR: You must enter the Numeric ID of a radio.!");
- if(strcmp(inputtext, "1", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to Radio HSL");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1268507");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "2", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to COOL93 Fahrenhieit");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=74673");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "3", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to 1.FM - Blues.");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1270282");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "4", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to 181.FM - POWER 181 -=[: The Hitz Channel:]-=");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1283896");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "5", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to COOL93.");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1756658");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "6", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to TechnoBase.FM.");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377200");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "7", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to Dubplate.FM.");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=2057197");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "8", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to Word of Truth Radio.");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=18695");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "9", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to MyLesbianRadio.com");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1275557");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "10", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to .977 The Hitz Channel.");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1280356");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "11", true) == 0)
- {
- format(string, sizeof(string), "* Radio Station changes the station to DEFJAY.");
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=616366");
- SendClientMessage(playerid, color2, string);
- }
- else if(strcmp(inputtext, "12", true) == 0)
- {
- StopAudioStreamForPlayer(playerid);
- }
- /*case 12:
- {
- SendClientMessage(playerid, color3, "Page 2 coming soon");
- //ShowPlayerDialog(playerid, radcat+1, DIALOG_STYLE_LIST, "{FFFF00}MP3 Player","1.Zara Dil Ko tham(Hindi)\n2.Love The way you lie-2\n3.\n4.\n5.\n6.\n7.\n8.\n9.\n10.\n11.Stop MP3 Player\n12.Next Page","Ok","Exit");
- }*/
- }
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_ONFOOT)
- {
- StopAudioStreamForPlayer(playerid);
- SendClientMessage(playerid, color3, "[Radio Stop]: You have to be in car for listening Music.");
- }
- return 1;
- }
- IsNumeric(const string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++)
- {
- if (string[i] > '9' || string[i] < '0') return 0;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment