Guest User

Untitled

a guest
Mar 19th, 2015
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.74 KB | None | 0 0
  1. /*
  2. =======================================================
  3. ---------------San1 Contact Details -------------------
  4. Skype:Adrian_Myrick - Pic of Me and Bandana
  5. =======================================================
  6. ===============FilterScript Credits====================
  7. (************) San1 For Creating It = ADRIAN MYRICK
  8. (**********) SA-MP Team for SA-MP
  9. (**********) Zeex For ZCMD Include
  10. (**********) Y_Less For Sscanf2 Include
  11. (**********) Incognito For Streamer Include
  12. (**********) Y_Less For Foreach Include
  13. =======================================================
  14.  
  15. -------Message-------
  16. If you wanna Add Variables Where they need a boombox Use the Variables which are
  17. Commented please..
  18.  
  19. P.s - /dance command is impleted for dancing to the boombox.
  20. ----------------------
  21. */
  22.  
  23. #define Filterscript
  24. #include <a_samp>//Credits to SA-MP Team
  25. #include <zcmd>//Credits to Zeex
  26. #include <sscanf2>//Credits to Y_Less
  27. #include <streamer>//Credits to Incognito
  28. #include <foreach>//Credits to Y_Less
  29.  
  30. //================Dialogs===================
  31. #define DIALOG_BOOMBOX 500
  32. #define DIALOG_BOOMBOX1 501
  33. #define DIALOG_BOOMBOX2 502
  34. #define DIALOG_BOOMBOX3 503
  35. #define DIALOG_BOOMBOX4 504
  36. #define DIALOG_BOOMBOX5 505
  37. #define DIALOG_BOOMBOX6 506
  38. #define DIALOG_BOOMBOX7 507
  39. //==========================================
  40. //--------------------------------------------------------
  41. //===============Variables==================
  42. #define SCM SendClientMessage
  43. //new Boombox[MAX_PLAYERS]; // Part of Variable
  44. new gPlayerLoggin[MAX_PLAYERS char];
  45. //==========================================
  46. //--------------------------------------------------------
  47. //===============Colors=====================
  48. #define COLOR_LIGHTBLUE 0x00C3FFFF
  49. #define COLOR_WHITE 0xFFFFFFFF
  50. #define COLOR_RED 0xFF0000FF
  51. #define COLOR_LIME 0x00FF33FF
  52. #define COLOR_GREY 0xAFAFAFFF
  53. #define COL_WHITE "{FFFFFF}"
  54. #define COL_LBLUE "{00C3FF}"
  55. #define COL_RED "{FF0000}"
  56. #define COL_LIME "{00FF33}"
  57. #define COLOR_PURPLE 0xC2A2DAAA
  58. //==========================================
  59. public OnFilterScriptInit()
  60. {
  61. print("----------------LOADED----------------");
  62. print("======Dynamic Boombox System by San1=====");
  63. print("----------------LOADED----------------");
  64. return 1;
  65. }
  66.  
  67. public OnFilterScriptExit()
  68. {
  69. print("----------------UNLOADED----------------");
  70. print("======Dynamic Boombox System by San1=====");
  71. print("----------------UNLOADED----------------");
  72. return 1;
  73. }
  74.  
  75. public OnPlayerConnect(playerid)
  76. {
  77. gPlayerLoggin{playerid} = 1;
  78. return 1;
  79. }
  80.  
  81. public OnPlayerDisconnect(playerid)
  82. {
  83. if(GetPVarType(playerid, "PlacedBB"))
  84. {
  85. DestroyDynamicObject(GetPVarInt(playerid, "PlacedBB"));
  86. DestroyDynamic3DTextLabel(Text3D:GetPVarInt(playerid, "BBLabel"));
  87. if(GetPVarType(playerid, "BBArea"))
  88. {
  89. foreach(Player,i)
  90. {
  91. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  92. {
  93. StopAudioStreamForPlayer(i);
  94. SendClientMessage(i, COLOR_LIGHTBLUE, " The boombox creator has disconnected from the server.");
  95. }
  96. }
  97. }
  98. }
  99. return 1;
  100. }
  101.  
  102. CMD:bbhelp(playerid, params[])
  103. {
  104. SendClientMessage(playerid, -1, "Boombox Commands---: /placeboombox /pickupboombox /setboombox---");
  105. return 1;
  106. }
  107.  
  108. /*CMD:abbhelp(playerid, params[])// Part of Variable
  109. {
  110. if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_WHITE, "You are not authorized to use this command");
  111. SendClientMessage(playerid, -1, "Boombox Commands---: /giveboombox---");
  112. return 1;
  113. }*/
  114.  
  115. /*CMD:giveboombox(playerid, params[]) // Part of Variable
  116. {
  117. if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_WHITE, "You are not authorized to use this command");
  118. new targetid, string[128], pname[MAX_PLAYER_NAME];
  119. if(sscanf(params,"u", targetid)) return SCM(playerid, COLOR_WHITE, "USAGE:/giveboombox [playerid]");
  120. Boombox[targetid] = 1;
  121. GetPlayerName(targetid, pname, sizeof(pname));
  122. format(string, sizeof(string), "You Have Given %s a Boombox", pname);
  123. SCM(playerid, COLOR_LIGHTBLUE, string);
  124. SCM(targetid, COLOR_LIGHTBLUE, "You have been given a boombox by an administrator(/bbhelp)");
  125. return 1;
  126. }*/
  127.  
  128. CMD:dance(playerid, params[])//Dance Command to Dance to the boombox
  129. {
  130. new animid;
  131. if(sscanf(params, "i", animid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dance [1-4]");
  132. if(animid < 1 || animid > 4) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dance [1-4]");
  133. switch(animid)
  134. {
  135. case 1: SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DANCE1);
  136. case 2: SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DANCE2);
  137. case 3: SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DANCE3);
  138. case 4: SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DANCE4);
  139. }
  140. return 1;
  141. }
  142.  
  143. CMD:placeboombox(playerid, params[])
  144. {
  145. new string[128], Float:BBCoord[4], pName[MAX_PLAYER_NAME];
  146. GetPlayerPos(playerid, BBCoord[0], BBCoord[1], BBCoord[2]);
  147. GetPlayerFacingAngle(playerid, BBCoord[3]);
  148. SetPVarFloat(playerid, "BBX", BBCoord[0]);
  149. SetPVarFloat(playerid, "BBY", BBCoord[1]);
  150. SetPVarFloat(playerid, "BBZ", BBCoord[2]);
  151. GetPlayerName(playerid, pName, sizeof(pName));
  152. BBCoord[0] += (2 * floatsin(-BBCoord[3], degrees));
  153. BBCoord[1] += (2 * floatcos(-BBCoord[3], degrees));
  154. BBCoord[2] -= 1.0;
  155. //if(Boombox[playerid] == 0) return SCM(playerid, COLOR_WHITE, "You don't have a Boombox - Ask a Admin for one"); // Part of Variable
  156. if(GetPVarInt(playerid, "PlacedBB")) return SCM(playerid, -1, "You already placed a Boombox - use /pickupboombox");
  157. foreach(Player, i)
  158. {
  159. if(GetPVarType(i, "PlacedBB"))
  160. {
  161. if(IsPlayerInRangeOfPoint(playerid, 30.0, GetPVarFloat(i, "BBX"), GetPVarFloat(i, "BBY"), GetPVarFloat(i, "BBZ")))
  162. {
  163. SendClientMessage(playerid, COLOR_WHITE, "You cannot put your boombox in this Radius as their is already one placed in this radius");
  164. return 1;
  165. }
  166. }
  167. }
  168. new string2[128];
  169. format(string2, sizeof(string2), "%s has placed down an boombox!", pName);
  170. SendNearbyMessage(playerid, 15, string2, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  171. SetPVarInt(playerid, "PlacedBB", CreateDynamicObject(2226, BBCoord[0], BBCoord[1], BBCoord[2], 0.0, 0.0, 0.0, .worldid = GetPlayerVirtualWorld(playerid), .interiorid = GetPlayerInterior(playerid)));
  172. format(string, sizeof(string), "Boombox Owner: %s\nUse /setboombox to set your boombox\n/pickupboombox to Pick up your boombox", pName);
  173. SetPVarInt(playerid, "BBLabel", _:CreateDynamic3DTextLabel(string, -1, BBCoord[0], BBCoord[1], BBCoord[2]+0.6, 5, .worldid = GetPlayerVirtualWorld(playerid), .interiorid = GetPlayerInterior(playerid)));
  174. SetPVarInt(playerid, "BBArea", CreateDynamicSphere(BBCoord[0], BBCoord[1], BBCoord[2], 30.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid)));
  175. SetPVarInt(playerid, "BBInt", GetPlayerInterior(playerid));
  176. SetPVarInt(playerid, "BBVW", GetPlayerVirtualWorld(playerid));
  177. ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
  178. ApplyAnimation(playerid,"BOMBER","BOM_Plant",4.0,0,0,0,0,0);
  179. return 1;
  180. }
  181.  
  182. CMD:setboombox(playerid, params[])
  183. {
  184. if(GetPVarType(playerid, "PlacedBB"))
  185. {
  186. if(IsPlayerInRangeOfPoint(playerid, 3.0, GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ")))
  187. {
  188. ShowPlayerDialog(playerid,DIALOG_BOOMBOX,DIALOG_STYLE_LIST,"Radio List","Jazz\nPop\nRap\nR&B and Urban\nRock\nCountry\nEnter URL\nTurn Off Boombox","Select", "Cancel");
  189. }
  190. else
  191. {
  192. return SendClientMessage(playerid, -1, "You're not near in your BoomBox!");
  193. }
  194. }
  195. else
  196. {
  197. SendClientMessage(playerid, -1, " You don't have a boombox placed down!");
  198. }
  199. return 1;
  200. }
  201.  
  202. CMD:pickupboombox(playerid, params [])
  203. {
  204. if(!GetPVarInt(playerid, "PlacedBB"))
  205. {
  206. SendClientMessage(playerid, -1, "You haven't placed a Boombox!");
  207. }
  208. if(IsPlayerInRangeOfPoint(playerid, 3.0, GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ")))
  209. {
  210. PickUpBoombox(playerid);
  211. SendClientMessage(playerid, -1, "Boombox picked up successfully.");
  212. }
  213. return 1;
  214. }
  215.  
  216. public OnPlayerEnterDynamicArea(playerid, areaid)
  217. {
  218. foreach(Player, i)
  219. {
  220. if(GetPVarType(i, "BBArea"))
  221. {
  222. if(areaid == GetPVarInt(i, "BBArea"))
  223. {
  224. new station[256];
  225. GetPVarString(i, "BBStation", station, sizeof(station));
  226. if(!isnull(station))
  227. {
  228. PlayStream(playerid, station, GetPVarFloat(i, "BBX"), GetPVarFloat(i, "BBY"), GetPVarFloat(i, "BBZ"), 30.0, 1);
  229. SendClientMessage(playerid, -1, "You have entered an boombox area");
  230. }
  231. return 1;
  232. }
  233. }
  234. }
  235. return 1;
  236. }
  237.  
  238. public OnPlayerLeaveDynamicArea(playerid, areaid)
  239. {
  240. foreach(Player, i)
  241. {
  242. if(GetPVarType(i, "BBArea"))
  243. {
  244. if(areaid == GetPVarInt(i, "BBArea"))
  245. {
  246. StopStream(playerid);
  247. SendClientMessage(playerid, -1, "You have left the boombox area");
  248. return 1;
  249. }
  250. }
  251. }
  252. return 1;
  253. }
  254.  
  255. stock StopStream(playerid)
  256. {
  257. DeletePVar(playerid, "pAudioStream");
  258. StopAudioStreamForPlayer(playerid);
  259. }
  260.  
  261. stock PlayStream(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0)
  262. {
  263. if(GetPVarType(playerid, "pAudioStream")) StopAudioStreamForPlayer(playerid);
  264. else SetPVarInt(playerid, "pAudioStream", 1);
  265. PlayAudioStreamForPlayer(playerid, url, posX, posY, posZ, distance, usepos);
  266. }
  267.  
  268. stock PickUpBoombox(playerid)
  269. {
  270. foreach(Player, i)
  271. {
  272. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  273. {
  274. StopStream(i);
  275. }
  276. }
  277. DeletePVar(playerid, "BBArea");
  278. DestroyDynamicObject(GetPVarInt(playerid, "PlacedBB"));
  279. DestroyDynamic3DTextLabel(Text3D:GetPVarInt(playerid, "BBLabel"));
  280. DeletePVar(playerid, "PlacedBB"); DeletePVar(playerid, "BBLabel");
  281. DeletePVar(playerid, "BBX"); DeletePVar(playerid, "BBY"); DeletePVar(playerid, "BBZ");
  282. DeletePVar(playerid, "BBInt");
  283. DeletePVar(playerid, "BBVW");
  284. DeletePVar(playerid, "BBStation");
  285. return 1;
  286. }
  287.  
  288. stock SendNearbyMessage(playerid, Float:radius, string[], col1, col2, col3, col4, col5)
  289. {
  290. new Float:x, Float:y, Float:z;
  291. GetPlayerPos(playerid, x, y, z);
  292. new Float:ix, Float:iy, Float:iz;
  293. new Float:cx, Float:cy, Float:cz;
  294. foreach(Player, i)
  295. {
  296. if(gPlayerLoggin{i})
  297. {
  298. if(GetPlayerInterior(playerid) == GetPlayerInterior(i) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
  299. {
  300. GetPlayerPos(i, ix, iy, iz);
  301. cx = (x - ix);
  302. cy = (y - iy);
  303. cz = (z - iz);
  304. if(((cx < radius/16) && (cx > -radius/16)) && ((cy < radius/16) && (cy > -radius/16)) && ((cz < radius/16) && (cz > -radius/16)))
  305. {
  306. SendClientMessage(i, col1, string);
  307. }
  308. else if(((cx < radius/8) && (cx > -radius/8)) && ((cy < radius/8) && (cy > -radius/8)) && ((cz < radius/8) && (cz > -radius/8)))
  309. {
  310. SendClientMessage(i, col2, string);
  311. }
  312. else if(((cx < radius/4) && (cx > -radius/4)) && ((cy < radius/4) && (cy > -radius/4)) && ((cz < radius/4) && (cz > -radius/4)))
  313. {
  314. SendClientMessage(i, col3, string);
  315. }
  316. else if(((cx < radius/2) && (cx > -radius/2)) && ((cy < radius/2) && (cy > -radius/2)) && ((cz < radius/2) && (cz > -radius/2)))
  317. {
  318. SendClientMessage(i, col4, string);
  319. }
  320. else if(((cx < radius) && (cx > -radius)) && ((cy < radius) && (cy > -radius)) && ((cz < radius) && (cz > -radius)))
  321. {
  322. SendClientMessage(i, col5, string);
  323. }
  324. }
  325. }
  326. }
  327. return 1;
  328. }
  329.  
  330. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  331. {
  332. if(dialogid == DIALOG_BOOMBOX)
  333. {
  334. if(!response)
  335. {
  336. SendClientMessage(playerid, COLOR_WHITE, " You cancel the Radio Station");
  337. return 1;
  338. }
  339. switch(listitem)
  340. {
  341. case 0:
  342. {
  343. ShowPlayerDialog(playerid,DIALOG_BOOMBOX1,DIALOG_STYLE_LIST,"Jazz","Smooth Jazz\nCrooze Jazz","Select","Cancel");
  344. }
  345. case 1:
  346. {
  347. ShowPlayerDialog(playerid,DIALOG_BOOMBOX2,DIALOG_STYLE_LIST,"Pop","Power FM\nCharHitz","Select","Cancel");
  348. }
  349. case 2:
  350. {
  351. ShowPlayerDialog(playerid,DIALOG_BOOMBOX3,DIALOG_STYLE_LIST,"Rap","RadioUP #1\nFlow 103 Rap","Select","Cancel");
  352. }
  353. case 3:
  354. {
  355. ShowPlayerDialog(playerid,DIALOG_BOOMBOX4,DIALOG_STYLE_LIST,"Hip Hop","Hot 108 Jamz\nThe Beat #1","Select","Cancel");
  356. }
  357. case 4:
  358. {
  359. ShowPlayerDialog(playerid,DIALOG_BOOMBOX5,DIALOG_STYLE_LIST,"Rock","Radio Paradise\nNoise FM","Select","Cancel");
  360. }
  361. case 5:
  362. {
  363. ShowPlayerDialog(playerid,DIALOG_BOOMBOX6,DIALOG_STYLE_LIST,"Country","181 Kicking Country\nAbsolute Country Radio","Select","Cancel");
  364. }
  365. case 6:
  366. {
  367. ShowPlayerDialog(playerid,DIALOG_BOOMBOX7,DIALOG_STYLE_INPUT, "Boombox Input URL", "Please put a Music URL to play the Music", "Play", "Cancel");
  368. }
  369. case 7:
  370. {
  371. if(GetPVarType(playerid, "BBArea"))
  372. {
  373. new string[128], pName[MAX_PLAYER_NAME];
  374. GetPlayerName(playerid, pName, sizeof(pName));
  375. format(string, sizeof(string), "* %s has turned off their boombox.", pName);
  376. SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
  377. foreach(Player, i)
  378. {
  379. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  380. {
  381. StopStream(i);
  382. }
  383. }
  384. DeletePVar(playerid, "BBStation");
  385. }
  386. SendClientMessage(playerid, COLOR_WHITE, "You've turn off your boombox");
  387. }
  388. }
  389. return 1;
  390. }
  391. if(dialogid == DIALOG_BOOMBOX1)//JAZZ
  392. {
  393. if(!response)
  394. {
  395. ShowPlayerDialog(playerid,DIALOG_BOOMBOX,DIALOG_STYLE_LIST,"Radio List","Jazz\nPop\nRap\nR&B and Urban\nRock\nCountry\nEnter URL\nTurn Off Boombox","Select", "Cancel");
  396. }
  397. if(response)
  398. {
  399. if(listitem == 0)
  400. {
  401. if(GetPVarType(playerid, "PlacedBB"))
  402. {
  403. foreach(Player, i)
  404. {
  405. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  406. {
  407. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=467000", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  408. }
  409. }
  410. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=467000");
  411. }
  412. }
  413. if(listitem == 1)
  414. {
  415. if(GetPVarType(playerid, "PlacedBB"))
  416. {
  417. foreach(Player, i)
  418. {
  419. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  420. {
  421. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=146931", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  422. }
  423. }
  424. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=146931");
  425. }
  426. }
  427. }
  428. return 1;
  429. }
  430. if(dialogid == DIALOG_BOOMBOX2)//POP
  431. {
  432. if(!response)
  433. {
  434. ShowPlayerDialog(playerid,DIALOG_BOOMBOX,DIALOG_STYLE_LIST,"Radio List","Jazz\nPop\nRap\nR&B and Urban\nRock\nCountry\nEnter URL\nTurn Off Boombox","Select", "Cancel");
  435. }
  436. if(response)
  437. {
  438. if(listitem == 0)
  439. {
  440. if(GetPVarType(playerid, "PlacedBB"))
  441. {
  442. foreach(Player, i)
  443. {
  444. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  445. {
  446. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=13448", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  447. }
  448. }
  449. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=13448");
  450. }
  451. }
  452. if(listitem == 1)
  453. {
  454. if(GetPVarType(playerid, "PlacedBB"))
  455. {
  456. foreach(Player, i)
  457. {
  458. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  459. {
  460. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=31645", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  461. }
  462. }
  463. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=31645");
  464. }
  465. }
  466. }
  467. return 1;
  468. }
  469. if(dialogid == DIALOG_BOOMBOX3)//RAP
  470. {
  471. if(!response)
  472. {
  473. ShowPlayerDialog(playerid,DIALOG_BOOMBOX,DIALOG_STYLE_LIST,"Radio List","Jazz\nPop\nRap\nR&B and Urban\nRock\nCountry\nEnter URL\nTurn Off Boombox","Select", "Cancel");
  474. }
  475. if(response)
  476. {
  477. if(listitem == 0)
  478. {
  479. if(GetPVarType(playerid, "PlacedBB"))
  480. {
  481. foreach(Player, i)
  482. {
  483. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  484. {
  485. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=656213", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  486. }
  487. }
  488. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=656213");
  489. }
  490. }
  491. if(listitem == 1)
  492. {
  493. if(GetPVarType(playerid, "PlacedBB"))
  494. {
  495. foreach(Player, i)
  496. {
  497. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  498. {
  499. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=293191", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  500. }
  501. }
  502. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=293191");
  503. }
  504. }
  505. }
  506. return 1;
  507. }
  508. if(dialogid == DIALOG_BOOMBOX4)//HIP HOP
  509. {
  510. if(!response)
  511. {
  512. ShowPlayerDialog(playerid,DIALOG_BOOMBOX,DIALOG_STYLE_LIST,"Radio List","Jazz\nPop\nRap\nR&B and Urban\nRock\nCountry\nEnter URL\nTurn Off Boombox","Select", "Cancel");
  513. }
  514. if(response)
  515. {
  516. if(listitem == 0)
  517. {
  518. if(GetPVarType(playerid, "PlacedBB"))
  519. {
  520. foreach(Player, i)
  521. {
  522. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  523. {
  524. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=32999", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  525. }
  526. }
  527. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=32999");
  528. }
  529. }
  530. if(listitem == 1)
  531. {
  532. if(GetPVarType(playerid, "PlacedBB"))
  533. {
  534. foreach(Player, i)
  535. {
  536. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  537. {
  538. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=105867", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  539. }
  540. }
  541. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=105867");
  542. }
  543. }
  544. }
  545. return 1;
  546. }
  547. if(dialogid == DIALOG_BOOMBOX5)//ROCK
  548. {
  549. if(!response)
  550. {
  551. ShowPlayerDialog(playerid,DIALOG_BOOMBOX,DIALOG_STYLE_LIST,"Radio List","Jazz\nPop\nRap\nR&B and Urban\nRock\nCountry\nEnter URL\nTurn Off Boombox","Select", "Cancel");
  552. }
  553. if(response)
  554. {
  555. if(listitem == 0)
  556. {
  557. if(GetPVarType(playerid, "PlacedBB"))
  558. {
  559. foreach(Player, i)
  560. {
  561. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  562. {
  563. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=785339", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  564. }
  565. }
  566. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=785339");
  567. }
  568. }
  569. if(listitem == 1)
  570. {
  571. if(GetPVarType(playerid, "PlacedBB"))
  572. {
  573. foreach(Player, i)
  574. {
  575. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  576. {
  577. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=19275", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  578. }
  579. }
  580. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=19275");
  581. }
  582. }
  583. }
  584. return 1;
  585. }
  586. if(dialogid == DIALOG_BOOMBOX6)//COUNTRY
  587. {
  588. if(!response)
  589. {
  590. ShowPlayerDialog(playerid,DIALOG_BOOMBOX,DIALOG_STYLE_LIST,"Radio List","Jazz\nPop\nRap\nR&B and Urban\nRock\nCountry\nEnter URL\nTurn Off Boombox","Select", "Cancel");
  591. }
  592. if(response)
  593. {
  594. if(listitem == 0)
  595. {
  596. if(GetPVarType(playerid, "PlacedBB"))
  597. {
  598. foreach(Player, i)
  599. {
  600. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  601. {
  602. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=71887", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  603. }
  604. }
  605. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=71887");
  606. }
  607. }
  608. if(listitem == 1)
  609. {
  610. if(GetPVarType(playerid, "PlacedBB"))
  611. {
  612. foreach(Player, i)
  613. {
  614. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  615. {
  616. PlayStream(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=34839", GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  617. }
  618. }
  619. SetPVarString(playerid, "BBStation", "http://yp.shoutcast.com/sbin/tunein-station.pls?id=34839");
  620. }
  621. }
  622. }
  623. return 1;
  624. }
  625. if(dialogid == DIALOG_BOOMBOX7)//SET URL
  626. {
  627. if(response == 1)
  628. {
  629. if(isnull(inputtext))
  630. {
  631. SendClientMessage(playerid, COLOR_WHITE, "You did not enter anything" );
  632. return 1;
  633. }
  634. if(strlen(inputtext))
  635. {
  636. if(GetPVarType(playerid, "PlacedBB"))
  637. {
  638. foreach(Player, i)
  639. {
  640. if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "BBArea")))
  641. {
  642. PlayStream(i, inputtext, GetPVarFloat(playerid, "BBX"), GetPVarFloat(playerid, "BBY"), GetPVarFloat(playerid, "BBZ"), 30.0, 1);
  643. }
  644. }
  645. SetPVarString(playerid, "BBStation", inputtext);
  646. }
  647. }
  648. }
  649. else
  650. {
  651. return 1;
  652. }
  653. }
  654. return 1;
  655. }
Advertisement
Add Comment
Please, Sign In to add comment