Advertisement
Guest User

Všehoscript

a guest
Apr 24th, 2016
692
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.45 KB | None | 0 0
  1. /*Filterscript obsahuje:
  2. 1) /carmenu - Spawn auta přes dialog s ochranou proti spamu
  3. 2) /neon - Nainstalování neonu do auta
  4. 3) /setskin - Nastavení skinu
  5. 4) /opravauto - Oprava auta s časovou ochranou proti spamu
  6. 5) /zivoty - Doplnění full životů s časovou ochranou proti spamu
  7. 6) /radio - Spuštění radia
  8. 7) /mute a /unmute - Umlčení a odmlčení hráče
  9. 8) /barvy - Výběr barevného nicku
  10. 9) /chatcolor - Výber barvy pro barevné psaní do chatu
  11. +BONUS - Náhodné soutěže v chatu s výhrou zbraní*/
  12.  
  13. #include <a_samp>
  14. //#include <servermsg>
  15.  
  16. ////////////////////////////////////////////////////////////////////////////////
  17.  
  18. #define DIALOG_CARMENU 21000
  19. #define DIALOG_CHATCOLORS 21001
  20. #define DIALOG_RADIO 21002
  21. #define DIALOG_NICKCOLORS 21003
  22. #define DIALOG_NEON 21004
  23. #define EVENT_TEXT_LEN 10
  24. #define EVENTTIME (300000+random(180000))
  25. #define VEHCREATE_DISTANCE 4.0
  26.  
  27. ////////////////////////////////////////////////////////////////////////////////
  28.  
  29. enum VEHICLENAMES_ARRAY
  30. {
  31. Name[32],
  32. Modelid
  33. }
  34.  
  35. new VehicleNames[][VEHICLENAMES_ARRAY] =
  36. {
  37. {"Landstalker", 400},
  38. {"Bravura", 401},
  39. {"Buffalo", 402},
  40. {"Linerunner", 403},
  41. {"Pereniel", 404},
  42. {"Sentinel", 405},
  43. {"Dumper", 406},
  44. {"Firetruck", 407},
  45. {"Trashmaster", 408},
  46. {"Stretch", 409},
  47. {"Manana", 410},
  48. {"Infernus", 411},
  49. {"Voodoo", 412},
  50. {"Pony", 413},
  51. {"Mule", 414},
  52. {"Cheetah", 415},
  53. {"Ambulance", 416},
  54. {"Leviathan", 417},
  55. {"Moonbeam", 418},
  56. {"Esperanto", 419},
  57. {"Taxi", 420},
  58. {"Washington", 421},
  59. {"Bobcat", 422},
  60. {"Mr Whoopee", 423},
  61. {"BF Injection", 424},
  62. {"Hunter", 425},
  63. {"Premier", 426},
  64. {"Enforcer", 427},
  65. {"Securicar", 428},
  66. {"Banshee", 429},
  67. {"Predator", 430},
  68. {"Bus", 431},
  69. {"Barracks", 433},
  70. {"Hotknife", 434},
  71. {"Previon", 436},
  72. {"Coach", 437},
  73. {"Cabbie", 438},
  74. {"Stallion", 439},
  75. {"Rumpo", 440},
  76. {"Romero", 442},
  77. {"Packer", 443},
  78. {"Monster Truck", 444},
  79. {"Admiral", 445},
  80. {"Squalo", 446},
  81. {"Seasparrow", 447},
  82. {"Pizzaboy", 448},
  83. {"Turismo", 451},
  84. {"Speeder", 452},
  85. {"Reefer", 453},
  86. {"Tropic", 454},
  87. {"Flatbed", 455},
  88. {"Yankee", 456},
  89. {"Caddy", 457},
  90. {"Solair", 458},
  91. {"Berkley's RC Van", 459},
  92. {"Skimmer", 460},
  93. {"PCJ-600", 461},
  94. {"Faggio", 462},
  95. {"Freeway", 463},
  96. {"Glendale", 466},
  97. {"Oceanic", 467},
  98. {"Sanchez", 468},
  99. {"Sparrow", 469},
  100. {"Patriot", 470},
  101. {"Quad", 471},
  102. {"Coastguard", 472},
  103. {"Dinghy", 473},
  104. {"Hermes", 474},
  105. {"Sabre", 475},
  106. {"Rustler", 476},
  107. {"ZR-350", 477},
  108. {"Walton", 478},
  109. {"Regina", 479},
  110. {"Comet", 480},
  111. {"BMX", 481},
  112. {"Burrito", 482},
  113. {"Camper", 483},
  114. {"Marquis", 484},
  115. {"Baggage", 485},
  116. {"Dozer", 486},
  117. {"Maverick", 487},
  118. {"News Chopper", 488},
  119. {"Rancher", 489},
  120. {"FBI Rancher", 490},
  121. {"Virgo", 491},
  122. {"Greenwood", 492},
  123. {"Jetmax", 493},
  124. {"Hotring", 494},
  125. {"Sandking", 495},
  126. {"Blista Compact", 496},
  127. {"Police Maverick", 497},
  128. {"Boxville", 498},
  129. {"Benson", 499},
  130. {"Mesa", 500},
  131. {"Hotring Racer", 502},
  132. {"Hotring Racer", 503},
  133. {"Bloodring Banger", 504},
  134. {"Rancher", 505},
  135. {"Super GT", 506},
  136. {"Elegant", 507},
  137. {"Journey", 508},
  138. {"Bike", 509},
  139. {"Mountain Bike", 510},
  140. {"Beagle", 511},
  141. {"Cropdust", 512},
  142. {"Stunt", 513},
  143. {"Tanker", 514},
  144. {"RoadTrain", 515},
  145. {"Nebula", 516},
  146. {"Majestic", 517},
  147. {"Buccaneer", 518},
  148. {"Shamal", 519},
  149. {"Hydra", 520},
  150. {"FCR-900", 521},
  151. {"NRG-500", 522},
  152. {"HPV1000", 523},
  153. {"Cement Truck", 524},
  154. {"Tow Truck", 525},
  155. {"Fortune", 526},
  156. {"Cadrona", 527},
  157. {"FBI Truck", 528},
  158. {"Willard", 529},
  159. {"Forklift", 530},
  160. {"Tractor", 531},
  161. {"Combine", 532},
  162. {"Feltzer", 533},
  163. {"Remington", 534},
  164. {"Slamvan", 535},
  165. {"Blade", 536},
  166. {"Vortex", 539},
  167. {"Vincent", 540},
  168. {"Bullet", 541},
  169. {"Clover", 542},
  170. {"Sadler", 543},
  171. {"Firetruck", 544},
  172. {"Hustler", 545},
  173. {"Intruder", 546},
  174. {"Primo", 547},
  175. {"Cargobob", 548},
  176. {"Tampa", 549},
  177. {"Sunrise", 550},
  178. {"Merit", 551},
  179. {"Utility", 552},
  180. {"Nevada", 553},
  181. {"Yosemite", 554},
  182. {"Windsor", 555},
  183. {"Monster Truck", 556},
  184. {"Monster Truck", 557},
  185. {"Uranus", 558},
  186. {"Jester", 559},
  187. {"Sultan", 560},
  188. {"Stratum", 561},
  189. {"Elegy", 562},
  190. {"Raindance", 563},
  191. {"Flash", 565},
  192. {"Tahoma", 566},
  193. {"Savanna", 567},
  194. {"Bandito", 568},
  195. {"Kart", 571},
  196. {"Mower", 572},
  197. {"Duneride", 573},
  198. {"Sweeper", 574},
  199. {"Broadway", 575},
  200. {"Tornado", 576},
  201. {"AT-400", 577},
  202. {"DFT-30", 578},
  203. {"Huntley", 579},
  204. {"Stafford", 580},
  205. {"BF-400", 581},
  206. {"Newsvan", 582},
  207. {"Tug", 583},
  208. {"Emperor", 585},
  209. {"Wayfarer", 586},
  210. {"Euros", 587},
  211. {"Hotdog", 588},
  212. {"Club", 589},
  213. {"Andromada", 592},
  214. {"Dodo", 593},
  215. {"Launch", 595},
  216. {"Police Car (LS)", 596},
  217. {"Police Car (SF)", 597},
  218. {"Police Car (LV)", 598},
  219. {"Police Ranger", 599},
  220. {"Picador", 600},
  221. {"S.W.A.T. Van", 601},
  222. {"Alpha", 602},
  223. {"Phoenix", 603},
  224. {"Glendale", 604},
  225. {"Sadler", 605},
  226. {"Boxville", 609}
  227. };
  228.  
  229. enum CHATCOLORS_ARRAY
  230. {
  231. Color,
  232. Name[32]
  233. }
  234.  
  235. new Chatcolors[][CHATCOLORS_ARRAY] =
  236. {
  237. {0xFFFF00FF, "Žlutá"},
  238. {0xFF0000FF, "Červená"},
  239. {0x009900FF, "Zelená"},
  240. {0xFFFFFFFF, "Bílá"},
  241. {0xEE44EEFF, "Růžová"},
  242. {0x000088FF, "Tmavě modrá"},
  243. {0xFF7700FF, "Oranžová"},
  244. {0x845422FF, "Hnědá"},
  245. {0x8888FFFF, "Světle modrá"}
  246. };
  247.  
  248. enum NICKCOLORS_ARRAY
  249. {
  250. Color,
  251. Name[32]
  252. }
  253.  
  254. new Nickcolors[][NICKCOLORS_ARRAY] =
  255. {
  256. {0xFFFF00FF, "Žlutá"},
  257. {0xFF0000FF, "Červená"},
  258. {0x009900FF, "Zelená"},
  259. {0xFFFFFFFF, "Bílá"},
  260. {0xEE44EEFF, "Růžová"},
  261. {0x000088FF, "Tmavě modrá"},
  262. {0xFF7700FF, "Oranžová"},
  263. {0x845422FF, "Hnědá"},
  264. {0x8888FFFF, "Světle modrá"}
  265. };
  266.  
  267. new PVehicle[MAX_PLAYERS] = {-1, ...};
  268. new carmenuString[2048];
  269. new bool:Muted[MAX_PLAYERS];
  270. new Chatcolor[MAX_PLAYERS];
  271. new EventText[EVENT_TEXT_LEN+1] = {0, ...};
  272. new EventTimer = -1;
  273. new bool:EventState = false;
  274. new OpravautoTC[MAX_PLAYERS];
  275. new ZivotyTC[MAX_PLAYERS];
  276. new NeonObject[MAX_PLAYERS][2];
  277.  
  278. ////////////////////////////////////////////////////////////////////////////////
  279.  
  280. stock PlayerName(playerid)
  281. {
  282. new name[24];
  283. GetPlayerName(playerid, name, 24);
  284. return name;
  285. }
  286.  
  287. stock EventRandomChar()
  288. {
  289. if(random(36) < 26) return 'A' + random(26);
  290. else return '0' + random(10);
  291. }
  292.  
  293. ////////////////////////////////////////////////////////////////////////////////
  294.  
  295. forward ChatEvent();
  296. public ChatEvent()
  297. {
  298. EventState = true;
  299.  
  300. for(new i=0; i<EVENT_TEXT_LEN; i++) EventText[i] = EventRandomChar();
  301.  
  302. new string[128];
  303. format(string, 128, "{33CCFF}[ Soutěž ] Kdo jako první napíše do chatu {FFFF00}%s{33CCFF} vyhraje balík zbraní!", EventText);
  304. SendClientMessageToAll(0xFFFFFFFF, string);
  305.  
  306. EventTimer = SetTimer("ChatEvent", EVENTTIME, 0);
  307. return 1;
  308. }
  309.  
  310. public OnFilterScriptInit()
  311. {
  312. for(new i=0; i<sizeof(VehicleNames); i++)
  313. {
  314. strcat(carmenuString, VehicleNames[i][Name]);
  315. strcat(carmenuString, "\n");
  316. }
  317. strcat(carmenuString, "{ff0000}Zničit");
  318.  
  319. for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) OnPlayerConnect(i);
  320.  
  321. EventTimer = SetTimer("ChatEvent", EVENTTIME, 0);
  322.  
  323. return printf("FILTERSCRIPT LOADED");
  324. }
  325.  
  326. public OnFilterScriptExit()
  327. {
  328. for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) OnPlayerDisconnect(i, -1);
  329.  
  330. KillTimer(EventTimer);
  331.  
  332. return printf("FILTERSCRIPT UNLOADED");
  333. }
  334.  
  335. public OnPlayerConnect(playerid)
  336. {
  337. PVehicle[playerid] = -1;
  338. Muted[playerid] = false;
  339. Chatcolor[playerid] = 0xFFFFFFFF;
  340. OpravautoTC[playerid] = 0;
  341. ZivotyTC[playerid] = 0;
  342.  
  343. NeonObject[playerid][0] = -1;
  344. NeonObject[playerid][1] = -1;
  345. return 1;
  346. }
  347.  
  348. public OnPlayerDisconnect(playerid, reason)
  349. {
  350. if(PVehicle[playerid] != -1) DestroyVehicle(PVehicle[playerid]), PVehicle[playerid] = -1;
  351. if(NeonObject[playerid][0] != -1) DestroyObject(NeonObject[playerid][0]), NeonObject[playerid][0] = -1;
  352. if(NeonObject[playerid][1] != -1) DestroyObject(NeonObject[playerid][1]), NeonObject[playerid][1] = -1;
  353.  
  354. StopAudioStreamForPlayer(playerid);
  355. return 1;
  356. }
  357.  
  358. public OnPlayerText(playerid, text[])
  359. {
  360. if(!IsPlayerNPC(playerid))
  361. {
  362. if(Muted[playerid] == true)
  363. {
  364. SendClientMessage(playerid, 0xFF0000FF, "Jsi umlčený, nemůžeš psát!");
  365. }
  366. else
  367. {
  368. new string[144];
  369. format(string, 144, "%s [ID:%d]: {%06x}%s", PlayerName(playerid), playerid, Chatcolor[playerid] >>> 8, text);
  370. SendClientMessageToAll(GetPlayerColor(playerid), string);
  371. }
  372.  
  373. if(EventState == true)
  374. {
  375. if(strfind(text, EventText, true) != -1)
  376. {
  377. new string[128];
  378. format(string, 128, "{33CCFF}[ Soutěž ] Hráč {FFFF00}%s (%d){33CCFF} vyhrál soutěž!", PlayerName(playerid), playerid);
  379. SendClientMessageToAll(0xFFFFFFFF, string);
  380. EventState = false;
  381.  
  382. GivePlayerWeapon (playerid,24,1000); // deagle
  383. GivePlayerWeapon (playerid,29,2000); // SMG
  384. GivePlayerWeapon (playerid,31,2000); // M4
  385. GivePlayerWeapon (playerid,31,2000); // Uzi
  386. GivePlayerWeapon (playerid,16,30); // Granát
  387. }
  388. }
  389. return 0;
  390. }
  391. return 1;
  392. }
  393.  
  394. public OnPlayerCommandText(playerid, cmdtext[])
  395. {
  396. if(!IsPlayerNPC(playerid))
  397. {
  398. if(strcmp(cmdtext, "/opravauto", true) == 0)
  399. {
  400. if(GetPlayerVehicleID(playerid) == 0) return SendClientMessage(playerid, 0xFF0000FF, "Musíš byt v aute!");
  401. if(GetTickCount() < OpravautoTC[playerid])
  402. {
  403. new string[128];
  404. format(string, 128, "Tento příkaz můžeš znovu použít až za %d:%02d !", (OpravautoTC[playerid] - GetTickCount())/60000, ((OpravautoTC[playerid] - GetTickCount())%60000)/1000);
  405. return SendClientMessage(playerid, 0xFF0000FF, string);
  406. }
  407.  
  408. SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
  409. RepairVehicle(GetPlayerVehicleID(playerid));
  410.  
  411. OpravautoTC[playerid] = GetTickCount() + 120000;
  412.  
  413. PlayerPlaySound(playerid, 1057, 0, 0, 0);
  414. SendClientMessage(playerid, 0xFFFFFFFF, "Opravil jsi si auto!");
  415. return 1;
  416. }
  417.  
  418. //------------------------
  419.  
  420. if(strcmp(cmdtext, "/radio", true) == 0)
  421. {
  422. ShowPlayerDialog(playerid, DIALOG_RADIO, DIALOG_STYLE_LIST, "{ffff77}Rádio", "Evropa 2 CZ\nEurópa 2 SK\nImpuls\nFajn Radio\nDance Radio\nClub Radio\nExpres SK\n{ff0000}Stop", "OK", "Cancel");
  423. return 1;
  424. }
  425.  
  426. //------------------------
  427.  
  428. if(strcmp(cmdtext, "/zivoty", true) == 0)
  429. {
  430. if(GetTickCount() < ZivotyTC[playerid])
  431. {
  432. new string[128];
  433. format(string, 128, "Tento příkaz můžeš znovu použít až za %d:%02d !", (ZivotyTC[playerid] - GetTickCount())/60000, ((ZivotyTC[playerid] - GetTickCount())%60000)/1000);
  434. return SendClientMessage(playerid, 0xFF0000FF, string);
  435. }
  436.  
  437. SetPlayerHealth(playerid, 100.0);
  438.  
  439. ZivotyTC[playerid] = GetTickCount() + 300000;
  440.  
  441. PlayerPlaySound(playerid, 1057, 0, 0, 0);
  442. SendClientMessage(playerid, 0xFFFFFFFF, "Vylečil jsi se!");
  443. return 1;
  444. }
  445.  
  446. //------------------------
  447.  
  448. if(strcmp(cmdtext, "/carmenu", true) == 0)
  449. {
  450. ShowPlayerDialog(playerid, DIALOG_CARMENU, DIALOG_STYLE_LIST, "{ffff77}Carmenu", carmenuString, "OK", "Cancel");
  451. return 1;
  452. }
  453.  
  454. //------------------------
  455.  
  456. if(strcmp(cmdtext, "/neon", true) == 0)
  457. {
  458. ShowPlayerDialog(playerid, DIALOG_NEON, DIALOG_STYLE_LIST, "{ffff77}Neon", "Červená\nModrá\nZelená\nŽlutá\nRůžová\nBílá\n{ff0000}Smazat neony", "OK", "Cancel");
  459. return 1;
  460. }
  461.  
  462. //------------------------
  463.  
  464. if(strcmp(cmdtext, "/chatcolor", true) == 0)
  465. {
  466. new string[512];
  467. for(new i=0; i<sizeof(Chatcolors); i++) format(string, sizeof(string), "%s{%06x}%s\n", string, Chatcolors[i][Color] >>> 8, Chatcolors[i][Name]);
  468. ShowPlayerDialog(playerid, DIALOG_CHATCOLORS, DIALOG_STYLE_LIST, "{ffff77}Chatcolors", string, "OK", "Cancel");
  469. return 1;
  470. }
  471.  
  472. //------------------------
  473.  
  474. if(strcmp(cmdtext, "/barvy", true) == 0)
  475. {
  476. new string[512];
  477. for(new i=0; i<sizeof(Nickcolors); i++) format(string, sizeof(string), "%s{%06x}%s\n", string, Nickcolors[i][Color] >>> 8, Nickcolors[i][Name]);
  478. ShowPlayerDialog(playerid, DIALOG_NICKCOLORS, DIALOG_STYLE_LIST, "{ffff77}Nickcolors", string, "OK", "Cancel");
  479. return 1;
  480. }
  481.  
  482. //------------------------
  483.  
  484. if(strcmp(cmdtext, "/mute", true, 5) == 0)
  485. {
  486. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Musíš byt RCON Admin !");
  487. if(strlen(cmdtext) < 7) return SendClientMessage(playerid, 0xFF0000FF, "Použij: /mute [ ID ]");
  488.  
  489. new id = strval(cmdtext[6]);
  490.  
  491. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "Tento hráč není připojený !");
  492. if(IsPlayerNPC(id)) return SendClientMessage(playerid, 0xFF0000FF, "Toto je NPC!");
  493. if(Muted[id] == true) return SendClientMessage(playerid, 0xFF0000FF, "Tento hráč už je umlčený!");
  494.  
  495. Muted[id] = true;
  496.  
  497. new string[128];
  498. format(string, 128, "Byl si umlčený administrátorem %s (%d).", PlayerName(playerid), playerid);
  499. SendClientMessage(id, 0xFFFF77FF, string);
  500. format(string, 128, "Umlčel jsi hráče %s (%d).", PlayerName(id), id);
  501. SendClientMessage(playerid, 0xFFFF77FF, string);
  502. return 1;
  503. }
  504.  
  505. //------------------------
  506.  
  507. if(strcmp(cmdtext, "/unmute", true, 7) == 0)
  508. {
  509. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Musíš byt RCON Admin !");
  510. if(strlen(cmdtext) < 9) return SendClientMessage(playerid, 0xFF0000FF, "Použij: /unmute [ ID ]");
  511.  
  512. new id = strval(cmdtext[8]);
  513.  
  514. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "Tento hráč není připojený !");
  515. if(IsPlayerNPC(id)) return SendClientMessage(playerid, 0xFF0000FF, "Toto je NPC !");
  516. if(Muted[id] == false) return SendClientMessage(playerid, 0xFF0000FF, "Tento není umlčený !");
  517.  
  518. Muted[id] = false;
  519.  
  520. new string[128];
  521. format(string, 128, "Byl si odmlčený administrátorem %s (%d).", PlayerName(playerid), playerid);
  522. SendClientMessage(id, 0xFFFF77FF, string);
  523. format(string, 128, "Odmlčel jsi hráče %s (%d).", PlayerName(id), id);
  524. SendClientMessage(playerid, 0xFFFF77FF, string);
  525. return 1;
  526. }
  527.  
  528. //------------------------
  529.  
  530. if(strcmp(cmdtext, "/setskin", true, 8) == 0)
  531. {
  532. if(strlen(cmdtext) < 10) return SendClientMessage(playerid, 0xFF0000FF, "Použij: /setskin [ ID ]");
  533.  
  534. new id = strval(cmdtext[9]);
  535.  
  536. if(!(0 <= id <= 299)) return SendClientMessage(playerid, 0xFF0000FF, "Použij: /setskin [ 0-299 ]");
  537.  
  538. PlayerPlaySound(playerid, 1057, 0, 0, 0);
  539. SetPlayerSkin(playerid, id);
  540. return 1;
  541. }
  542. }
  543. return 0;
  544. }
  545.  
  546. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  547. {
  548. if(dialogid == DIALOG_CARMENU)
  549. {
  550. if(response)
  551. {
  552. if(PVehicle[playerid] != -1)
  553. {
  554. if(listitem == sizeof(VehicleNames)) PlayerPlaySound(playerid, 1057, 0, 0, 0);
  555. DestroyVehicle(PVehicle[playerid]), PVehicle[playerid] = -1;
  556. }
  557. else if(listitem == sizeof(VehicleNames)) PlayerPlaySound(playerid, 1053, 0, 0, 0);
  558.  
  559. if(listitem != sizeof(VehicleNames)) // != zničit
  560. {
  561. new Float:x, Float:y, Float:z, Float:a;
  562. GetPlayerPos(playerid, x, y, z);
  563. GetPlayerFacingAngle(playerid, a);
  564.  
  565. PVehicle[playerid] = CreateVehicle(VehicleNames[listitem][Modelid], x + floatmul(VEHCREATE_DISTANCE, floatsin(-a, degrees)), y + floatmul(VEHCREATE_DISTANCE, floatcos(-a, degrees)), z + 1.5, a + 90.0, random(128), random(128), 999999);
  566.  
  567. PlayerPlaySound(playerid, 1057, 0, 0, 0);
  568. }
  569. }
  570. }
  571.  
  572. //---------------------------
  573.  
  574. else if(dialogid == DIALOG_CHATCOLORS)
  575. {
  576. if(response)
  577. {
  578. Chatcolor[playerid] = Chatcolors[listitem][Color];
  579. PlayerPlaySound(playerid, 1057, 0, 0, 0);
  580.  
  581. new string[128];
  582. format(string, 128, "Nová barva písma v chate: {%06x}%s", Chatcolors[listitem][Color] >>> 8, Chatcolors[listitem][Name]);
  583. SendClientMessage(playerid, 0xFFFFFFFF, string);
  584. }
  585. }
  586.  
  587. //---------------------------
  588.  
  589. else if(dialogid == DIALOG_NICKCOLORS)
  590. {
  591. if(response)
  592. {
  593. SetPlayerColor(playerid, Nickcolors[listitem][Color]);
  594. PlayerPlaySound(playerid, 1057, 0, 0, 0);
  595.  
  596. new string[128];
  597. format(string, 128, "Tvoje nová barva: {%06x}%s", Nickcolors[listitem][Color] >>> 8, Nickcolors[listitem][Name]);
  598. SendClientMessage(playerid, 0xFFFFFFFF, string);
  599. }
  600. }
  601.  
  602. //---------------------------
  603.  
  604. else if(dialogid == DIALOG_RADIO)
  605. {
  606. if(response)
  607. {
  608. if(listitem == 0) PlayAudioStreamForPlayer(playerid, "http://icecast3.play.cz/evropa2-128.mp3.m3u");
  609. else if(listitem == 1) PlayAudioStreamForPlayer(playerid, "http://ice2.europa2.sk/fm-europa2sk-128");
  610. else if(listitem == 2) PlayAudioStreamForPlayer(playerid, "http://icecast5.play.cz/impuls128.mp3.m3u");
  611. else if(listitem == 3) PlayAudioStreamForPlayer(playerid, "http://ice.abradio.cz:8000/fajn128.mp3");
  612. else if(listitem == 4) PlayAudioStreamForPlayer(playerid, "http://www.play.cz/radio/danceradio192.mp3.m3u");
  613. else if(listitem == 5) PlayAudioStreamForPlayer(playerid, "http://radio.ipip.cz:7996/listen.pls");
  614. else if(listitem == 6) PlayAudioStreamForPlayer(playerid, "http://static.expres.sk/public/data/Playlist/stream/mp3_high.pls");
  615. else StopAudioStreamForPlayer(playerid);
  616.  
  617. PlayerPlaySound(playerid, 1057, 0, 0, 0);
  618. }
  619. }
  620.  
  621. //---------------------------
  622.  
  623. else if(dialogid == DIALOG_NEON)
  624. {
  625. if(response)
  626. {
  627. if(NeonObject[playerid][0] != -1) DestroyObject(NeonObject[playerid][0]), NeonObject[playerid][0] = -1;
  628. if(NeonObject[playerid][1] != -1) DestroyObject(NeonObject[playerid][1]), NeonObject[playerid][1] = -1;
  629.  
  630. new modelid = 0;
  631. if(listitem == 0) modelid = 18647;
  632. else if(listitem == 1) modelid = 18648;
  633. else if(listitem == 2) modelid = 18649;
  634. else if(listitem == 3) modelid = 18650;
  635. else if(listitem == 4) modelid = 18651;
  636. else if(listitem == 5) modelid = 18652;
  637.  
  638. if(modelid != 0)
  639. {
  640. if(GetPlayerVehicleID(playerid) == 0) return SendClientMessage(playerid, 0xFF0000FF, "Musíš být ve vozidle !");
  641.  
  642. NeonObject[playerid][0] = CreateObject(modelid, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  643. NeonObject[playerid][1] = CreateObject(modelid, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  644. AttachObjectToVehicle(NeonObject[playerid][0], GetPlayerVehicleID(playerid), -0.68, 0.04, -0.48, 0.00, 0.00, 0.00);
  645. AttachObjectToVehicle(NeonObject[playerid][1], GetPlayerVehicleID(playerid), 0.68, 0.04, -0.48, 0.00, 0.00, 0.00);
  646. }
  647.  
  648. PlayerPlaySound(playerid, 1057, 0, 0, 0);
  649. }
  650. }
  651. return 1;
  652. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement