Guest User

Mysterios Radio System

a guest
Mar 25th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. //Radio System Mysterio
  2. //10 Radiosender beim aussteigen geht er aus
  3. //beim Ausloggen geht er auch Aus
  4. //Viel Spaß! ;)
  5.  
  6. #include <a_samp>
  7.  
  8. #define DIALOG_RADIO 1 //Hier deine DIALOG ID
  9. #define COLOR_RED 0xFF0000FF
  10.  
  11. #if defined FILTERSCRIPT
  12. #endif
  13.  
  14. public OnFilterScriptInit()
  15. {
  16. print("\n--------------------------------------");
  17. print(" Radio System Mysterio");
  18. print("--------------------------------------\n");
  19. return 1;
  20. }
  21.  
  22. public OnPlayerDisconnect(playerid, reason)
  23. {
  24. StopAudioStreamForPlayer(playerid);
  25. return 1;
  26. }
  27.  
  28. public OnPlayerDeath(playerid, killerid, reason)
  29. {
  30. StopAudioStreamForPlayer(playerid);
  31. return 1;
  32. }
  33.  
  34. public OnPlayerCommandText(playerid, cmdtext[])
  35. {
  36. if(strcmp(cmdtext,"/radio", true)==0)
  37. {
  38. if(IsPlayerInAnyVehicle(playerid))
  39. {
  40. ShowPlayerDialog(playerid,DIALOG_RADIO,DIALOG_STYLE_LIST,"Radio","Ausschalten\nTechnobase.fm\nHardbase.fm\nRPR1\n1LIVE\nYouFM\nYouFM Black\nYouFM Rock\nYouFM Club\nRadio N1\nAntenne Bayern","Abspielen","Ausschalten");
  41. }
  42. else
  43. {
  44. SendClientMessage(playerid,COLOR_RED,"Du bist in keinen Fahrzeug!");
  45. }
  46. return 1;
  47. }
  48. return 0;
  49. }
  50.  
  51. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  52. {
  53. if(dialogid==DIALOG_RADIO)
  54. {
  55. if(response==1)
  56. switch(listitem)
  57. {
  58. case 0:{StopAudioStreamForPlayer(playerid);}
  59. case 1:{PlayAudioStreamForPlayer(playerid,"http://listen.technobase.fm/dsl.pls");}
  60. case 2:{PlayAudioStreamForPlayer(playerid,"http://listen.hardbase.fm/dsl.pls");}
  61. case 3: {PlayAudioStreamForPlayer(playerid, "http://rpr1.fmstreams.de/stream1");}
  62. case 4: {PlayAudioStreamForPlayer(playerid, "http://gffstream.ic.llnwd.net/stream/gffstream_stream_wdr_einslive_a");}
  63. case 5: {PlayAudioStreamForPlayer(playerid, "http://gffstream.ic.llnwd.net/stream/gffstream_mp3_w72a");}
  64. case 6:{PlayAudioStreamForPlayer(playerid,"http://gffstream.ic.llnwd.net/stream/gffstream_mp3_w75a");}
  65. case 7:{PlayAudioStreamForPlayer(playerid,"http://gffstream.ic.llnwd.net/stream/gffstream_mp3_w77a");}
  66. case 8: {PlayAudioStreamForPlayer(playerid, "http://gffstream.ic.llnwd.net/stream/gffstream_mp3_w76a");}
  67. case 9: {PlayAudioStreamForPlayer(playerid, "http://webradio1.hitradion1.de:8000");}
  68. case 10: {PlayAudioStreamForPlayer(playerid, "http://www.antenne.de/webradio/antenne.m3u");}
  69. }
  70. if(response==0){StopAudioStreamForPlayer(playerid);}
  71. }
  72. return 1;
  73. }
Advertisement
Add Comment
Please, Sign In to add comment