BoxBoy

Untitled

Feb 15th, 2014
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.59 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //////////////////////////////////////////////////////
  4. // //
  5. // Audio Stream Filter Script //
  6. // //
  7. // BY //
  8. // //
  9. // BoxBonik(BoxBoy) //
  10. // //
  11. //////////////////////////////////////////////////////
  12. #define COLOR_YELLOW 0xFFFF00AA
  13. #define FILTERSCRIPT
  14. #define DIALOG_MUSIC 12
  15. #define DIALOG_MUSIC_PLAYLISTS 13
  16. #define DIALOG_MUSIC_2014_HITS 14
  17.  
  18. #include <a_samp>
  19. #include <zcmd>
  20.  
  21. #if defined FILTERSCRIPT
  22.  
  23. public OnFilterScriptInit()
  24. {
  25. print("\n--------------------------------------");
  26. print(" NewAudioFS");
  27. print("--------------------------------------\n");
  28. return 1;
  29. }
  30.  
  31. public OnFilterScriptExit()
  32. {
  33. return 1;
  34. }
  35.  
  36. #else
  37.  
  38. main()
  39. {
  40. print("\n----------------------------------");
  41. print(" Blank Gamemode by your name here");
  42. print("----------------------------------\n");
  43. }
  44.  
  45. #endif
  46.  
  47. public OnGameModeInit()
  48. {
  49. // Don't use these lines if it's a filterscript
  50. SetGameModeText("Blank Script");
  51. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  52. return 1;
  53. }
  54.  
  55. public OnGameModeExit()
  56. {
  57. return 1;
  58. }
  59.  
  60. public OnPlayerRequestClass(playerid, classid)
  61. {
  62. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  63. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  64. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  65. return 1;
  66. }
  67.  
  68. public OnPlayerConnect(playerid)
  69. {
  70. return 1;
  71. }
  72.  
  73. public OnPlayerDisconnect(playerid, reason)
  74. {
  75. return 1;
  76. }
  77.  
  78. public OnPlayerSpawn(playerid)
  79. {
  80. return 1;
  81. }
  82.  
  83. public OnPlayerDeath(playerid, killerid, reason)
  84. {
  85. return 1;
  86. }
  87.  
  88. public OnVehicleSpawn(vehicleid)
  89. {
  90. return 1;
  91. }
  92.  
  93. public OnVehicleDeath(vehicleid, killerid)
  94. {
  95. return 1;
  96. }
  97.  
  98. public OnPlayerText(playerid, text[])
  99. {
  100. return 1;
  101. }
  102. public OnPlayerCommandText(playerid, cmdtext[])
  103. {
  104. return 1;
  105. }
  106. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  107. {
  108. return 1;
  109. }
  110.  
  111. public OnPlayerExitVehicle(playerid, vehicleid)
  112. {
  113. return 1;
  114. }
  115.  
  116. public OnPlayerStateChange(playerid, newstate, oldstate)
  117. {
  118. return 1;
  119. }
  120.  
  121. public OnPlayerEnterCheckpoint(playerid)
  122. {
  123. return 1;
  124. }
  125.  
  126. public OnPlayerLeaveCheckpoint(playerid)
  127. {
  128. return 1;
  129. }
  130.  
  131. public OnPlayerEnterRaceCheckpoint(playerid)
  132. {
  133. return 1;
  134. }
  135.  
  136. public OnPlayerLeaveRaceCheckpoint(playerid)
  137. {
  138. return 1;
  139. }
  140.  
  141. public OnRconCommand(cmd[])
  142. {
  143. return 1;
  144. }
  145.  
  146. public OnPlayerRequestSpawn(playerid)
  147. {
  148. return 1;
  149. }
  150.  
  151. public OnObjectMoved(objectid)
  152. {
  153. return 1;
  154. }
  155.  
  156. public OnPlayerObjectMoved(playerid, objectid)
  157. {
  158. return 1;
  159. }
  160.  
  161. public OnPlayerPickUpPickup(playerid, pickupid)
  162. {
  163. return 1;
  164. }
  165.  
  166. public OnVehicleMod(playerid, vehicleid, componentid)
  167. {
  168. return 1;
  169. }
  170.  
  171. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  172. {
  173. return 1;
  174. }
  175.  
  176. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  177. {
  178. return 1;
  179. }
  180.  
  181. public OnPlayerSelectedMenuRow(playerid, row)
  182. {
  183. return 1;
  184. }
  185.  
  186. public OnPlayerExitedMenu(playerid)
  187. {
  188. return 1;
  189. }
  190.  
  191. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  192. {
  193. return 1;
  194. }
  195.  
  196. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  197. {
  198. return 1;
  199. }
  200.  
  201. public OnRconLoginAttempt(ip[], password[], success)
  202. {
  203. return 1;
  204. }
  205.  
  206. public OnPlayerUpdate(playerid)
  207. {
  208. return 1;
  209. }
  210.  
  211. public OnPlayerStreamIn(playerid, forplayerid)
  212. {
  213. return 1;
  214. }
  215.  
  216. public OnPlayerStreamOut(playerid, forplayerid)
  217. {
  218. return 1;
  219. }
  220.  
  221. public OnVehicleStreamIn(vehicleid, forplayerid)
  222. {
  223. return 1;
  224. }
  225.  
  226. public OnVehicleStreamOut(vehicleid, forplayerid)
  227. {
  228. return 1;
  229. }
  230.  
  231. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  232. {
  233. if(dialogid == DIALOG_MUSIC)
  234. {
  235. if(response)
  236. {
  237. switch(listitem)
  238. {
  239. case 0:
  240. {
  241. ShowPlayerDialog(playerid, DIALOG_MUSIC_PLAYLISTS, DIALOG_STYLE_LIST, "Radio Stations", "Mixed Rock", "Play","Cancel");
  242. }
  243. case 1:
  244. {
  245. ShowPlayerDialog(playerid, DIALOG_MUSIC_2014_HITS, DIALOG_STYLE_LIST, "2014 Hit Songs", "Lady Gaga - Applause\nLana Del Rey - Summertime Sadness\nLorde - Royals\nMiley Cyrus - Wrecking Ball\nWake Me Up -- Avicii ft. Aloe Blacc\nBlurred Lines - Robin Thicke\nCapital Cities - Safe & Sound\nDrake - Hold On We're Going Home\nJay Z FT Justin Timberlake - Holy Grail\nKaty Perry - Roar", "Play", "Back");
  246. }
  247. }
  248. }
  249. }
  250. if(dialogid == DIALOG_MUSIC_PLAYLISTS)
  251. {
  252. if(response)
  253. {
  254. switch(listitem)
  255. {
  256. case 0:
  257. {
  258. PlayAudioStreamForPlayer(playerid, "http://www.radioparadise.com/musiclinks/rp_128.m3u");//Only one here for now you can simply add your own again by
  259. SendClientMessage(playerid, COLOR_YELLOW, "You have started a AudioSteam");
  260. }
  261. //case 1;
  262. //{
  263. // PlayAudioSteamForPlayer(playerid, "Your URL can end in .m3u/.mp3/.pls");
  264. // SendClientMessage(playerid, ,your color, "Message you want the player to recieve");
  265. //} (remove the // if you want to use this and this)
  266. }
  267. }
  268. else return ShowPlayerDialog(playerid, DIALOG_MUSIC, DIALOG_STYLE_LIST, "Music", "Radio Playlists\nMP3's", "Open", "Cancel");
  269. }
  270. if(dialogid == DIALOG_MUSIC_2014_HITS)
  271. {
  272. if(response)
  273. {
  274. switch(listitem)
  275. {
  276. case 0:
  277. {
  278. PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/2c77kaegt5/Lady_Gaga_-_Applause_Official_.mp3");
  279. SendClientMessage(playerid, COLOR_YELLOW, "You have started a Audio Stream");
  280. }
  281. case 1:
  282. {
  283. PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/1v4l82x4nu/Lana_Del_Rey_-_Summertime_Sadness.mp3");
  284. SendClientMessage(playerid, COLOR_YELLOW, "You have started a Audio Stream");
  285. }
  286. case 2:
  287. {
  288. PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/11os4ugqn1/Lorde_-_Royals.mp3");
  289. SendClientMessage(playerid, COLOR_YELLOW, "You have started a Audio Stream");
  290. }
  291. case 3:
  292. {
  293. PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/i803retrlq/Miley_Cyrus_-_Wrecking_Ball.mp3");
  294. SendClientMessage(playerid, COLOR_YELLOW, "You have started a Audio Stream");
  295. }
  296. case 4:
  297. {
  298. PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/hgfd63p8n8/Wake_Me_Up_--_Avicii_ft._Aloe_Blacc_Lyrics.mp3");
  299. SendClientMessage(playerid, COLOR_YELLOW, "You have started a Audio Stream");
  300. }
  301. case 5:
  302. {
  303. PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/a7fl3k6hr3/Blurred_Lines_-_Robin_Thicke_Lyrics.mp3");
  304. SendClientMessage(playerid, COLOR_YELLOW, "You have started a Audio Stream");
  305. }
  306. case 6:
  307. {
  308. PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/ub1g2zvsj8/Capital_Cities_-_Safe_and_Sound.mp3");
  309. }
  310. case 7:
  311. {
  312. PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/66h4m2mg7p/Drake_-_Hold_On_We_re_Going_Home_Lyrics_.mp3");
  313. SendClientMessage(playerid, COLOR_YELLOW, "You have started a Audio Stream");
  314. }
  315. case 8:
  316. {
  317. PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/wldmg72u3z/JAY_Z_and_quot_Holy_Grail_and_quot_featuring_Justin_Timberlake.mp3");
  318. SendClientMessage(playerid, COLOR_YELLOW, "You have started a Audio Stream");
  319. }
  320. case 9:
  321. {
  322. PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/olwfhi7yxh/Katy_Perry_-_Roar_Official_.mp3");
  323. SendClientMessage(playerid, COLOR_YELLOW, "You have started a Audio Stream");
  324. }
  325. }
  326. }
  327. }
  328. else return ShowPlayerDialog(playerid, DIALOG_MUSIC, DIALOG_STYLE_LIST, "Music", "Radio Playlists\nMP3's", "Open", "Cancel");
  329. return 1;
  330. }
  331. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  332. {
  333. return 1;
  334. }
  335. CMD:music(playerid, params[])
  336. {
  337. ShowPlayerDialog(playerid, DIALOG_MUSIC, DIALOG_STYLE_LIST, "Music", "Radio Stations\n2014 Hit Songs", "Open", "Cancel");
  338. return 1;
  339. }
  340. CMD:stopmusic(playerid, params[])
  341. {
  342. StopAudioStreamForPlayer(playerid);
  343. SendClientMessage(playerid, COLOR_YELLOW, "You have stopped the audio stream!");
  344. return 1;
  345. }
Advertisement
Add Comment
Please, Sign In to add comment