Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2012  |  syntax: None  |  size: 2.86 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. //rádió
  5. #define DIALOG_RADIO 983
  6. #define piros 0xff0000AA
  7.  
  8.  
  9. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  10. {
  11.         new iter = GetVehicleModel(playerid),  bool:hlp;
  12.         switch(iter)
  13.         {
  14.                 case 460, 476, 511, 512, 513, 519, 520, 553, 577, 592, 593, 417, 425, 447, 469, 487, 488, 497, 548, 563, 441, 464, 465, 501, 564, 594, 590, 569, 537, 538, 570, 449, 472, 473, 493, 495, 484, 430, 454, 453, 452, 446, 581, 462, 521, 463, 522, 523, 461, 448, 471, 468, 586, 509, 481, 510:
  15.                 {
  16.                         hlp = true;
  17.                 }
  18.         }
  19.         if(!hlp)
  20.         {
  21.                 new pina = -1;
  22.                 while(pina != MAX_PLAYERS)
  23.                 {
  24.                         pina += 1;
  25.                         if(IsPlayerInVehicle(pina, vehicleid))
  26.                         {
  27.                                 PlayAudioStreamForPlayer(playerid, "http://www.sztarnet.hu/ClassFM/mp3_adas_1.m3u");
  28.                         }
  29.                 }
  30.                 return 1;
  31.         }
  32.         hlp = false;
  33.         return 1;
  34. }
  35.  
  36.  
  37. CMD:radio(playerid, params[])
  38. {
  39.         ShowPlayerDialog(playerid, 983, DIALOG_STYLE_LIST, "Rádió", "Class FM\nNeo FM\nMulatós\nRádió1\nRockVilág\nRádió 88 Club", "Hallgat", "Kikapcsolás");
  40.         return 1;
  41. }
  42.  
  43. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  44. {
  45.         new vid = GetPlayerVehicleID(playerid);
  46.         if(dialogid == 983)
  47.         {
  48.                 if(!response)
  49.                 {
  50.                         StopAudioStreamForPlayer(playerid);
  51.                 }
  52.                 if(listitem == 0)
  53.                 {
  54.                         for(new i; i<MAX_PLAYERS; i++)
  55.                         {
  56.                                 if(IsPlayerInVehicle(i, vid))
  57.                                 {
  58.                                         PlayAudioStreamForPlayer(i, "http://www.sztarnet.hu/ClassFM/mp3_adas_1.m3u");
  59.                                         SendClientMessage(playerid, piros, "Te a Class FM-et hallgatod!");
  60.                                 }
  61.                         }
  62.                 }
  63.                 if(listitem == 1)
  64.                 {
  65.                         for(new i; i<MAX_PLAYERS; i++)
  66.                         {
  67.                                 if(IsPlayerInVehicle(i, vid))
  68.                                 {
  69.                                         PlayAudioStreamForPlayer(i, "http://www.xhosting.hu/NeoFM/128_kbs_mp3.m3u");
  70.                                         SendClientMessage(playerid, piros, "Te a Neo FM-et hallgatod!");
  71.                                 }
  72.                         }
  73.                 }
  74.                 if(listitem == 2)
  75.                 {
  76.                 for(new i; i<MAX_PLAYERS; i++)
  77.                 {
  78.                 if(IsPlayerInVehicle(i, vid))
  79.                 {
  80.                 PlayAudioStreamForPlayer(i, "http://www.rtvstat.hu/play.m3u?1126&8");
  81.                 SendClientMessage(playerid, piros, "Te a Mulatós csatornát hallgatod!");
  82.                 }
  83.                 }
  84.                 }
  85.                 if(listitem == 3)
  86.                 {
  87.                 for(new i; i<MAX_PLAYERS; i++)
  88.                 {
  89.                 if(IsPlayerInVehicle(i, vid))
  90.                 {
  91.                 PlayAudioStreamForPlayer(i, "http://195.70.35.172:8000/radio1.mp3");
  92.                 SendClientMessage(playerid, piros, "Te a Rádió 1-et hallgatod!");
  93.                 }
  94.                 }
  95.                 }
  96.                 if(listitem == 4)
  97.                 {
  98.                 for(new i; i<MAX_PLAYERS; i++)
  99.                 {
  100.                 if(IsPlayerInVehicle(i, vid))
  101.                 {
  102.                 PlayAudioStreamForPlayer(i, "http://94.199.128.124:8800/rockvilag1");
  103.                 SendClientMessage(playerid, piros, "Te a RockVilág-ot hallgatod!");
  104.                 }
  105.                 }
  106.                 }
  107.                 if(listitem == 5)
  108.                 {
  109.                 for(new i; i<MAX_PLAYERS; i++)
  110.                 {
  111.                 if(IsPlayerInVehicle(i, vid))
  112.                 {
  113.                 PlayAudioStreamForPlayer(i, "http://www.rtvstat.hu/play.m3u?1028&4");
  114.                 SendClientMessage(playerid, piros, "Te a Rádió 88 Club-ot hallgatod!");
  115.                 }
  116.                 }
  117.                 }
  118.                 return 1;
  119.         }
  120.         return 1;
  121. }