Advertisement
Guest User

Untitled

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