Guest User

Untitled

a guest
Aug 23rd, 2018
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.73 KB | None | 0 0
  1.  
  2. CMD:carradio(playerid, params[])
  3. {
  4. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
  5. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  6. {
  7. new stringy[MAX_STRING],strings[500],listen[20];
  8. for(new x; x < 20; x++)
  9. {
  10. foreach(new i : Player)
  11. {
  12. if(Listening[i] == x) listen[x]++;
  13. }
  14. }
  15. format(strings, sizeof(strings), "Radio station\tListeners\n{FF2080}Turn Off Radio\t\nPro FM Romania\t%d\nRadio Bandit Romania\t%d\nRadio Taraf Romania\t%d\nRadio Hot Romania\t%d\nRadio Gangsta Dance\t%d\nRadio Gangsta Manele\t%d\n.977 Hitz\t%d\n",listen[0],listen[1],listen[2],listen[3],listen[4],listen[5],listen[6]);
  16. strcat(stringy, strings);
  17. format(strings, sizeof(strings), ".977 Mix\t%d\n.977 Alternative\t%d\nRadio BBC One UK\t%d\nDubstep.fm\t%d\nRadio Hit Romania\t%d\nRadio ClubMix Romania\t%d\nKiss FM Romania [Audio Plugin]\t%d\nRadio Zu Romania [Audio Plugin]\t%d\n",listen[7],listen[8],listen[9],listen[10],listen[11],listen[12],listen[13],listen[14]);
  18. strcat(stringy, strings);
  19. format(strings, sizeof(strings), "Radio Popular\t%d\nTrap.FM\t%d\nRadio Tequila Hip Hop\t%d\nYoutube Music/Custom URL\t%d",listen[15],listen[16],listen[17],listen[18]);
  20. strcat(stringy, strings);
  21. ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_TABLIST_HEADERS, "Vehicle Radio", stringy, "Play", "Cancel");
  22. }
  23. return 1;
  24. }
  25. CMD:carmusic(playerid, params[])
  26. {
  27. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
  28. return cmd_carradio(playerid, params);
  29. }
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. if(dialogid == DIALOG_RADIO)
  37. {
  38. if(response)
  39. {
  40. new strings[128],name[30],so;
  41. GetPlayerName(playerid, name, sizeof(name));
  42. if(listitem == 0)
  43. {
  44. StopAudioStreamForPlayersInCar(vehicleid);
  45. vehRadio[vehicleid] = 0;
  46. format(strings, sizeof(strings), "* %s turned off radio.",name);
  47. }
  48. if(listitem == 1)
  49. {
  50. StopAudioStreamForPlayersInCar(vehicleid);
  51. PlayAudioStreamForPlayersInCar(vehicleid, "http://stream.profm.ro:8012/profm.mp3");
  52. vehRadio[vehicleid] = 1;
  53. format(strings, sizeof(strings), "* %s changed the radio station to Pro FM Romania.",name);
  54. }
  55. if(listitem == 2)
  56. {
  57. StopAudioStreamForPlayersInCar(vehicleid);
  58. PlayAudioStreamForPlayersInCar(vehicleid, "http://live.radiobandit.ro:8000");
  59. vehRadio[vehicleid] = 2;
  60. format(strings, sizeof(strings), "* %s changed the radio station to Radio Bandit Romania.",name);
  61. }
  62. if(listitem == 3)
  63. {
  64. StopAudioStreamForPlayersInCar(vehicleid);
  65. PlayAudioStreamForPlayersInCar(vehicleid, "http://radiotaraf.com/live.m3u");
  66. vehRadio[vehicleid] = 3;
  67. format(strings, sizeof(strings), "* %s changed the radio station to Radio Taraf Romania.",name);
  68. }
  69. if(listitem == 4)
  70. {
  71. StopAudioStreamForPlayersInCar(vehicleid);
  72. PlayAudioStreamForPlayersInCar(vehicleid, "http://live.radiohot.ro:8000/");
  73. vehRadio[vehicleid] = 4;
  74. format(strings, sizeof(strings), "* %s changed the radio station to Radio Hot Romania.",name);
  75. }
  76. if(listitem == 5)
  77. {
  78. StopAudioStreamForPlayersInCar(vehicleid);
  79. PlayAudioStreamForPlayersInCar(vehicleid, "http://dance.radiogangsta.ro:8800");
  80. vehRadio[vehicleid] = 5;
  81. format(strings, sizeof(strings), "* %s changed the radio station to Radio Gangsta Dance.",name);
  82. }
  83. if(listitem == 6)
  84. {
  85. StopAudioStreamForPlayersInCar(vehicleid);
  86. PlayAudioStreamForPlayersInCar(vehicleid, "http://live.radiogangsta.ro:8800");
  87. vehRadio[vehicleid] = 6;
  88. format(strings, sizeof(strings), "* %s changed the radio station to Radio Gangsta Manele.",name);
  89. }
  90. if(listitem == 7)
  91. {
  92. StopAudioStreamForPlayersInCar(vehicleid);
  93. PlayAudioStreamForPlayersInCar(vehicleid, "http://7619.live.streamtheworld.com:80/977_HITS_SC");
  94. vehRadio[vehicleid] = 7;
  95. format(strings, sizeof(strings), "* %s changed the radio station to .977 Hitz.",name);
  96. }
  97. if(listitem == 8)
  98. {
  99. StopAudioStreamForPlayersInCar(vehicleid);
  100. PlayAudioStreamForPlayersInCar(vehicleid, "http://7639.live.streamtheworld.com:80/977_MIX_SC");
  101. vehRadio[vehicleid] = 8;
  102. format(strings, sizeof(strings), "* %s changed the radio station to .977 Mix.",name);
  103. }
  104. if(listitem == 9)
  105. {
  106. StopAudioStreamForPlayersInCar(vehicleid);
  107. PlayAudioStreamForPlayersInCar(vehicleid, "http://7579.live.streamtheworld.com:80/977_ALTERN_SC");
  108. vehRadio[vehicleid] = 9;
  109. format(strings, sizeof(strings), "* %s changed the radio station to .977 Alternative.",name);
  110. }
  111. if(listitem == 10)
  112. {
  113. StopAudioStreamForPlayersInCar(vehicleid);
  114. PlayAudioStreamForPlayersInCar(vehicleid, "http://www.listenlive.eu/bbcradio1.m3u");
  115. vehRadio[vehicleid] = 10;
  116. format(strings, sizeof(strings), "* %s changed the radio station to Radio BBC One UK.",name);
  117. }
  118. if(listitem == 11)
  119. {
  120. StopAudioStreamForPlayersInCar(vehicleid);
  121. PlayAudioStreamForPlayersInCar(vehicleid, "http://dubstep.fm/128.pls");
  122. vehRadio[vehicleid] = 11;
  123. format(strings, sizeof(strings), "* %s changed the radio station to Dubstep.fm.",name);
  124. }
  125. if(listitem == 12)
  126. {
  127. StopAudioStreamForPlayersInCar(vehicleid);
  128. PlayAudioStreamForPlayersInCar(vehicleid, "http://www.radio-hit.ro/asculta.m3u");
  129. vehRadio[vehicleid] = 12;
  130. format(strings, sizeof(strings), "* %s changed the radio station to Radio Hit Romania.",name);
  131. }
  132. if(listitem == 13)
  133. {
  134. StopAudioStreamForPlayersInCar(vehicleid);
  135. PlayAudioStreamForPlayersInCar(vehicleid, "http://live.radioclubmix.ro:9999");
  136. vehRadio[vehicleid] = 13;
  137. format(strings, sizeof(strings), "* %s changed the radio station to Radio ClubMix Romania.",name);
  138. }
  139. if(listitem == 14)
  140. {
  141. StopAudioStreamForPlayersInCar(vehicleid);
  142. PlayAudioStreamForPlayersInCar(vehicleid, "http://80.86.106.136/listen.pls");
  143. vehRadio[vehicleid] = 14;
  144. format(strings, sizeof(strings), "* %s changed the radio station to Kiss FM Romania [Audio Plugin].",name);
  145. }
  146. if(listitem == 15)
  147. {
  148. StopAudioStreamForPlayersInCar(vehicleid);
  149. PlayAudioStreamForPlayersInCar(vehicleid, "http://www.radiozu.ro/live.m3u");
  150. vehRadio[vehicleid] = 15;
  151. format(strings, sizeof(strings), "* %s changed the radio station to Radio Zu Romania [Audio Plugin].",name);
  152. }
  153. if(listitem == 16)
  154. {
  155. StopAudioStreamForPlayersInCar(vehicleid);
  156. PlayAudioStreamForPlayersInCar(vehicleid, "http://livemp3.radiopopular.ro:7777");
  157. vehRadio[vehicleid] = 16;
  158. format(strings, sizeof(strings), "* %s changed the radio station to Radio Popular.",name);
  159. }
  160. if(listitem == 17)
  161. {
  162. StopAudioStreamForPlayersInCar(vehicleid);
  163. PlayAudioStreamForPlayersInCar(vehicleid, "http://radio.trap.fm/listen128.pls");
  164. vehRadio[vehicleid] = 17;
  165. format(strings, sizeof(strings), "* %s changed the radio station to Trap.FM.",name);
  166. }
  167. if(listitem == 18)
  168. {
  169. StopAudioStreamForPlayersInCar(vehicleid);
  170. PlayAudioStreamForPlayersInCar(vehicleid, "http://radiotequila.ro/hiphop.m3u");
  171. vehRadio[vehicleid] = 18;
  172. format(strings, sizeof(strings), "* %s changed the radio station to Radio Tequila Hip Hop.",name);
  173. }
  174. if(listitem == 19)
  175. {
  176. ShowPlayerDialog(playerid, DIALOG_CUSTOMRADIO, DIALOG_STYLE_INPUT, "Custom Url", "Enter a URL:", "Play", "Cancel");
  177. so = 1;
  178. }
  179. if(so != 1)
  180. {
  181. ProxDetector(20.0, playerid, strings, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  182. Listening[playerid] = listitem-1;
  183. }
  184. }
  185. return 1;
  186. }
  187. if(dialogid == DIALOG_CUSTOMRADIO)
  188. {
  189. if(response)
  190. {
  191. if(IsPlayerInAnyVehicle(playerid))
  192. {
  193. new stringg[128],length,name[30];
  194. if(strfind(inputtext, "youtube.com", true) != -1)
  195. {
  196. length = strlen(inputtext)-11;
  197. strdel(inputtext, 0, length);
  198. format(stringg, sizeof(stringg), "http://youtubeplaylist-mp3.com/download/index/%s",inputtext);
  199. StopAudioStreamForPlayersInCar(vehicleid);
  200. PlayAudioStreamForPlayersInCar(vehicleid, stringg);
  201. format(customRadio[GetPlayerVehicleID(playerid)], 128, stringg);
  202. vehRadio[GetPlayerVehicleID(playerid)] = 19;
  203. GetPlayerName(playerid, name, sizeof(name));
  204. format(stringg, sizeof(stringg), "* %s changed the radio station to Custom URL.",name);
  205. ProxDetector(20.0, playerid, stringg, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  206. Listening[playerid] = 18;
  207. }
  208. else
  209. {
  210. StopAudioStreamForPlayersInCar(vehicleid);
  211. PlayAudioStreamForPlayersInCar(vehicleid, inputtext);
  212. format(customRadio[GetPlayerVehicleID(playerid)], 128, inputtext);
  213. vehRadio[GetPlayerVehicleID(playerid)] = 19;
  214. GetPlayerName(playerid, name, sizeof(name));
  215. format(stringg, sizeof(stringg), "* %s changed the radio station to Custom URL.",name);
  216. ProxDetector(20.0, playerid, stringg, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  217. Listening[playerid] = 18;
  218. }
  219. }
  220. }
  221. return 1;
  222. }
Advertisement
Add Comment
Please, Sign In to add comment