Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if defined s_Radio Header
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- :: Radio System - V1 - Optimized Version - 09/05/2014 ::
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- #endif
- #include < a_samp >
- #include < zcmd >
- #include < sscanf2 >
- #undef MAX_PLAYERS
- #define MAX_PLAYERS 50
- #define s_ListenD 1000
- #define s_CustomD 2000
- forward s_Listen(playerid, Link[]);
- forward s_CustomR(playerid);
- forward s_StopA(playerid);
- public OnFilterScriptInit()
- {
- print("\n");
- print("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
- print(">> Radio System - [XSS]Seby - Loaded Successfully! <<");
- print("+++++++++++++++++++++++++++++++++++++++++++++++++++++");
- print("\n");
- //--------------------------------------------------------------------------
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case s_ListenD:
- {
- if(listitem == 0)
- { if(response) return s_Listen(playerid, "http://80.86.106.136:8088/"); }
- //------------------------------------------------------------------
- if(listitem == 1)
- { if(response) return s_Listen(playerid, "http://stream.profm.ro:8012/profm.mp3"); }
- //------------------------------------------------------------------
- if(listitem == 2)
- { if(response) return s_Listen(playerid, "http://www.radio-hit.ro/asculta.m3u"); }
- //------------------------------------------------------------------
- if(listitem == 3)
- { if(response) return s_Listen(playerid, "http://www.radiomafia.ro/listen.m3u"); }
- //------------------------------------------------------------------
- if(listitem == 4)
- { if(response) return s_Listen(playerid, "http://www.radiowish.ro/live.m3u"); }
- //------------------------------------------------------------------
- if(listitem == 5)
- { if(response) return s_Listen(playerid, "http://radio-fun.ro/asculta.m3u"); }
- //------------------------------------------------------------------
- if(listitem == 6)
- { if(response) return s_Listen(playerid, "http://www.radiolautaru.ro/live.m3u"); }
- //------------------------------------------------------------------
- if(listitem == 7)
- { if(response) return s_Listen(playerid, "http://www.greudedifuzat.eu/greudedifuzat.m3u"); }
- //------------------------------------------------------------------
- if(listitem == 8)
- { if(response) return s_Listen(playerid, "http://www.radioclubmix.ro/live.m3u"); }
- //------------------------------------------------------------------
- if(listitem == 9)
- { if(response) return s_Listen(playerid, "http://radiostardj.ro/lst/hip/listen.pls"); }
- //------------------------------------------------------------------
- if(listitem == 10)
- { if(response) return s_Listen(playerid, "http://www.radiogmusic.com/rock.m3u"); }
- //------------------------------------------------------------------
- if(listitem == 11)
- { if(response) return s_CustomR(playerid); }
- //------------------------------------------------------------------
- if(listitem == 12)
- { if(response) return s_StopA(playerid); }
- }
- case s_CustomD:
- { if(response) return s_Listen(playerid, inputtext); }
- }
- return 1;
- }
- CMD:radio(playerid) return ShowPlayerDialog(playerid, s_ListenD, DIALOG_STYLE_LIST, "Radio", "{0072FF}Kiss FM\n{0072FF}Pro FM\n{0072FF}Radio HiT\n{0072FF}Radio Mafia\n{FFFF00}Radio Wish\n{FFFF00}Radio Fun Manele\n{FFFF00}Radio Lautaru\n{FFFF00}Radio Greu de Difuzat\n{FF0000}Radio Club Mix\n{FF0000}Radio Star DJ Hip-Hop\n{FF0000}Radio GMusic Rock\n{00FF00}Custom Radio Station\n{00FF00}Stop Radio", "Listen", "Close");
- public s_Listen(playerid, Link[])
- {
- new sStr[128];
- //--------------------------------------------------------------------------
- format(sStr, sizeof(sStr), "%s", Link);
- PlayAudioStreamForPlayer(playerid, Link);
- //--------------------------------------------------------------------------
- return 1;
- }
- public s_CustomR(playerid)
- {
- new sStr[200], sStr2[200];
- //--------------------------------------------------------------------------
- format(sStr2, sizeof(sStr2), "{00FF00}Hi, {FF0000}%s{00FF00}!\n{00FF00}Please enter the {FF0000}Radio Station Link {00FF00}you want to listen before:", s_ReturnName(playerid));
- strcat(sStr, sStr2, sizeof(sStr));
- //--------------------------------------------------------------------------
- return ShowPlayerDialog(playerid, s_CustomD, DIALOG_STYLE_INPUT, "Custom {FF0000}Radio", sStr, "Listen", "Close");
- }
- public s_StopA(playerid) return StopAudioStreamForPlayer(playerid);
- stock s_ReturnName(playerid)
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, 20);
- return pName;
- }
- #if defined s_Radio Footer
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- :: Copyright by [XSS]Seby - 2014 - All Rights Reserved. - End Here. ::
- :: Contact: samp_theseby@yahoo.com ::
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement