Advertisement
Guest User

Ösiradio script

a guest
Jan 7th, 2012
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 6.40 KB | None | 0 0
  1. /*
  2.             SA:MP Audio Radio Stream Filterscript
  3.  
  4.             ************** ÖSIRADIO **************
  5.                              by
  6.  
  7.                             petmax113
  8.                             ULLLIIK (Errorfixxing und mein Scriptinglehrer^^)
  9.  
  10.  
  11.         #Credits dürfen nicht gelöscht werden!!!
  12.  
  13. */
  14.  
  15. #include <a_samp>
  16. #include <UC>
  17. #pragma tabsize 0
  18. #define FILTERSCRIPT
  19. #define ERROR_COLOR 0xFF4A26FF
  20. #define RIGHT_COLOR 0xD7FF00FF
  21.  
  22. #define DIALOG_RADIO_OFF    2252
  23. #define DIALOG_RADIO_ON     2253
  24.  
  25. #define MAX_DISTANCE    2600.80
  26.  
  27.  
  28. #define ShowDialogOn(%0);   ShowPlayerDialog(%0, DIALOG_RADIO_ON, DIALOG_STYLE_LIST, "Österreichischer Radio","Hitradio Ö3\nKronehit\nFM4\nÖ1\nCampus Radio\nHIT FM\nRadio Arabella Party\nBigvibez Radio(Reggae)","Play","Quit");
  29. #define ShowDialogOff(%0);   ShowPlayerDialog(%0, DIALOG_RADIO_OFF, DIALOG_STYLE_LIST, "{FF1E00}Österreichischer Radio","{FF1E00}Radio ausschalten\nHitradio Ö3\nKronehit\nFM4\nÖ1\nCampus Radio\nHIT FM\nRadio Arabella Party\nBigvibez Radio(Reggae)","Play","Quit");
  30.  
  31. #define Message(%0); new string[180];\
  32. format(string, sizeof string, "Du hast gerade folgenden Sender eingeschalten: %s",#%0);\
  33. SendClientMessage(playerid,RIGHT_COLOR,string);
  34.  
  35.  
  36. new bool:RSTAT[MAX_PLAYERS];
  37.  
  38.  
  39. UC-carradio(playerid,params[])
  40. {
  41.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,ERROR_COLOR,"Du befindest dich nicht in einem Auto!");
  42.     PlayerPlaySound(playerid,1150,0,0,1);
  43.     if(RSTAT[playerid] == true)
  44.     {
  45.         ShowDialogOff(playerid);
  46.     }
  47.     else
  48.     {
  49.         ShowDialogOn(playerid);
  50.     }
  51.  
  52.     r1
  53.  
  54. }
  55.  
  56. public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
  57. {
  58.     if(dialogid==DIALOG_RADIO_ON)
  59.     {
  60.  
  61.         if(!response) return 1;
  62.         if(!IsPlayerInRangeOfPoint(playerid,MAX_DISTANCE,1594.1421,-1223.3630,17.4535)) return SendClientMessage(playerid,ERROR_COLOR,"Du bist außerhalb der Sendefrequenz!.");
  63.  
  64.         RSTAT[playerid]=true;
  65.         switch(listitem)
  66.         {
  67.  
  68.             case 0://Hitradio
  69.             {
  70.                
  71.                 PlayAudioStreamForPlayer(playerid,"http://mp3stream7.apasf.apa.at:8000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  72.                 Message(Hitradio Ö3);
  73.                 r1
  74.             }
  75.             case 1://Kronehit
  76.             {
  77.  
  78.                 PlayAudioStreamForPlayer(playerid,"http://onair.krone.at/kronehit-hd.mp3.m3u",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  79.                 Message(Kronehit);
  80.                 r1
  81.             }
  82.             case 2://FM4
  83.             {
  84.                
  85.                 PlayAudioStreamForPlayer(playerid,"http://mp3stream1.apasf.apa.at:8000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  86.                 Message(FM4);
  87.                 r1
  88.             }
  89.             case 3://Ö1
  90.             {
  91.                
  92.                 PlayAudioStreamForPlayer(playerid,"http://mp3stream3.apasf.apa.at:8000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  93.                 Message(Ö1);
  94.                 r1
  95.             }
  96.             case 4://Campus Radio
  97.             {
  98.                
  99.                 PlayAudioStreamForPlayer(playerid,"http://streamer.campusradio.at/campusradio.m3u",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  100.                 Message(Campus Radio);
  101.                 r1
  102.             }
  103.             case 5://Hit FM
  104.             {
  105.                
  106.                 PlayAudioStreamForPlayer(playerid,"http://hitfm.biosnet.at:8000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  107.                 Message(Hit FM);
  108.                 r1
  109.             }
  110.             case 6://Radio Arabella Party
  111.             {
  112.                
  113.                 PlayAudioStreamForPlayer(playerid,"http://stream06.arabella.vss.kapper.net:8000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  114.                 Message(Radio Arabella Party);
  115.                 r1
  116.             }
  117.             case 7://Beatvibez Radio(Reggae)
  118.             {
  119.                
  120.                 PlayAudioStreamForPlayer(playerid,"http://streams.bigvibez.com:7000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  121.                 Message(Beatvibez Radio[Reggae]);
  122.                 r1
  123.             }
  124.  
  125.  
  126.         }
  127.  
  128.     }
  129.     if(dialogid==DIALOG_RADIO_OFF)
  130.     {
  131.  
  132.         if(!response) return 1;
  133.         if(!IsPlayerInRangeOfPoint(playerid,MAX_DISTANCE,1594.1421,-1223.3630,17.4535)) return SendClientMessage(playerid,ERROR_COLOR,"Du bist außerhalb der Sendefrequenz!.");
  134.  
  135.         RSTAT[playerid]=true;
  136.         switch(listitem)
  137.         {
  138.             case 0://Stopradio
  139.             {
  140.                 StopAudioStreamForPlayer(playerid);
  141.                 RSTAT[playerid]=false;
  142.                 r1
  143.             }
  144.             case 1://Hitradio
  145.             {
  146.                
  147.                 PlayAudioStreamForPlayer(playerid,"http://mp3stream7.apasf.apa.at:8000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  148.                 Message(Hitradio Ö3);
  149.                 r1
  150.             }
  151.             case 2://Kronehit
  152.             {
  153.                
  154.                 PlayAudioStreamForPlayer(playerid,"http://onair.krone.at/kronehit-hd.mp3.m3u",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  155.                 Message(Kronehi4t);
  156.                 r1
  157.             }
  158.             case 3://FM4
  159.             {
  160.                
  161.                 PlayAudioStreamForPlayer(playerid,"http://mp3stream1.apasf.apa.at:8000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  162.                 Message(FM4);
  163.                 r1
  164.             }
  165.             case 4://Ö1
  166.             {
  167.                
  168.                 PlayAudioStreamForPlayer(playerid,"http://mp3stream3.apasf.apa.at:8000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  169.                 Message(Ö1);
  170.                 r1
  171.             }
  172.             case 5://Campus Radio
  173.             {
  174.                
  175.                 PlayAudioStreamForPlayer(playerid,"http://streamer.campusradio.at/campusradio.m3u",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  176.                 Message(Campus Radio);
  177.                 r1
  178.             }
  179.             case 6://Hit FM
  180.             {
  181.                
  182.                 PlayAudioStreamForPlayer(playerid,"http://hitfm.biosnet.at:8000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  183.                 Message(Hit FM);
  184.                 r1
  185.             }
  186.             case 7://Radio Arabella Party
  187.             {
  188.                
  189.                 PlayAudioStreamForPlayer(playerid,"http://stream06.arabella.vss.kapper.net:8000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  190.                 Message(Radio Arabella Party);
  191.                 r1
  192.             }
  193.             case 8://Beatvibez Radio(Reggae)
  194.             {
  195.                
  196.                 PlayAudioStreamForPlayer(playerid,"http://streams.bigvibez.com:7000/listen.pls",1594.1421,-1223.3630,17.4535,MAX_DISTANCE,1);
  197.                 Message(Beatvibez Radio[Reggae]);
  198.                 r1
  199.             }
  200.  
  201.         }
  202.     }
  203.  
  204.     r1
  205. }
  206.  
  207. public OnFilterScriptInit()
  208. {
  209.     print("\n--------------------------------------");
  210.     print(" Österreichische Radiosender Filterscript by petmax113 & ULLLIIK loaded.");
  211.     print("--------------------------------------\n");
  212.     return 1;
  213. }
  214.  
  215. public OnPlayerExitVehicle(playerid, vehicleid)
  216. {
  217.     StopAudioStreamForPlayer(playerid);
  218.     RSTAT[playerid] = false;
  219.     return 1;
  220. }
  221.  
  222. public OnVehicleDeath(vehicleid, killerid)
  223. {
  224.     for(new i = 0; i < 500; i++)
  225.     {
  226.         StopAudioStreamForPlayer(i);
  227.         RSTAT[i] = false;
  228.        
  229.     }
  230.     r1
  231. }
  232.  
  233. public OnPlayerDisconnect(playerid,reason)
  234. {
  235.     StopAudioStreamForPlayer(playerid);
  236.     RSTAT[playerid]=false;
  237.     r1
  238. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement