Advertisement
Guest User

Untitled

a guest
Mar 17th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.85 KB | None | 0 0
  1. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2. {
  3. new sendername[MAX_PLAYER_NAME];
  4. new string[128];
  5. if(dialogid == DIALOG_RADIO)
  6. {
  7. if(response)
  8. {
  9. switch(listitem)
  10. {
  11. case 0: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/radiowish");
  12. case 1: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/radiohit");
  13. case 2: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/contactfm");
  14. case 3: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/romanianhiphop");
  15. case 4: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/romanianmanele");
  16. case 5: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/romanianpopular");
  17. case 6: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/profm");
  18. case 7: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/gmusic");
  19. case 8: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/radiotube");
  20. case 9: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/radiomafia");
  21. case 10: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/greudedifuzat");
  22. case 11: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/stopradio");
  23. }
  24. }
  25. return 1;
  26. }
  27. if(dialogid == 1212)
  28. {
  29. if(response)
  30. {
  31. ShowPlayerDialog(playerid,1216,DIALOG_STYLE_MSGBOX,"Atentie!","{FFFF00}Trebuie sa conduci mereu pe partea dreapta!\nSingura data cand poti conduce pe partea stanga este atunci cand drumul este blocat \nNu trebuie sa stai la semafoare,deoarecere ar dura prea mult \nNu ai voie sa conduci cu viteza foarte mare,poti primi amenda pentru asa ceva sau carnetul iti poate fi confiscat!","Continua","");
  32. }
  33. }
  34. if(dialogid == 1213)
  35. {
  36. if(response)
  37. {
  38. ShowPlayerDialog(playerid,1214,DIALOG_STYLE_LIST,"Ce trebuie sa faci daca un politist vrea sa te opreasca?","Fug si le arat semne obscene\nOpresc si arat permisul de conducere\nAccelerez mai mult\nOpresc ii injur si apoi fug","Select","");
  39. }
  40. }
  41. if(dialogid == 1216)
  42. {
  43. if(response)
  44. {
  45. ShowPlayerDialog(playerid,1217,DIALOG_STYLE_MSGBOX,"Atentie!","{FFFF00}Trebuie sa tragi pe dreapta daca o masina de politie ti-o cere\nDeasemenea,trebuie sa tragi pe dreapta daca o masina de politie trece cu girofarele pornite\nNu folosi nitro daca nu ai acordul unui politist\nTine minte: Pentru curse ilegale poti fi arestat iar masina iti va fi confiscata","Continua","");
  46. }
  47. }
  48. if(dialogid == 1217)
  49. {
  50. if(response)
  51. {
  52. ShowPlayerDialog(playerid,1218,DIALOG_STYLE_MSGBOX,"Atentie!","{FFFF00}Daca cineva iti fura masina foloseste /call 911\nDeasemenea,daca esti martorul unui accident si victimele sunt prea ranite sa o faca,suna medicii\nNu ai voie sa opresti in mijlocul strazii\n\n\n{FF0000}Acesta a fost tutorialul!\nAcum urmeaza testul!","Continua","");
  53. }
  54. }
  55. if(dialogid == 1218)
  56. {
  57. if(response)
  58. {
  59. ShowPlayerDialog(playerid,1214,DIALOG_STYLE_LIST,"Ce trebuie sa faci daca un politist vrea sa te opreasca?","Fug si le arat semne obscene\nOpresc si arat permisul de conducere\nAccelerez mai mult\nOpresc ii injur si apoi fug","Select","");
  60. }
  61. }
  62. if(dialogid == 50)
  63. {
  64. if(response)
  65. {
  66. if(listitem == 0)
  67. {
  68. PlayerInfo[playerid][pSex] = 1;
  69. SendClientMessage(playerid,COLOR_YELLOW,"OK,Deci esti baiat");
  70. ShowPlayerDialog(playerid,51,DIALOG_STYLE_LIST,"Alege unde vrei sa fi spawnat","LosSantos \nLasVenturas","Select","");
  71. }
  72. else if(listitem == 1)
  73. {
  74. PlayerInfo[playerid][pSex] = 2;
  75. SendClientMessage(playerid,COLOR_YELLOW,"OK,Deci esti fata");
  76. ShowPlayerDialog(playerid,51,DIALOG_STYLE_LIST,"Alege unde vrei sa fi spawnat","LosSantos \nLasVenturas","Select","");
  77. }
  78. }
  79. }
  80. if(dialogid == 51)
  81. {
  82. if(response)
  83. {
  84. if(listitem == 0)
  85. {
  86. PlayerInfo[playerid][pOrigin] = 1;//LS
  87. SendClientMessage(playerid,COLOR_YELLOW,"OK,Deci vei fi spawnat in LS");
  88. //SpawnPlayer(playerid);
  89. ShowPlayerDialog(playerid,52,DIALOG_STYLE_INPUT,"Varsta","Scrie ce varsta ai!","OK","");
  90. }
  91. else if(listitem == 1)
  92. {
  93. PlayerInfo[playerid][pOrigin] = 2;//LV
  94. SendClientMessage(playerid,COLOR_YELLOW,"OK,Deci vei fi spawnat in LV");
  95. //SpawnPlayer(playerid);
  96. ShowPlayerDialog(playerid,52,DIALOG_STYLE_INPUT,"Varsta","Scrie ce varsta ai!","OK","");
  97. }
  98. }
  99. }
  100. if(dialogid == 52)
  101. {
  102. if(response)
  103. {
  104. new varsta = strval(inputtext);
  105. if(varsta >5 && varsta<90)
  106. {
  107. format(string,256,"Deci ai %d ani",varsta);
  108. SendClientMessage(playerid,COLOR_GRAD1,string);
  109. PlayerInfo[playerid][pAge] = varsta;
  110. RegistrationStep[playerid] = 0;
  111. TutTime[playerid] = 1;
  112. OnPlayerUpdateEx(playerid);
  113. }
  114. else return ShowPlayerDialog(playerid,52,DIALOG_STYLE_INPUT,"Varsta","Scrie ce varsta ai!","OK","");
  115. }
  116. }
  117.  
  118. if(response)
  119. {
  120. if(dialogid == 12346 || dialogid == 12347)
  121. {
  122. if(strlen(inputtext))
  123. {
  124. new tmppass[64];
  125. strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
  126. //Encrypt(tmppass);
  127. OnPlayerLogin(playerid,tmppass);
  128. }
  129. else
  130. {
  131. new loginstring[128];
  132. new loginname[64];
  133. GetPlayerName(playerid,loginname,sizeof(loginname));
  134. format(loginstring,sizeof(loginstring),"WRONG PASSWORD\nPlease enter the correct password:",loginname);
  135. ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Exit");
  136. gPlayerLogTries[playerid] += 1;
  137. if(gPlayerLogTries[playerid] == 5) { Ban(playerid); }
  138. }
  139. }
  140. if(dialogid == 171)
  141. {
  142. if(response)
  143. {
  144. new Float:x,Float:y,Float:z,Float:ang;
  145. new idcar = GetPlayerVehicleID(playerid);
  146. SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
  147. GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
  148. GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
  149. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  150. SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
  151. SetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
  152. strmid(CarInfo[idcar][cLicense], inputtext, 0, strlen(inputtext), 999);
  153. SaveCarCoords();
  154. OnPropUpdate();
  155. }
  156. }
  157. //==========================================[Savecar]=====================================================
  158. if(dialogid == 1300)
  159. {
  160. if(response)
  161. {
  162. new car = GetPlayerVehicleID(playerid);
  163. if(listitem == 0)
  164. {
  165. new Float:X,Float:Y,Float:Z,Float:A;
  166. GetVehiclePos(car,X,Y,Z);
  167. GetVehicleZAngle(car, A);
  168. CarInfo[car][cLocationx] = X;
  169. CarInfo[car][cLocationy] = Y;
  170. CarInfo[car][cLocationz] = Z;
  171. CarInfo[car][cAngle] = A;
  172. format(string, sizeof(string), "~n~ You have parked your vehicle in this location. ~n~");
  173. GameTextForPlayer(playerid, "You have parked your vehicle in this position. It will respawn here.", 10000, 3);
  174. }
  175. else if(listitem == 1)
  176. {
  177. new list[] = "Spoiler \n Hood \n Roof \n Sideskirt \n Lamps \n Nitro \n Exhaust \n Wheels \n Stereo \n Hydraulics \n Front Bumper \n Rear Bumper \n Vent Right \n Vent Left";
  178. ShowPlayerDialog(playerid, 1301,DIALOG_STYLE_LIST,"Select the Modification",list,"Ok","");
  179. }
  180. else if(listitem == 2)
  181. {
  182. SaveVehicleComponents(car);
  183. SendClientMessage(playerid, COLOR_GREY,"* All the modifications on the car were saved!");
  184. }
  185. else if(listitem == 3)
  186. {
  187. new list[] = "Spoiler \n Hood \n Roof \n Sideskirt \n Lamps \n Nitro \n Exhaust \n Wheels \n Stereo \n Hydraulics \n Front Bumper \n Rear Bumper \n Vent Right \n Vent Left";
  188. ShowPlayerDialog(playerid, 1302,DIALOG_STYLE_LIST,"Select the Modification",list,"Ok","");
  189. }
  190. else if(listitem == 4)
  191. {
  192. ClearVehicleComponents(car);
  193. SendClientMessage(playerid, COLOR_GREY,"* All the modifications on the car were saved!");
  194. }
  195. }
  196. }
  197. if(dialogid == 1301)
  198. {
  199. if(response)
  200. {
  201. new car = GetPlayerVehicleID(playerid);
  202. if(listitem == 0)
  203. {
  204. new component2 = GetVehicleComponentInSlot(car, 0);
  205. new component = CarInfo[car][cComponent0];
  206. if(component2 != 0)
  207. {
  208. if(component == 0)
  209. {
  210. CarInfo[car][cComponent0] = component2;
  211. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Spoiler");
  212. }
  213. else
  214. {
  215. SendClientMessage(playerid, COLOR_GREY,"* You have already an spoiler, use the Clear option first!");
  216. return 1;
  217. }
  218. }
  219. else
  220. {
  221. SendClientMessage(playerid, COLOR_GREY,"* You don't have an Spoiler to Save!");
  222. return 1;
  223. }
  224. }
  225. if(listitem == 1)
  226. {
  227. new component2 = GetVehicleComponentInSlot(car, 1);
  228. new component = CarInfo[car][cComponent1];
  229. if(component2 != 0)
  230. {
  231. if(component == 0)
  232. {
  233. CarInfo[car][cComponent1] = component2;
  234. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Hood");
  235. }
  236. else
  237. {
  238. SendClientMessage(playerid, COLOR_GREY,"* You have already a hood, use the Clear option first!");
  239. return 1;
  240. }
  241. }
  242. else
  243. {
  244. SendClientMessage(playerid, COLOR_GREY,"* You don't have a hood to Save!");
  245. return 1;
  246. }
  247. }
  248. if(listitem == 2)
  249. {
  250. new component2 = GetVehicleComponentInSlot(car, 2);
  251. new component = CarInfo[car][cComponent2];
  252. if(component2 != 0)
  253. {
  254. if(component == 0)
  255. {
  256. CarInfo[car][cComponent2] = component2;
  257. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Roof");
  258. }
  259. else
  260. {
  261. SendClientMessage(playerid, COLOR_GREY,"* You have already a roof, use the Clear option first!");
  262. return 1;
  263. }
  264. }
  265. else
  266. {
  267. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Roof to Save!");
  268. return 1;
  269. }
  270. }
  271. if(listitem == 3)
  272. {
  273. new component2 = GetVehicleComponentInSlot(car, 3);
  274. new component = CarInfo[car][cComponent3];
  275. if(component2 != 0)
  276. {
  277. if(component == 0)
  278. {
  279. CarInfo[car][cComponent0] = component2;
  280. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Sideskirt");
  281. }
  282. else
  283. {
  284. SendClientMessage(playerid, COLOR_GREY,"* You have already an Sideskirt, use the Clear option first!");
  285. return 1;
  286. }
  287. }
  288. else
  289. {
  290. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Sideskirt to Save!");
  291. return 1;
  292. }
  293. }
  294. if(listitem == 4)
  295. {
  296. new component2 = GetVehicleComponentInSlot(car, 4);
  297. new component = CarInfo[car][cComponent4];
  298. if(component2 != 0)
  299. {
  300. if(component == 0)
  301. {
  302. CarInfo[car][cComponent4] = component2;
  303. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Lamps");
  304. }
  305. else
  306. {
  307. SendClientMessage(playerid, COLOR_GREY,"* You have already Lamps, use the Clear option first!");
  308. return 1;
  309. }
  310. }
  311. else
  312. {
  313. SendClientMessage(playerid, COLOR_GREY,"* You don't have Lamps to Save!");
  314. return 1;
  315. }
  316. }
  317. if(listitem == 5)
  318. {
  319. new component2 = GetVehicleComponentInSlot(car, 5);
  320. new component = CarInfo[car][cComponent5];
  321. if(component2 != 0)
  322. {
  323. if(component == 0)
  324. {
  325. CarInfo[car][cComponent5] = component2;
  326. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Nitro");
  327. }
  328. else
  329. {
  330. SendClientMessage(playerid, COLOR_GREY,"* You have already a Nitro, use the Clear option first!");
  331. return 1;
  332. }
  333. }
  334. else
  335. {
  336. SendClientMessage(playerid, COLOR_GREY,"* You don't have Nitro to Save!");
  337. return 1;
  338. }
  339. }
  340. if(listitem == 6)
  341. {
  342. new component2 = GetVehicleComponentInSlot(car, 6);
  343. new component = CarInfo[car][cComponent6];
  344. if(component2 != 0)
  345. {
  346. if(component == 0)
  347. {
  348. CarInfo[car][cComponent6] = component2;
  349. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Exhausts");
  350. }
  351. else
  352. {
  353. SendClientMessage(playerid, COLOR_GREY,"* You have already an exhausts, use the Clear option first!");
  354. return 1;
  355. }
  356. }
  357. else
  358. {
  359. SendClientMessage(playerid, COLOR_GREY,"* You don't have Exhausts to Save!");
  360. return 1;
  361. }
  362. }
  363. if(listitem == 7)
  364. {
  365. new component2 = GetVehicleComponentInSlot(car, 7);
  366. new component = CarInfo[car][cComponent7];
  367. if(component2 != 0)
  368. {
  369. if(component == 0)
  370. {
  371. CarInfo[car][cComponent7] = component2;
  372. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Wheels");
  373. }
  374. else
  375. {
  376. SendClientMessage(playerid, COLOR_GREY,"* You have already Wheels, use the Clear option first!");
  377. return 1;
  378. }
  379. }
  380. else
  381. {
  382. SendClientMessage(playerid, COLOR_GREY,"* You don't have Wheels to Save!");
  383. return 1;
  384. }
  385. }
  386. if(listitem == 8)
  387. {
  388. new component2 = GetVehicleComponentInSlot(car, 8);
  389. new component = CarInfo[car][cComponent8];
  390. if(component2 != 0)
  391. {
  392. if(component == 0)
  393. {
  394. CarInfo[car][cComponent8] = component2;
  395. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Stereo");
  396. }
  397. else
  398. {
  399. SendClientMessage(playerid, COLOR_GREY,"* You have already an Stereo, use the Clear option first!");
  400. return 1;
  401. }
  402. }
  403. else
  404. {
  405. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Stereo to Save!");
  406. return 1;
  407. }
  408. }
  409. if(listitem == 9)
  410. {
  411. new component2 = GetVehicleComponentInSlot(car, 9);
  412. new component = CarInfo[car][cComponent9];
  413. if(component2 != 0)
  414. {
  415. if(component == 0)
  416. {
  417. CarInfo[car][cComponent9] = component2;
  418. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Hydraulics");
  419. }
  420. else
  421. {
  422. SendClientMessage(playerid, COLOR_GREY,"* You have already Hydraulics, use the Clear option first!");
  423. return 1;
  424. }
  425. }
  426. else
  427. {
  428. SendClientMessage(playerid, COLOR_GREY,"* You don't have Hydraulics to Save!");
  429. return 1;
  430. }
  431. }
  432. if(listitem == 10)
  433. {
  434. new component2 = GetVehicleComponentInSlot(car, 10);
  435. new component = CarInfo[car][cComponent10];
  436. if(component2 != 0)
  437. {
  438. if(component == 0)
  439. {
  440. CarInfo[car][cComponent10] = component2;
  441. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Front Bumper");
  442. }
  443. else
  444. {
  445. SendClientMessage(playerid, COLOR_GREY,"* You have already a Front Bumper, use the Clear option first!");
  446. return 1;
  447. }
  448. }
  449. else
  450. {
  451. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Front Bumper to Save!");
  452. return 1;
  453. }
  454. }
  455. if(listitem == 11)
  456. {
  457. new component2 = GetVehicleComponentInSlot(car, 11);
  458. new component = CarInfo[car][cComponent11];
  459. if(component2 != 0)
  460. {
  461. if(component == 0)
  462. {
  463. CarInfo[car][cComponent11] = component2;
  464. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Rear Bumper");
  465. }
  466. else
  467. {
  468. SendClientMessage(playerid, COLOR_GREY,"* You have already a Rear Bumper, use the Clear option first!");
  469. return 1;
  470. }
  471. }
  472. else
  473. {
  474. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Rear Bumper to Save!");
  475. return 1;
  476. }
  477. }
  478. if(listitem == 12)
  479. {
  480. new component2 = GetVehicleComponentInSlot(car, 12);
  481. new component = CarInfo[car][cComponent12];
  482. if(component2 != 0)
  483. {
  484. if(component == 0)
  485. {
  486. CarInfo[car][cComponent12] = component2;
  487. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Right Vent");
  488. }
  489. else
  490. {
  491. SendClientMessage(playerid, COLOR_GREY,"* You have already a Right Vent, use the Clear option first!");
  492. return 1;
  493. }
  494. }
  495. else
  496. {
  497. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Right Vent to Save!");
  498. return 1;
  499. }
  500. }
  501. if(listitem == 13)
  502. {
  503. new component2 = GetVehicleComponentInSlot(car, 13);
  504. new component = CarInfo[car][cComponent13];
  505. if(component2 != 0)
  506. {
  507. if(component == 0)
  508. {
  509. CarInfo[car][cComponent13] = component2;
  510. SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Left vent");
  511. }
  512. else
  513. {
  514. SendClientMessage(playerid, COLOR_GREY,"* You have already a Left Vent, use the Clear option first!");
  515. return 1;
  516. }
  517. }
  518. else
  519. {
  520. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Left Vent to Save!");
  521. return 1;
  522. }
  523. }
  524. }
  525. }
  526. if(dialogid == 1302)
  527. {
  528. if(response)
  529. {
  530. new car = GetPlayerVehicleID(playerid);
  531. if(listitem == 0)
  532. {
  533. new component2 = GetVehicleComponentInSlot(car, 0);
  534. new component = CarInfo[car][cComponent0];
  535. if(component2 != 0)
  536. {
  537. if(component != 0)
  538. {
  539. CarInfo[car][cComponent0] = 0;
  540. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Spoiler");
  541. }
  542. else
  543. {
  544. SendClientMessage(playerid, COLOR_GREY,"* You don't have an spoiler, use the Save option first!");
  545. return 1;
  546. }
  547. }
  548. else
  549. {
  550. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Spoiler to Clear!");
  551. return 1;
  552. }
  553. }
  554. if(listitem == 1)
  555. {
  556. new component2 = GetVehicleComponentInSlot(car, 1);
  557. new component = CarInfo[car][cComponent1];
  558. if(component2 != 0)
  559. {
  560. if(component != 0)
  561. {
  562. CarInfo[car][cComponent1] = 0;
  563. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Hood");
  564. }
  565. else
  566. {
  567. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Hood, use the Save option first!");
  568. return 1;
  569. }
  570. }
  571. else
  572. {
  573. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Hood to Clear!");
  574. return 1;
  575. }
  576. }
  577. if(listitem == 2)
  578. {
  579. new component2 = GetVehicleComponentInSlot(car, 2);
  580. new component = CarInfo[car][cComponent2];
  581. if(component2 != 0)
  582. {
  583. if(component != 0)
  584. {
  585. CarInfo[car][cComponent2] = 0;
  586. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Roof");
  587. }
  588. else
  589. {
  590. SendClientMessage(playerid, COLOR_GREY,"* You don't have a roof, use the Save option first!");
  591. return 1;
  592. }
  593. }
  594. else
  595. {
  596. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Roof to Clear!");
  597. return 1;
  598. }
  599. }
  600. if(listitem == 3)
  601. {
  602. new component2 = GetVehicleComponentInSlot(car, 3);
  603. new component = CarInfo[car][cComponent3];
  604. if(component2 != 0)
  605. {
  606. if(component != 0)
  607. {
  608. CarInfo[car][cComponent0] = 0;
  609. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Sideskirt");
  610. }
  611. else
  612. {
  613. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Sideskirt, use the Save option first!");
  614. return 1;
  615. }
  616. }
  617. else
  618. {
  619. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Sideskirt to Clear!");
  620. return 1;
  621. }
  622. }
  623. if(listitem == 4)
  624. {
  625. new component2 = GetVehicleComponentInSlot(car, 4);
  626. new component = CarInfo[car][cComponent4];
  627. if(component2 != 0)
  628. {
  629. if(component != 0)
  630. {
  631. CarInfo[car][cComponent4] = 0;
  632. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Lamps");
  633. }
  634. else
  635. {
  636. SendClientMessage(playerid, COLOR_GREY,"* You don't have Lamps, use the Save option first!");
  637. return 1;
  638. }
  639. }
  640. else
  641. {
  642. SendClientMessage(playerid, COLOR_GREY,"* You don't have Lamps to Clear!");
  643. return 1;
  644. }
  645. }
  646. if(listitem == 5)
  647. {
  648. new component2 = GetVehicleComponentInSlot(car, 5);
  649. new component = CarInfo[car][cComponent5];
  650. if(component2 != 0)
  651. {
  652. if(component != 0)
  653. {
  654. CarInfo[car][cComponent5] = 0;
  655. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Nitro");
  656. }
  657. else
  658. {
  659. SendClientMessage(playerid, COLOR_GREY,"* You don't have Nitro, use the Save option first!");
  660. return 1;
  661. }
  662. }
  663. else
  664. {
  665. SendClientMessage(playerid, COLOR_GREY,"* You don't have Nitro to Clear!");
  666. return 1;
  667. }
  668. }
  669. if(listitem == 6)
  670. {
  671. new component2 = GetVehicleComponentInSlot(car, 6);
  672. new component = CarInfo[car][cComponent6];
  673. if(component2 != 0)
  674. {
  675. if(component != 0)
  676. {
  677. CarInfo[car][cComponent6] = 0;
  678. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Exhaust");
  679. }
  680. else
  681. {
  682. SendClientMessage(playerid, COLOR_GREY,"* You don't have an Exhaust, use the Save option first!");
  683. return 1;
  684. }
  685. }
  686. else
  687. {
  688. SendClientMessage(playerid, COLOR_GREY,"* You don't have Exhausts to Clear!");
  689. return 1;
  690. }
  691. }
  692. if(listitem == 7)
  693. {
  694. new component2 = GetVehicleComponentInSlot(car, 7);
  695. new component = CarInfo[car][cComponent7];
  696. if(component2 != 0)
  697. {
  698. if(component != 0)
  699. {
  700. CarInfo[car][cComponent7] = 0;
  701. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Wheels");
  702. }
  703. else
  704. {
  705. SendClientMessage(playerid, COLOR_GREY,"* You don't have Wheels, use the Save option first!");
  706. return 1;
  707. }
  708. }
  709. else
  710. {
  711. SendClientMessage(playerid, COLOR_GREY,"* You don't have Wheels to Clear!");
  712. return 1;
  713. }
  714. }
  715. if(listitem == 8)
  716. {
  717. new component2 = GetVehicleComponentInSlot(car, 8);
  718. new component = CarInfo[car][cComponent8];
  719. if(component2 != 0)
  720. {
  721. if(component != 0)
  722. {
  723. CarInfo[car][cComponent8] = 0;
  724. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Stereo");
  725. }
  726. else
  727. {
  728. SendClientMessage(playerid, COLOR_GREY,"* You don't have an Stereo, use the Save option first!");
  729. return 1;
  730. }
  731. }
  732. else
  733. {
  734. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Stereo to Clear!");
  735. return 1;
  736. }
  737. }
  738. if(listitem == 9)
  739. {
  740. new component2 = GetVehicleComponentInSlot(car, 9);
  741. new component = CarInfo[car][cComponent9];
  742. if(component2 != 0)
  743. {
  744. if(component != 0)
  745. {
  746. CarInfo[car][cComponent9] = 0;
  747. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Hydraulics");
  748. }
  749. else
  750. {
  751. SendClientMessage(playerid, COLOR_GREY,"* You don't have Hydraulics, use the Save option first!");
  752. return 1;
  753. }
  754. }
  755. else
  756. {
  757. SendClientMessage(playerid, COLOR_GREY,"* You don't have Hydraulics to Clear!");
  758. return 1;
  759. }
  760. }
  761. if(listitem == 10)
  762. {
  763. new component2 = GetVehicleComponentInSlot(car, 10);
  764. new component = CarInfo[car][cComponent10];
  765. if(component2 != 0)
  766. {
  767. if(component != 0)
  768. {
  769. CarInfo[car][cComponent10] = 0;
  770. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Front Bumper");
  771. }
  772. else
  773. {
  774. SendClientMessage(playerid, COLOR_GREY,"* You don't have a front Bumper, use the Save option first!");
  775. return 1;
  776. }
  777. }
  778. else
  779. {
  780. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Front Bumper to Clear!");
  781. return 1;
  782. }
  783. }
  784. if(listitem == 11)
  785. {
  786. new component2 = GetVehicleComponentInSlot(car, 11);
  787. new component = CarInfo[car][cComponent11];
  788. if(component2 != 0)
  789. {
  790. if(component != 0)
  791. {
  792. CarInfo[car][cComponent11] = 0;
  793. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Rear Bumper");
  794. }
  795. else
  796. {
  797. SendClientMessage(playerid, COLOR_GREY,"* You don't have a rear bumper, use the Save option first!");
  798. return 1;
  799. }
  800. }
  801. else
  802. {
  803. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Rear Bumper to Clear!");
  804. return 1;
  805. }
  806. }
  807. if(listitem == 12)
  808. {
  809. new component2 = GetVehicleComponentInSlot(car, 12);
  810. new component = CarInfo[car][cComponent12];
  811. if(component2 != 0)
  812. {
  813. if(component != 0)
  814. {
  815. CarInfo[car][cComponent12] = 0;
  816. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Right Vent");
  817. }
  818. else
  819. {
  820. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Right Vent, use the Save option first!");
  821. return 1;
  822. }
  823. }
  824. else
  825. {
  826. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Right Vent to Clear!");
  827. return 1;
  828. }
  829. }
  830. if(listitem == 13)
  831. {
  832. new component2 = GetVehicleComponentInSlot(car, 13);
  833. new component = CarInfo[car][cComponent13];
  834. if(component2 != 0)
  835. {
  836. if(component != 0)
  837. {
  838. CarInfo[car][cComponent13] = 0;
  839. SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Left vent");
  840. }
  841. else
  842. {
  843. SendClientMessage(playerid, COLOR_GREY,"* You don't have a LEft Vent, use the Save option first!");
  844. return 1;
  845. }
  846. }
  847. else
  848. {
  849. SendClientMessage(playerid, COLOR_GREY,"* You don't have a Left Vent to Clear!");
  850. return 1;
  851. }
  852. }
  853. }
  854. }
  855. //==========================================[SaveCar]========================================
  856. if(dialogid == 12345)
  857. {
  858. if(strlen(inputtext))
  859. {
  860. GetPlayerName(playerid, sendername, sizeof(sendername));
  861. format(string, sizeof(string), "users/%s.ini", sendername);
  862. new File: hFile = fopen(string, io_read);
  863. if (hFile)
  864. {
  865. SendClientMessage(playerid, COLOR_RED, "[USERS] Acest nickname este luat deja de alt player, incearca altul!");
  866. fclose(hFile);
  867. return 1;
  868. }
  869. new tmppass[64];
  870. strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
  871. //Encrypt(tmppass);
  872. OnPlayerRegister(playerid,tmppass);
  873. }
  874. else
  875. {
  876. new regstring[128];
  877. new regname[64];
  878. GetPlayerName(playerid,regname,sizeof(regname));
  879. format(regstring,sizeof(regstring),"{FFFFFF}Welcome, {00bfff}%s\n{FFFFFF}You dont have an account.\nPlease register:",regname);
  880. ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
  881. }
  882. }
  883. }
  884. else
  885. {
  886. Kick(playerid);
  887. }
  888. if(dialogid == 668 && response)
  889. {
  890. if(!strcmp(inputtext, "Light", true))
  891. {
  892. TextDrawHideForPlayer(playerid, SunGlasses);
  893. TextDrawBoxColor(SunGlasses, 0x00000025);
  894. TextDrawShowForPlayer(playerid, SunGlasses);
  895. }
  896. if(!strcmp(inputtext, "Normal", true))
  897. {
  898. TextDrawHideForPlayer(playerid, SunGlasses);
  899. TextDrawBoxColor(SunGlasses, 0x00000040);
  900. TextDrawShowForPlayer(playerid, SunGlasses);
  901. }
  902. if(!strcmp(inputtext, "Dark", true))
  903. {
  904. TextDrawHideForPlayer(playerid, SunGlasses);
  905. TextDrawBoxColor(SunGlasses, 0x00000055);
  906. TextDrawShowForPlayer(playerid, SunGlasses);
  907. }
  908. if(!strcmp(inputtext, "Darkest", true))
  909. {
  910. TextDrawHideForPlayer(playerid, SunGlasses);
  911. TextDrawBoxColor(SunGlasses, 0x00000065);
  912. TextDrawShowForPlayer(playerid, SunGlasses);
  913. }
  914. }
  915. if(dialogid == DIALOG_STYLES)
  916. {
  917. if(response)
  918. {
  919. if(listitem == 0)
  920. {
  921. ShowPlayerDialog(playerid, DIALOG_STYLES+1, DIALOG_STYLE_LIST, "Fight Styles", "Elbow\nBoxe\nGrab and kick\nStreet fight\nKungFu\nNormal", "Select", "Cancel");
  922. }
  923. }
  924. return 1;
  925. }
  926.  
  927. if(dialogid == DIALOG_STYLES+1)
  928. {
  929. if(response)
  930. {
  931. if(listitem == 0)
  932. {
  933. SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
  934. FightStyle[playerid] = 0;
  935. }
  936. if(listitem == 1)
  937. {
  938. SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
  939. FightStyle[playerid] = 1;
  940. }
  941. if(listitem == 2)
  942. {
  943. SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
  944. FightStyle[playerid] = 2;
  945. }
  946. if(listitem == 3)
  947. {
  948. SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
  949. FightStyle[playerid] = 3;
  950. }
  951. if(listitem == 4)
  952. {
  953. SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
  954. FightStyle[playerid] = 4;
  955. }
  956. if(listitem == 5)
  957. {
  958. SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
  959. FightStyle[playerid] = 5;
  960. }
  961. }
  962. return 1;
  963. }
  964. return 1;
  965. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement