suchty112

GTA:WC RadioFilterscript

Jan 15th, 2012
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 8.62 KB | None | 0 0
  1. //credits by Richard_Price
  2. #include <a_samp>
  3. #include <ocmd>
  4.  
  5. #pragma tabsize 0
  6.  
  7. #define blau 0x00C3FFFF
  8. #define FILTERSCRIPT
  9. #define Radio 501
  10. #define Techno 502
  11. #define Normal 503
  12. #define Minimal 504
  13. #define Metal/Rock 505
  14. #define Country 506
  15. #define Info 507
  16. #define Christmas 508
  17.  
  18. #if defined FILTERSCRIPT
  19.  
  20.  
  21. public OnFilterScriptInit()
  22. {
  23.     print("$$ Richard_Price's RadioFilterscript V 1.4 loaded $$");
  24. }
  25. public OnPlayerCommandText(playerid, cmdtext[])
  26. {
  27.     return 0;
  28. }
  29.  
  30. ocmd:radio(playerid,params[])
  31. {
  32.     if(IsPlayerInAnyVehicle(playerid)) ShowPlayerDialog(playerid, Radio , DIALOG_STYLE_LIST, "{00EEFF}Radio", "Techno\nMinimal\nNormal\nMetal/Rock\nCountry\nInfo\nRadio aus", "Okay", "Abbrechen");
  33.     else SendClientMessage(playerid,0x00FF00AA,"Du bist in keinem Fahrzeug");
  34.     return 1;
  35. }
  36.  
  37.  
  38. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){
  39.     if (dialogid == Radio)
  40.     {
  41.         if (response)
  42.         {
  43.             if(listitem == 0){ShowPlayerDialog(playerid, Techno, DIALOG_STYLE_LIST,"Techno etc.","Technobase.FM\nHoustime.FM\nSunshineLive\nTechno4ever\n<---","Wählen","Abbruch");
  44.             }
  45.             if(listitem == 1){ShowPlayerDialog(playerid, Minimal, DIALOG_STYLE_LIST,"Minimal","ClubTime.FM\n{BB00FF}Rautemusik-Progressive\nMinimalstation\n<---","Wählen","Abbruch");
  46.             }
  47.             if(listitem == 2){ShowPlayerDialog(playerid, Normal, DIALOG_STYLE_LIST,"Normal","89.0RTL\nSAMP-Radio\nBlackBeats.FM\nKronehit.at\nTop100Stationen\nWelle1(AT)\nBreakz.us\nAntenne Bayern\n<---","Wählen","Abbruch");
  48.             }
  49.             if(listitem == 3){ShowPlayerDialog(playerid, Metal/Rock, DIALOG_STYLE_LIST,"Metal/Rock","Metal Only\nRadio21 - Classic-Rock\n<---","Wählen","Abbruch");
  50.             }
  51.             if(listitem == 4){ShowPlayerDialog(playerid, Country, DIALOG_STYLE_LIST,"Country","Country 108\nCOUNTRYMUSIC 24\nCountry Power Station\n<----","Wählen","Abbruch");
  52.             }
  53.             if(listitem == 5){ShowPlayerDialog(playerid, Info, DIALOG_STYLE_MSGBOX,"Informationen","Mit /audiomsg könnt ihr die Streamanzeigen im Chat ausschalten","OK","");
  54.             }
  55.             if(listitem == 7){SendClientMessage(playerid,blau,"Radio ausgeschaltet.");StopAudioStreamForPlayer(playerid);
  56.             }
  57.         }
  58.     }
  59.     if(dialogid == Info) {
  60.         if(response) {
  61.             ShowPlayerDialog(playerid, Radio , DIALOG_STYLE_LIST, "{00EEFF}Radio", "Techno\nMinimal\nNormal\nMetal/Rock\nCountry\nInfo\nRadio aus", "Okay", "Abbrechen");
  62.         } else {
  63.             SendClientMessage(playerid,0xFFFFFFFF,"");
  64.         }
  65.         return 1;
  66.     }
  67.     if (dialogid == Techno)
  68.     {
  69.         if (response)
  70.         {
  71.             if(listitem == 0){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Technobase.FM.");PlayAudioStreamForPlayer(playerid, "http://listen.technobase.fm/dsl.pls");
  72.             }
  73.             if(listitem == 1){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Housetime.FM.");PlayAudioStreamForPlayer(playerid, "http://listen.housetime.fm/dsl.pls");
  74.             }
  75.             if(listitem == 2){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst SunshineLive.");PlayAudioStreamForPlayer(playerid, "http://62.27.47.15/sunshinelive/livestream.mp3");
  76.             }
  77.             if(listitem == 3){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Techno4Ever.");PlayAudioStreamForPlayer(playerid, "http://listen.to.techno4ever.fm");
  78.             }
  79.             if(listitem == 4){StopAudioStreamForPlayer(playerid);ShowPlayerDialog(playerid, Radio , DIALOG_STYLE_LIST, "{00EEFF}Radio", "Techno\nMinimal\nNormal\nMetal/Rock\nCountry\nInfo\nRadio aus", "Okay", "Abbrechen");
  80.             }
  81.         }
  82.     }
  83.     if (dialogid == Minimal)
  84.     {
  85.         if (response)
  86.         {
  87.             if(listitem == 0){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Clubtime.FM.");PlayAudioStreamForPlayer(playerid, "http://listen.clubtime.fm/dsl.pls");
  88.             }
  89.             if(listitem == 1){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst den Rautemusik Progressive Stream.");PlayAudioStreamForPlayer(playerid, "http://progressive-high.rautemusik.fm/listen.pls");
  90.             }
  91.             if(listitem == 2){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst den MinimalStation.");PlayAudioStreamForPlayer(playerid, "http://s6.streammonster.com/tunein.php/stsimons/playlist.pls");
  92.             }
  93.             if(listitem == 3){StopAudioStreamForPlayer(playerid);ShowPlayerDialog(playerid, Radio , DIALOG_STYLE_LIST, "{00EEFF}Radio", "Techno\nMinimal\nNormal\nMetal/Rock\nCountry\nInfo\nRadio aus", "Okay", "Abbrechen");
  94.             }
  95.         }
  96.     }
  97.     if (dialogid == Metal/Rock)
  98.     {
  99.         if (response)
  100.         {
  101.             if(listitem == 0){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Metal-Only.");PlayAudioStreamForPlayer(playerid, "http://metal-only.blitz-stream.de/listen.m3u");
  102.             }
  103.             if(listitem == 1){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Radio21-Classic Rock.");PlayAudioStreamForPlayer(playerid, "http://www.radio21.de/livestream/livestream.m3u");
  104.             }
  105.             if(listitem == 2){StopAudioStreamForPlayer(playerid);ShowPlayerDialog(playerid, Radio , DIALOG_STYLE_LIST, "{00EEFF}Radio", "Techno\nMinimal\nNormal\nMetal/Rock\nCountry\nInfo\nRadio aus", "Okay", "Abbrechen");
  106.             }
  107.         }
  108.     }
  109.     if (dialogid == Country)
  110.     {
  111.         if (response)
  112.         {
  113.             if(listitem == 0){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Country 108.");PlayAudioStreamForPlayer(playerid, "http://www.country108.com/listen.pls");
  114.             }
  115.             if(listitem == 1){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst COUNTRYMUSIC24.");PlayAudioStreamForPlayer(playerid, "http://www.countrymusic24.com/listen.pls");
  116.             }
  117.             if(listitem == 2){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Country Power Station.");PlayAudioStreamForPlayer(playerid, "http://cast.sc9.shoutcaststreaming.us/tunein.php/cps/playlist.pls");
  118.             }
  119.             if(listitem == 3){StopAudioStreamForPlayer(playerid);ShowPlayerDialog(playerid, Radio , DIALOG_STYLE_LIST, "{00EEFF}Radio", "Techno\nMinimal\nNormal\nMetal/Rock\nCountry\nInfo\nRadio aus", "Okay", "Abbrechen");
  120.             }
  121.         }
  122.     }
  123.     if (dialogid == Normal)
  124.     {
  125.         if (response)
  126.         {
  127.             if(listitem == 0){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst 89.0RTL.");PlayAudioStreamForPlayer(playerid, "http://www.89.0rtl.de/webradio/rtl-high.m3u");
  128.             }
  129.             if(listitem == 1){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst SAMP-Radio.");PlayAudioStreamForPlayer(playerid, "http://samp-radio.com/stream.pls");
  130.             }
  131.             if(listitem == 2){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst BlackBeats.FM.");PlayAudioStreamForPlayer(playerid, "http://blackbeats.fm/listen.m3u");
  132.             }
  133.             if(listitem == 3){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Kronehit.at.");PlayAudioStreamForPlayer(playerid, "http://onair.krone.at/kronehit.mp3.m3u");
  134.             }
  135.             if(listitem == 4){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Top100Station.");PlayAudioStreamForPlayer(playerid, "http://www.top100station.de/switch/r3472.pls");
  136.             }
  137.             if(listitem == 5){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Welle 1(AT).");PlayAudioStreamForPlayer(playerid, "http://live.welle1.at:8128/listen.pls");
  138.             }
  139.             if(listitem == 6){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Breakz.us.");PlayAudioStreamForPlayer(playerid, "http://breakz.us/radio/listen.pls");
  140.             }
  141.             if(listitem == 7){StopAudioStreamForPlayer(playerid);SendClientMessage(playerid,blau,"Du hörst Antenne Bayern.");PlayAudioStreamForPlayer(playerid, "http://www.antenne.de/webradio/antenne.m3u");
  142.             }
  143.             if(listitem == 8){StopAudioStreamForPlayer(playerid);ShowPlayerDialog(playerid, Radio , DIALOG_STYLE_LIST, "{00EEFF}Radio", "Techno\nMinimal\nNormal\nMetal/Rock\nCountry\nInfo\nRadio aus", "Okay", "Abbrechen");
  144.             }
  145.         }
  146.     }
  147.     return 1;
  148. }
  149.  
  150. public OnPlayerExitVehicle(playerid, vehicleid)
  151. {
  152.     StopAudioStreamForPlayer(playerid);
  153.     return 1;
  154. }
  155.  
  156. public OnVehicleDeath(vehicleid, killerid)
  157. {
  158.     for(new playerid = 0; playerid < GetMaxPlayers(); playerid++)
  159.     {
  160.         StopAudioStreamForPlayer(playerid);
  161.     }
  162.     return 1;
  163. }
  164. public OnPlayerDeath(playerid)
  165. {
  166.     StopAudioStreamForPlayer(playerid);
  167.     return 1;
  168. }
  169. public OnPlayerStateChange(playerid, newstate, oldstate)
  170. {
  171.     if(newstate == PLAYER_STATE_ONFOOT || newstate == PLAYER_STATE_ONFOOT)
  172.     {
  173.         StopAudioStreamForPlayer(playerid);
  174.     }
  175.     else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
  176.     {
  177.         StopAudioStreamForPlayer(playerid);
  178.     }
  179.     return 0;
  180. }
  181. #endif
Advertisement
Add Comment
Please, Sign In to add comment