Advertisement
rEf

Killer or be Killed 'Záloha' - Jeden z mojich prvních :D

rEf
Jul 23rd, 2014
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 97.57 KB | None | 0 0
  1. #include <a_samp>
  2. #include <dudb>
  3. #include <gl_common>
  4.  
  5. #define MAX_PLAYERS_EX MAX_PLAYERS
  6. #define MAX_VEHICLES_EX MAX_VEHICLES
  7.  
  8. #pragma tabsize 0
  9.  
  10. #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  11.  
  12. #if !defined isnull
  13. #define isnull(%1) \
  14. ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
  15. #endif
  16.  
  17. new PLAYERLIST_authed[MAX_PLAYERS];
  18.  
  19. new AdminLevel[MAX_PLAYERS];
  20. new veh[MAX_PLAYERS];
  21. new dm[MAX_PLAYERS];
  22.  
  23. new Odpocet;
  24. forward OdpocetS();
  25.  
  26. // 1
  27. // 2
  28. #define D_Commands 3
  29. #define D_ClickPlayer 4
  30. #define D_ClickPlayer_Penize 5
  31. #define D_ClickPlayer_Zprava 6
  32. #define D_Radio 7
  33. #define D_Weapons 8
  34. #define D_Pravidla 9
  35. #define D_ACommands 10
  36. #define D_Loterie 11
  37. #define D_SinSlavy 12
  38. // 13
  39. // 14
  40. // 15
  41.  
  42. new Loto_Cislo[MAX_PLAYERS];
  43. forward Loto();
  44.  
  45. new pDrunkLevelLast[MAX_PLAYERS];
  46. new pFPS[MAX_PLAYERS];
  47. new ClickPlayer[MAX_PLAYERS];
  48.  
  49. new Float:RandomSpawn[][4] =
  50. {
  51. {-1977.2421,883.2938,45.2031,86.9292},
  52. {-1981.2690,1187.8273,45.4453,175.2891},
  53. {-2181.7217,1008.4358,80.0000,359.4662},
  54. {-2465.3218,791.8402,35.1719,357.8995},
  55. {-2593.3662,327.7408,4.5478,92.5505},
  56. {-2518.4299,-6.8110,25.6172,268.0189},
  57. {-2233.8013,-198.2429,35.3228,359.1998},
  58. {-2027.4506,-51.8560,35.3724,178.7181},
  59. {-1982.6265,137.9619,27.6875,88.5005},
  60. {-1717.2699,42.6675,3.5547,129.8843}
  61.  
  62. };
  63.  
  64. new Kill[MAX_PLAYERS];
  65. new Respekt[MAX_PLAYERS];
  66. new Killed[MAX_PLAYERS];
  67.  
  68. new Text:ZUR[MAX_PLAYERS];
  69. new Text:TimeName;
  70. new Text:ModeName;
  71. new Text:ModeName2;
  72.  
  73. new Text:txtTimeDisp;
  74. new hour, minute;
  75. new timestr[32];
  76.  
  77. new fine_weather_ids[] = {1,2,3,4,5,6,7,12,13,14,15,17,18,24,25,26,27,28,29,30,40};
  78. new foggy_weather_ids[] = {9,19,20,31,32};
  79. new wet_weather_ids[] = {8};
  80.  
  81. new total_vehicles_from_files=0;
  82.  
  83. stock UpdateWorldWeather()
  84. {
  85. new next_weather_prob = random(100);
  86. if(next_weather_prob < 70) SetWeather(fine_weather_ids[random(sizeof(fine_weather_ids))]);
  87. else if(next_weather_prob < 95) SetWeather(foggy_weather_ids[random(sizeof(foggy_weather_ids))]);
  88. else SetWeather(wet_weather_ids[random(sizeof(wet_weather_ids))]);
  89. }
  90.  
  91. forward UpdateTimeAndWeather();
  92.  
  93. new FortunaPickup;
  94. new ExitFortunaPickup;
  95. new LoterieFortunaPickup;
  96.  
  97. new AmmunitionPickup;
  98. new ExitAmmunitionPickup;
  99. new OneAmmunitionPickup;
  100.  
  101. main()
  102. {
  103. print("\n----------------------------------");
  104. print(" Blank Gamemode by your name here");
  105. print("----------------------------------\n");
  106. }
  107.  
  108. #define MAX_HOUSES 100
  109. #define HOUSE_DIALOG 13
  110. #define CAR_DIALOG 14
  111. #define VEHICLE_DIALOG 15
  112. #define HaveNotMoney(%1,%2) if(GetPlayerMoney(%1) < %2) return SendClientMessage(%1,0xFFFFFFFF,"Nemáš dostatok peňazí !")
  113.  
  114. enum HOUSE_DATA
  115. {
  116. Float:p_X,
  117. Float:p_Y,
  118. Float:p_Z,
  119. Float:i_X,
  120. Float:i_Y,
  121. Float:i_Z,
  122. iin,
  123. Cena,
  124. Vlastnik[MAX_PLAYER_NAME],
  125. Text3D:Text,
  126. Pickup,
  127. VW,
  128. Zamek,
  129. Float:v_X,
  130. Float:v_Y,
  131. Float:v_Z,
  132. Float:v_A,
  133. vModel,
  134. Color1,
  135. Color2,
  136. Paintjob,
  137. Vehicle,
  138. Vmod[17]
  139. }
  140. new HouseInfo[MAX_HOUSES][HOUSE_DATA];
  141. new InHouse[MAX_PLAYERS] = {-1,...};
  142. new HouseCount = -1;
  143. new bool:DialogShowed[MAX_PLAYERS];
  144.  
  145. new spoiler[20][0] = {
  146. {1000},
  147. {1001},
  148. {1002},
  149. {1003},
  150. {1014},
  151. {1015},
  152. {1016},
  153. {1023},
  154. {1058},
  155. {1060},
  156. {1049},
  157. {1050},
  158. {1138},
  159. {1139},
  160. {1146},
  161. {1147},
  162. {1158},
  163. {1162},
  164. {1163},
  165. {1164}
  166. };
  167.  
  168. new nitro[3][0] = {
  169. {1008},
  170. {1009},
  171. {1010}
  172. };
  173.  
  174. new fbumper[23][0] = {
  175. {1117},
  176. {1152},
  177. {1153},
  178. {1155},
  179. {1157},
  180. {1160},
  181. {1165},
  182. {1167},
  183. {1169},
  184. {1170},
  185. {1171},
  186. {1172},
  187. {1173},
  188. {1174},
  189. {1175},
  190. {1179},
  191. {1181},
  192. {1182},
  193. {1185},
  194. {1188},
  195. {1189},
  196. {1192},
  197. {1193}
  198. };
  199.  
  200. new rbumper[22][0] = {
  201. {1140},
  202. {1141},
  203. {1148},
  204. {1149},
  205. {1150},
  206. {1151},
  207. {1154},
  208. {1156},
  209. {1159},
  210. {1161},
  211. {1166},
  212. {1168},
  213. {1176},
  214. {1177},
  215. {1178},
  216. {1180},
  217. {1183},
  218. {1184},
  219. {1186},
  220. {1187},
  221. {1190},
  222. {1191}
  223. };
  224.  
  225. new exhaust[28][0] = {
  226. {1018},
  227. {1019},
  228. {1020},
  229. {1021},
  230. {1022},
  231. {1028},
  232. {1029},
  233. {1037},
  234. {1043},
  235. {1044},
  236. {1045},
  237. {1046},
  238. {1059},
  239. {1064},
  240. {1065},
  241. {1066},
  242. {1089},
  243. {1092},
  244. {1104},
  245. {1105},
  246. {1113},
  247. {1114},
  248. {1126},
  249. {1127},
  250. {1129},
  251. {1132},
  252. {1135},
  253. {1136}
  254. };
  255.  
  256. new bventr[2][0] = {
  257. {1042},
  258. {1044}
  259. };
  260.  
  261. new bventl[2][0] = {
  262. {1043},
  263. {1045}
  264. };
  265.  
  266. new bscoop[4][0] = {
  267. {1004},
  268. {1005},
  269. {1011},
  270. {1012}
  271. };
  272.  
  273. new rscoop[13][0] = {
  274. {1006},
  275. {1032},
  276. {1033},
  277. {1035},
  278. {1038},
  279. {1053},
  280. {1054},
  281. {1055},
  282. {1061},
  283. {1067},
  284. {1068},
  285. {1088},
  286. {1091}
  287. };
  288.  
  289. new lskirt[21][0] = {
  290. {1007},
  291. {1026},
  292. {1031},
  293. {1036},
  294. {1039},
  295. {1042},
  296. {1047},
  297. {1048},
  298. {1056},
  299. {1057},
  300. {1069},
  301. {1070},
  302. {1090},
  303. {1093},
  304. {1106},
  305. {1108},
  306. {1118},
  307. {1119},
  308. {1133},
  309. {1122},
  310. {1134}
  311. };
  312.  
  313. new rskirt[21][0] = {
  314. {1017},
  315. {1027},
  316. {1030},
  317. {1040},
  318. {1041},
  319. {1051},
  320. {1052},
  321. {1062},
  322. {1063},
  323. {1071},
  324. {1072},
  325. {1094},
  326. {1095},
  327. {1099},
  328. {1101},
  329. {1102},
  330. {1107},
  331. {1120},
  332. {1121},
  333. {1124},
  334. {1137}
  335. };
  336.  
  337. new hydraulics[1][0] = {
  338. {1087}
  339. };
  340.  
  341. new base[1][0] = {
  342. {1086}
  343. };
  344.  
  345. new rbbars[2][0] = {
  346. {1109},
  347. {1110}
  348. };
  349.  
  350. new fbbars[2][0] = {
  351. {1115},
  352. {1116}
  353. };
  354.  
  355. new wheels[17][0] = {
  356. {1025},
  357. {1073},
  358. {1074},
  359. {1075},
  360. {1076},
  361. {1077},
  362. {1078},
  363. {1079},
  364. {1080},
  365. {1081},
  366. {1082},
  367. {1083},
  368. {1084},
  369. {1085},
  370. {1096},
  371. {1097},
  372. {1098}
  373. };
  374.  
  375. new lights[2][0] = {
  376. {1013},
  377. {1024}
  378. };
  379.  
  380. forward GetPlayerDistanceToPointEx(playerid,Float:x,Float:y,Float:z);
  381. forward IsPlayerInSphere(playerid,Float:x,Float:y,Float:z,radius);
  382. forward AddHouse(Float:pX, Float:pY, Float:pZ, Float:iX, Float:iY, Float:iZ,ii,Float:vX,Float:vY,Float:vZ,Float:vA, Cenik);
  383.  
  384. public AddHouse(Float:pX, Float:pY, Float:pZ, Float:iX, Float:iY, Float:iZ,ii,Float:vX,Float:vY,Float:vZ,Float:vA, Cenik)
  385. {
  386. HouseCount ++;
  387. if(HouseCount < MAX_HOUSES)
  388. {
  389. if(HouseCount == 0){
  390. for(new i; i<MAX_HOUSES;i++){
  391. HouseInfo[i][Vehicle] = -1;
  392. }
  393. }
  394. HouseInfo[HouseCount][p_X] = pX;
  395. HouseInfo[HouseCount][p_Y] = pY;
  396. HouseInfo[HouseCount][p_Z] = pZ;
  397.  
  398. HouseInfo[HouseCount][i_X] = iX;
  399. HouseInfo[HouseCount][i_Y] = iY;
  400. HouseInfo[HouseCount][i_Z] = iZ;
  401. HouseInfo[HouseCount][iin] = ii;
  402.  
  403. HouseInfo[HouseCount][Cena] = Cenik;
  404. HouseInfo[HouseCount][VW] = 2+HouseCount;
  405. HouseInfo[HouseCount][Vlastnik] = 0;
  406. HouseInfo[HouseCount][Zamek] = 0;
  407.  
  408. HouseInfo[HouseCount][v_X] = vX;
  409. HouseInfo[HouseCount][v_Y] = vY;
  410. HouseInfo[HouseCount][v_Z] = vZ;
  411. HouseInfo[HouseCount][v_A] = vA;
  412.  
  413. new s[128];
  414. format(s,128,"Houses/House%d.txt",HouseCount);
  415. if(!fexist(s)){
  416. dini_Create(s);
  417. dini_Set(s,"Owner","none");
  418. dini_IntSet(s,"Locked",0);
  419. dini_IntSet(s,"Auto",0);
  420. dini_IntSet(s,"Vehicle",0);
  421. dini_IntSet(s,"Color1",0);
  422. dini_IntSet(s,"Color2",0);
  423. dini_IntSet(s,"Paintjob",-1);
  424. dini_IntSet(s,"Tuning1",0);
  425. dini_IntSet(s,"Tuning2",0);
  426. dini_IntSet(s,"Tuning3",0);
  427. dini_IntSet(s,"Tuning4",0);
  428. dini_IntSet(s,"Tuning5",0);
  429. dini_IntSet(s,"Tuning6",0);
  430. dini_IntSet(s,"Tuning7",0);
  431. dini_IntSet(s,"Tuning8",0);
  432. dini_IntSet(s,"Tuning9",0);
  433. dini_IntSet(s,"Tuning10",0);
  434. dini_IntSet(s,"Tuning11",0);
  435. dini_IntSet(s,"Tuning12",0);
  436. dini_IntSet(s,"Tuning13",0);
  437. dini_IntSet(s,"Tuning14",0);
  438. dini_IntSet(s,"Tuning15",0);
  439. dini_IntSet(s,"Tuning16",0);
  440. dini_IntSet(s,"Tuning17",0);
  441.  
  442. }
  443.  
  444. new sx[100];
  445. if(strcmp(dini_Get(s,"Owner"),"none",true) == 0){
  446. format(HouseInfo[HouseCount][Vlastnik],MAX_PLAYER_NAME,"Nikto");
  447. HouseInfo[HouseCount][Zamek] = 0;
  448. HouseInfo[HouseCount][Pickup] = CreatePickup(1273,1,pX, pY, pZ);
  449. format(sx,100,"Dům č.%d\r\nMajitel: Nikdo\r\nCena: %d",HouseCount,Cenik);
  450. HouseInfo[HouseCount][Text] = Create3DTextLabel(sx,0xFF0000FF,pX,pY,pZ+1,50,0);
  451. }else{
  452. HouseInfo[HouseCount][Pickup] = CreatePickup(1272,1,pX, pY, pZ);
  453. format(HouseInfo[HouseCount][Vlastnik],MAX_PLAYER_NAME,"%s",dini_Get(s,"Owner"));
  454. HouseInfo[HouseCount][Zamek] = dini_Int(s,"Locked");
  455. if(dini_Int(s,"Auto") == 1){
  456.  
  457. HouseInfo[HouseCount][Color1]=dini_Int(s,"Color1");
  458. HouseInfo[HouseCount][Color2]=dini_Int(s,"Color2");
  459. HouseInfo[HouseCount][Paintjob]=dini_Int(s,"Paintjob");
  460. HouseInfo[HouseCount][Vmod][0]=dini_Int(s,"Tuning1");
  461. HouseInfo[HouseCount][Vmod][1]=dini_Int(s,"Tuning2");
  462. HouseInfo[HouseCount][Vmod][2]=dini_Int(s,"Tuning3");
  463. HouseInfo[HouseCount][Vmod][3]=dini_Int(s,"Tuning4");
  464. HouseInfo[HouseCount][Vmod][4]=dini_Int(s,"Tuning5");
  465. HouseInfo[HouseCount][Vmod][5]=dini_Int(s,"Tuning6");
  466. HouseInfo[HouseCount][Vmod][6]=dini_Int(s,"Tuning7");
  467. HouseInfo[HouseCount][Vmod][7]=dini_Int(s,"Tuning8");
  468. HouseInfo[HouseCount][Vmod][8]=dini_Int(s,"Tuning9");
  469. HouseInfo[HouseCount][Vmod][9]=dini_Int(s,"Tuning10");
  470. HouseInfo[HouseCount][Vmod][10]=dini_Int(s,"Tuning11");
  471. HouseInfo[HouseCount][Vmod][11]=dini_Int(s,"Tuning12");
  472. HouseInfo[HouseCount][Vmod][12]=dini_Int(s,"Tuning13");
  473. HouseInfo[HouseCount][Vmod][13]=dini_Int(s,"Tuning14");
  474. HouseInfo[HouseCount][Vmod][14]=dini_Int(s,"Tuning15");
  475. HouseInfo[HouseCount][Vmod][15]=dini_Int(s,"Tuning16");
  476. HouseInfo[HouseCount][Vmod][16]=dini_Int(s,"Tuning17");
  477. HouseInfo[HouseCount][Vehicle] = CreateVehicle(dini_Int(s,"Vehicle"),vX,vY,vZ,vA,HouseInfo[HouseCount][Color1],HouseInfo[HouseCount][Color2],-1);
  478. TuneThisCar(HouseCount,HouseInfo[HouseCount][Vehicle]);
  479. printf("=====================\r\n%d",HouseInfo[HouseCount][Vehicle]);
  480. }
  481. format(sx,100,"Dům č.%d\r\nMajitel: %s",HouseCount,dini_Get(s,"Owner"));
  482. HouseInfo[HouseCount][Text] = Create3DTextLabel(sx,0xFF0000FF,pX,pY,pZ+1,50,0);
  483. }
  484.  
  485.  
  486. printf("Dom %d Vytvorený",HouseCount);
  487. }else{
  488. print("<!-- Prekročili ste max. počet domov, dom nebol vytvorený !-->");
  489. print("<!-- Prekročili ste max. počet domov, dom nebol vytvorený !-->");
  490. print("<!-- Prekročili ste max. počet domov, dom nebol vytvorený !-->");
  491. }
  492. return 1;
  493. }
  494.  
  495. public OnGameModeInit()
  496. {
  497. SetGameModeText("Kill or be Killed");
  498.  
  499. DisableInteriorEnterExits();
  500. UsePlayerPedAnims();
  501.  
  502. for(new i=0;i<MAX_VEHICLES;i++) {
  503. SetVehicleNumberPlate(i, "KobK");
  504. }
  505.  
  506. FortunaPickup = CreatePickup(1239, 1, -2156.1958, 151.2136, 35.3203, 0);
  507. ExitFortunaPickup = CreatePickup(1239, 1, 834.3804, 7.4337, 1004.1870, 0);
  508. LoterieFortunaPickup = CreatePickup(1212, 1, 822.4749, 1.8655, 1004.1797, 0);
  509. Create3DTextLabel("Vstup do\n{FF0000}Fortuny", 0xFFFFFFAA, -2156.1958, 151.2136, 35.3203, 40.0, 0, 0);
  510. Create3DTextLabel("Vychod z\n{FF0000}Fortuny", 0xFFFFFFAA, 834.3804, 7.4337, 1004.1870, 40.0, 0, 0);
  511. Create3DTextLabel("Loterie", 0xFF0000AA, 822.4749, 1.8655, 1004.1797, 40.0, 0, 0);
  512.  
  513. AmmunitionPickup = CreatePickup(1239, 1, -2051.9497, 555.4014, 35.1719, 0);
  514. ExitAmmunitionPickup = CreatePickup(1239, 1, 315.7190, -143.1917, 999.6016, 0);
  515. OneAmmunitionPickup = CreatePickup(2061, 1, 314.1212, -133.1166, 999.6016, 0);
  516. Create3DTextLabel("Vstup do\n{FF0000}Ammunition", 0xFFFFFFAA, -2051.9497, 555.4014, 35.1719, 40.0, 0, 0);
  517. Create3DTextLabel("Vychod z\n{FF0000}Ammunition", 0xFFFFFFAA, 315.7190, -143.1917, 999.6016, 40.0, 0, 0);
  518. Create3DTextLabel("Ammunition Balíček", 0xFF0000AA, 314.1212, -133.1166, 999.6016, 40.0, 0, 0);
  519.  
  520. AddPlayerClass(4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  521. AddPlayerClass(223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  522. AddPlayerClass(93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  523. AddPlayerClass(33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  524. AddPlayerClass(46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  525. AddPlayerClass(102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  526. AddPlayerClass(177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  527. AddPlayerClass(141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  528. AddPlayerClass(119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  529. AddPlayerClass(65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  530.  
  531. // AddHouse(x,y,z,xi,yi,zi,ii,xv,yv,zv,vv, cena);
  532. // Levné domy.
  533. AddHouse(-2014.6338,897.4714,45.4453,2807.619873,-1171.899902,1025.570312,8,-2011.6630,888.6288,45.4783,1.2342,450000);
  534. AddHouse(-2017.1914,849.2830,45.4453,2807.619873,-1171.899902,1025.570312,8,-2011.6198,857.9726,45.4787,179.1022,450000);
  535. AddHouse(-2017.2177,832.0926,45.4453,2807.619873,-1171.899902,1025.570312,8,-2011.5889,839.0927,45.4641,179.4774,450000);
  536. AddHouse(-2017.2854,865.6391,45.4453,2807.619873,-1171.899902,1025.570312,8,-2011.8127,872.3675,45.4716,179.2538,450000);
  537. AddHouse(-2017.2017,784.6005,45.4453,2807.619873,-1171.899902,1025.570312,8,-2012.0509,778.5232,45.1619,1.4071,450000);
  538. AddHouse(-2017.0026,766.4005,45.4453,2807.619873,-1171.899902,1025.570312,8,-2011.8623,758.5705,45.1608,0.3614,450000);
  539. // Dražší vily.
  540. AddHouse(-2722.2429,923.9252,67.5938,225.630997,1022.479980,1084.069946,7,-2732.1931,902.2782,67.3412,148.4360,1600000);
  541.  
  542. // SPECIAL
  543. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
  544. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");
  545.  
  546. // LAS VENTURAS
  547. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
  548. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
  549. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
  550.  
  551. // SAN FIERRO
  552. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
  553. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
  554. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");
  555.  
  556. // LOS SANTOS
  557. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
  558. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
  559. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
  560. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");
  561.  
  562. // OTHER AREAS
  563. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
  564. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
  565. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
  566. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
  567. total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
  568.  
  569. printf("Total vehicles from files: %d",total_vehicles_from_files);
  570.  
  571. UpdateTimeAndWeather();
  572. SetTimer("UpdateTimeAndWeather",1000 * 60,1);
  573. SetTimer("UpdateAll", 1000, true);
  574. SetTimer("Loto", 60000*5, 1);
  575. TextDraws();
  576. return 1;
  577. }
  578.  
  579. public OnGameModeExit()
  580. {
  581. return 1;
  582. }
  583.  
  584. public Loto(){
  585. new lotocislo1 = 1 + random(20), lotocislo2 = 1 + random(20), lotocislo3 = 1 + random(20), str[150];
  586. for(new i=0; i< GetMaxPlayers(); i++){
  587. if(IsPlayerConnected(i) && Loto_Cislo[i] > 0){
  588.  
  589. if(Loto_Cislo[i] == lotocislo1){
  590. SendClientMessage(i, 0xFF9933AA, "V loterii jsi zadal první vylosované číslo a vyhrál jsi {FF0000}JACKPOT{FF9933} {33AA33}$1000000{FF9933} +10 respect.");
  591. Loto_Cislo[i] = 0;
  592. GivePlayerMoney(i, 1000000);
  593. Respekt[i] += 10;
  594. }
  595. if(Loto_Cislo[i] == lotocislo2){
  596. SendClientMessage(i, 0xFF9933AA, "V loterii jsi zadal druhé vylosované číslo a vyhrál jsi {33AA33}$10000{FF9933} +5 respect.");
  597. Loto_Cislo[i] = 0;
  598. GivePlayerMoney(i, 10000);
  599. Respekt[i] += 5;
  600. }
  601. if(Loto_Cislo[i] == lotocislo3){
  602. SendClientMessage(i, 0xFF9933AA, "V loterii jsi zadal třetí vylosované číslo a vyhrál jsi {33AA33}$1000{FF9933} +2 respect.");
  603. Loto_Cislo[i] = 0;
  604. GivePlayerMoney(i, 1000);
  605. Respekt[i] += 2;
  606. }else{
  607. SendClientMessage(i, 0xFF9933AA, "V loterii bohužel nevylosovali tvé číslo, nic jsi nevyhrál.");
  608. Loto_Cislo[i] = 0;
  609. }
  610. }
  611. }
  612. format(str, 150, "V loterii byla vylosována tato čísla: {FFFFFF}%d{FF9933}, {FFFFFF}%d{FF9933}, {FFFFFF}%d{FF9933}!", lotocislo1, lotocislo2, lotocislo3);
  613. SendClientMessageToAll(0xFF9933AA, str);
  614. }
  615.  
  616. public OnPlayerRequestClass(playerid, classid)
  617. {
  618. SetPlayerInterior(playerid, 2);
  619. SetPlayerPos(playerid, 2243.6670,-1077.6992,1049.0234);
  620. SetPlayerCameraPos(playerid, 2241.4524,-1076.0842,1049.0310);
  621. SetPlayerCameraLookAt(playerid, 2243.6670,-1077.6992,1049.0234);
  622. return 1;
  623. }
  624.  
  625. public OnPlayerConnect(playerid)
  626. {
  627. new string[128];
  628. format(string, sizeof(string), "Hráč {FF0000}%s{FFFFFF} se připojil na server.", Jmeno(playerid));
  629. SendClientMessageToAll(0xFFFFFFAA, string);
  630.  
  631. Kill[playerid] = 0;
  632. Killed[playerid] = 0;
  633. pFPS[playerid] = 0;
  634. Respekt[playerid] = 0;
  635. dm[playerid] = 0;
  636.  
  637. gettime(hour, minute);
  638. SetPlayerTime(playerid,hour,minute);
  639.  
  640. PLAYERLIST_authed[playerid] = false;
  641. if (!PLAYERLIST_authed[playerid])
  642. {
  643. if(udb_Exists(Jmeno(playerid)))
  644. {
  645. ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"KobK","{FFFFFF}Vítej zpět na {33AA33}Kill{FFFFFF} or be {FF0000}Killed{FFFFFF}!\nNapiš své heslo které si uvedl při registraci.","Použít","Odpojit se");
  646. } else {
  647. ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"KobK","{FFFFFF}Vítej na {33AA33}Kill{FFFFFF} or be {FF0000}Killed{FFFFFF}\nZaregistruj se, napiš heslo které si budeš pamatovat.","Použít","Odpojit se");
  648. }
  649. }
  650.  
  651. SetPlayerMapIcon(playerid, 0, -2156.1958, 151.2136, 35.3203, 25, 0, MAPICON_LOCAL); // Fortuna.
  652. SetPlayerMapIcon(playerid, 1, -2051.9497, 555.4014, 35.1719, 6, 0, MAPICON_LOCAL); // Ammunition.
  653. return 1;
  654. }
  655.  
  656. public OnPlayerDisconnect(playerid, reason)
  657. {
  658. new string[128];
  659. format(string, sizeof(string), "Hráč {FF0000}%s{FFFFFF} se odpojil ze serveru.", Jmeno(playerid));
  660. SendClientMessageToAll(0xFFFFFFAA, string);
  661.  
  662. TextDrawHideForPlayer(playerid,ModeName);
  663. TextDrawHideForPlayer(playerid,TimeName);
  664.  
  665. if (PLAYERLIST_authed[playerid])
  666. {
  667. new Float:hp;
  668. GetPlayerHealth(playerid,hp);
  669. new Float:am;
  670. GetPlayerArmour(playerid,am);
  671. dUserSetINT(Jmeno(playerid)).("Health", floatround(hp));
  672. dUserSetINT(Jmeno(playerid)).("Armour", floatround(am));
  673. dUserSetINT(Jmeno(playerid)).("Money",GetPlayerMoney(playerid));
  674. dUserSetINT(Jmeno(playerid)).("Kills",Kill[playerid]);
  675. dUserSetINT(Jmeno(playerid)).("Deaths",Killed[playerid]);
  676. dUserSetINT(Jmeno(playerid)).("Respect",Respekt[playerid]);
  677. dUserSetINT(Jmeno(playerid)).("AdminLevel",AdminLevel[playerid]);
  678. }
  679. PLAYERLIST_authed[playerid] = false;
  680. return 1;
  681. }
  682.  
  683. public OnPlayerSpawn(playerid)
  684. {
  685. SetPlayerInterior(playerid, 0);
  686.  
  687. TextDrawShowForPlayer(playerid,txtTimeDisp);
  688. TextDrawShowForPlayer(playerid,TimeName);
  689. TextDrawShowForPlayer(playerid,ModeName);
  690.  
  691. gettime(hour, minute);
  692. SetPlayerTime(playerid,hour,minute);
  693.  
  694. new rand = random(sizeof(RandomSpawn));
  695. SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
  696. SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
  697.  
  698. GivePlayerWeapon(playerid, 26, 9998);
  699.  
  700. if(dm[playerid] == 1){
  701. SetPlayerVirtualWorld(playerid,1);
  702. SetPlayerPos(playerid,-1862.5531,668.0342,81.3984);
  703. ResetPlayerWeapons(playerid);
  704. GivePlayerWeapon(playerid, 26, 9998);
  705. }
  706. if(dm[playerid] == 2){
  707. SetPlayerVirtualWorld(playerid,2);
  708. SetPlayerPos(playerid,-1417.4907,397.4567,30.0859);
  709. ResetPlayerWeapons(playerid);
  710. GivePlayerWeapon(playerid, 27, 9998);
  711. }
  712. if(dm[playerid] == 3){
  713. SetPlayerVirtualWorld(playerid,3);
  714. SetPlayerPos(playerid,-2048.1331,565.9178,35.0156);
  715. ResetPlayerWeapons(playerid);
  716. GivePlayerWeapon(playerid, 26, 9998);
  717. SetPlayerArmour(playerid, 100);
  718. }
  719. if(dm[playerid] == 4){
  720. SetPlayerVirtualWorld(playerid,4);
  721. SetPlayerPos(playerid,-2763.6677,-296.2934,7.0391);
  722. ResetPlayerWeapons(playerid);
  723. GivePlayerWeapon(playerid, 25, 9998);
  724. GivePlayerWeapon(playerid, 24, 9998);
  725. }
  726.  
  727. UpdatePlayer(playerid);
  728. return 1;
  729. }
  730.  
  731. public UpdateTimeAndWeather()
  732. {
  733. gettime(hour, minute);
  734.  
  735. format(timestr,32,"~w~%02d~r~:~w~%02d",hour,minute);
  736. TextDrawSetString(txtTimeDisp,timestr);
  737. SetWorldTime(hour);
  738.  
  739. new x=0;
  740. while(x!=MAX_PLAYERS) {
  741. if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
  742. SetPlayerTime(x,hour,minute);
  743. }
  744. x++;
  745. }
  746. }
  747.  
  748. public OnPlayerDeath(playerid, killerid, reason)
  749. {
  750. SendDeathMessage(killerid, playerid, reason);
  751.  
  752. Kill[killerid]++;
  753. Killed[playerid]++;
  754.  
  755. TextDrawHideForPlayer(playerid,txtTimeDisp);
  756.  
  757. // Pro všechny.
  758. new string[256];
  759. format(string, sizeof(string), "[Kill] Hráč {33AA33}%s{FFFFFF} zabil hráče {FF0000}%s{FFFFFF} +5 respekt pro hráče {33AA33}%s{FFFFFF}.", Jmeno(killerid), Jmeno(playerid), Jmeno(killerid));
  760. SendClientMessageToAll(0xFFFFFFAA,string);
  761.  
  762. // Dá hráči za zabití.
  763. GivePlayerMoney(killerid,1000);
  764. GameTextForPlayer(killerid, "~w~+~g~$1000", 3000, 1);
  765. Respekt[killerid] += 5;
  766.  
  767. new playercash;
  768.  
  769. if(killerid == INVALID_PLAYER_ID) {
  770. ResetPlayerMoney(playerid);
  771. } else {
  772. playercash = GetPlayerMoney(playerid);
  773. if(playercash > 0) {
  774. GivePlayerMoney(killerid, playercash);
  775. ResetPlayerMoney(playerid);
  776. }
  777. }
  778.  
  779. new wanted;
  780. wanted = GetPlayerWantedLevel(killerid);
  781. SetPlayerWantedLevel(killerid,wanted+1);
  782.  
  783. UpdatePlayer(playerid);
  784. return 1;
  785. }
  786.  
  787. public OnVehicleSpawn(vehicleid)
  788. {
  789. return 1;
  790. }
  791.  
  792. public OnVehicleDeath(vehicleid){
  793. for(new i; i < HouseCount+1;i++){
  794. if(HouseInfo[i][Vehicle] == vehicleid){
  795. new s[128];
  796. format(s,128,"Houses/House%d.txt",i);
  797. DestroyVehicle(HouseInfo[i][Vehicle]);
  798. dini_IntSet(s,"Auto",0);
  799. dini_IntSet(s,"Vehicle",0);
  800. dini_IntSet(s,"Color1",0);
  801. dini_IntSet(s,"Color2",0);
  802. dini_IntSet(s,"Paintjob",-1);
  803. dini_IntSet(s,"Tuning1",0);
  804. dini_IntSet(s,"Tuning2",0);
  805. dini_IntSet(s,"Tuning3",0);
  806. dini_IntSet(s,"Tuning4",0);
  807. dini_IntSet(s,"Tuning5",0);
  808. dini_IntSet(s,"Tuning6",0);
  809. dini_IntSet(s,"Tuning7",0);
  810. dini_IntSet(s,"Tuning8",0);
  811. dini_IntSet(s,"Tuning9",0);
  812. dini_IntSet(s,"Tuning10",0);
  813. dini_IntSet(s,"Tuning11",0);
  814. dini_IntSet(s,"Tuning12",0);
  815. dini_IntSet(s,"Tuning13",0);
  816. dini_IntSet(s,"Tuning14",0);
  817. dini_IntSet(s,"Tuning15",0);
  818. dini_IntSet(s,"Tuning16",0);
  819. dini_IntSet(s,"Tuning17",0);
  820. HouseInfo[i][Vehicle] = -1;
  821. }
  822. }
  823. }
  824.  
  825. public OnPlayerText(playerid, text[])
  826. {
  827. return 1;
  828. }
  829.  
  830. public OnPlayerCommandText(playerid, cmdtext[])
  831. {
  832. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  833. {
  834. // Do something here
  835. return 1;
  836. }
  837. dcmd(help,4,cmdtext);
  838. dcmd(informace,9,cmdtext);
  839. dcmd(radio,5,cmdtext);
  840. dcmd(kill,4,cmdtext);
  841. dcmd(lock,4,cmdtext);
  842. dcmd(unlock,6,cmdtext);
  843. dcmd(pravidla,8,cmdtext);
  844. dcmd(ahelp,5,cmdtext);
  845. dcmd(dm,2,cmdtext);
  846. dcmd(dmexit,6,cmdtext);
  847. dcmd(sinslavy,8,cmdtext);
  848.  
  849. dcmd(lv,2,cmdtext);
  850. dcmd(ls,2,cmdtext);
  851. dcmd(sf,2,cmdtext);
  852. dcmd(pyramida,8,cmdtext);
  853. dcmd(wangcars,8,cmdtext);
  854. dcmd(stavba,6,cmdtext);
  855. dcmd(tfdragons,9,cmdtext);
  856. dcmd(centrum,7,cmdtext);
  857. dcmd(stadion,7,cmdtext);
  858. dcmd(alhambra,8,cmdtext);
  859. dcmd(skatepark,9,cmdtext);
  860. dcmd(beach,5,cmdtext);
  861. dcmd(jizzy,5,cmdtext);
  862. dcmd(golf,4,cmdtext);
  863.  
  864. dcmd(setlevel,8,cmdtext);
  865. dcmd(setport,7,cmdtext);
  866. dcmd(goport,6,cmdtext);
  867. dcmd(veh,3,cmdtext);
  868. dcmd(vehdel,6,cmdtext);
  869. dcmd(vehcolor,8,cmdtext);
  870. dcmd(freeze,6,cmdtext);
  871. dcmd(unfreeze,8,cmdtext);
  872. dcmd(deduction,9,cmdtext);
  873. dcmd(ban,3,cmdtext);
  874. dcmd(pban,4,cmdtext);
  875. dcmd(kick,4,cmdtext);
  876. dcmd(pchat,5,cmdtext);
  877. dcmd(killed,6,cmdtext);
  878. dcmd(goto,4,cmdtext);
  879. dcmd(get,3,cmdtext);
  880. return 0;
  881. }
  882.  
  883. dcmd_help(playerid, params[])
  884. {
  885. #pragma unused params
  886. new string[1500];
  887. strcat(string, "{FFFFFF}Vítejte na {33AA33}Kill{FFFFFF} or be {FF0000}Killed{FFFFFF} tento mod je navržen tak že tu jde převážně o skill.\n");
  888. strcat(string, "{FFFFFF}Čím více hráču zabijete tím větší šance že budete TOP hráč.\n");
  889. strcat(string, "{FFFFFF}Za každé zabití hráče dostanete sumu, kteoru si lze uložit do banky.\n");
  890. strcat(string, "{FFFFFF}Všechna potřebná data se na serveru ukládají, takže se nebojte že přijdete o peníze atd...\n");
  891. strcat(string, "{FFFFFF}Hráče nemusíte jen vraždit pro to aby jste byl {33AA33}TOP{FFFFFF}, lze si také užít dalších funkcí serveru.\n");
  892. strcat(string, "{FFFFFF}Pokud si chcete něco pustit je možné použít {FF0000}/radio{FFFFFF} kde jsou české stanice.\n");
  893. strcat(string, "{FFFFFF}Koupit hráči zbran, poslat peníze atd... Lze kliknutím v TAB na jeho jméno.\n");
  894. strcat(string, "{FFFFFF}Prosíme aby jste si přečetl {FF0000}/pravidla{FFFFFF} a nejlépe uděláte když je budete dodržovat.\n");
  895. strcat(string, "{FFFFFF}Pokud udeříte hráče {FF0000}Baseballkou{FFFFFF} automaticky ho okradete o nějaké peníze které má u sebe.\n\n");
  896. strcat(string, "{FFFFFF}COMMANDS:\n");
  897. strcat(string, "{FF0000}/radio /informace /lock /unlock /kill /ahelp /weapons /pravidla /dm /dmexit\n\n");
  898. strcat(string, "{FFFFFF}TELEPORTS:\n");
  899. strcat(string, "{0099FF}/lv /ls /sf /pyramida /wangcars /stavba /tfdragons /centrum\n");
  900. strcat(string, "{0099FF}/stadion /alhambra /skatepark /beach /jizzy /golf\n\n");
  901. strcat(string, "{33AA33}Kill{FFFFFF} or be {FF0000}Killed{FFFFFF} vytvořil Ref.\n");
  902. ShowPlayerDialog(playerid, D_Commands, DIALOG_STYLE_MSGBOX, "Help (pomoc, nápověda):", string ,"Zavřít","");
  903. return 1;
  904. }
  905.  
  906. dcmd_informace(playerid, params[])
  907. {
  908. #pragma unused params
  909. new string[256];
  910. format(string, sizeof(string), "Informace hráče {FF0000}%s{FFFFFF}:", Jmeno(playerid));
  911. SendClientMessage(playerid, 0xFFFFFFAA, string);
  912. format(string, sizeof(string), "[ Kills: {FF0000}%d{FFFFFF} | Deaths: {FF0000}%d{FFFFFF} | Respect: {FF0000}%d{FFFFFF} | AdminLevel: {FF0000}%d/5{FFFFFF} ]", Kill[playerid], Killed[playerid], Respekt[playerid], AdminLevel[playerid]);
  913. SendClientMessage(playerid, 0xFFFFFFAA, string);
  914. return 1;
  915. }
  916.  
  917. dcmd_kill(playerid,params[])
  918. {
  919. #pragma unused params
  920. new string[128];
  921. SetPlayerHealth(playerid, 0.0);
  922. format(string,128,"[Death] Hráč {FF0000}%s{FFFFFF} si vzal život.",Jmeno(playerid));
  923. SendClientMessageToAll(0xFFFFFFAA,string);
  924. return true;
  925. }
  926.  
  927. dcmd_lock(playerid,params[])
  928. {
  929. #pragma unused params
  930. if(IsPlayerInAnyVehicle(playerid))
  931. {
  932. new State=GetPlayerState(playerid);
  933. if(State!=PLAYER_STATE_DRIVER)
  934. {
  935. SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Zamknout vozidlo muže jen řidič.");
  936. return 1;
  937. }
  938. new i;
  939. for(i=0;i<MAX_PLAYERS;i++)
  940. {
  941. if(i != playerid)
  942. {
  943. SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
  944. }
  945. }
  946. SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Vozidlo zamčeno.");
  947. new Float:pX, Float:pY, Float:pZ;
  948. GetPlayerPos(playerid,pX,pY,pZ);
  949. PlayerPlaySound(playerid,1056,pX,pY,pZ);
  950. }
  951. else
  952. {
  953. SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nejsi ve vozidle.");
  954. }
  955. return true;
  956. }
  957.  
  958. dcmd_unlock(playerid,params[])
  959. {
  960. #pragma unused params
  961. if(IsPlayerInAnyVehicle(playerid))
  962. {
  963. new State=GetPlayerState(playerid);
  964. if(State!=PLAYER_STATE_DRIVER)
  965. {
  966. SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Odemknout vozidlo muže jen řidič.");
  967. return 1;
  968. }
  969. new i;
  970. for(i=0;i<MAX_PLAYERS;i++)
  971. {
  972. SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
  973. }
  974. SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Vozidlo odemčeno.");
  975. new Float:pX, Float:pY, Float:pZ;
  976. GetPlayerPos(playerid,pX,pY,pZ);
  977. PlayerPlaySound(playerid,1057,pX,pY,pZ);
  978. }
  979. else
  980. {
  981. SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nejsi ve vozidle.");
  982. }
  983. return true;
  984. }
  985.  
  986. dcmd_radio(playerid, params[])
  987. {
  988. #pragma unused params
  989. ShowPlayerDialog(playerid,D_Radio,DIALOG_STYLE_LIST,"Radio stanice:","{FF0000}Vypnout Radio\n{FFFF00}Radio Evropa 2\n{FF66FF}Fajn Radio\n{FFFFFF}Fox Radio\n{AFAFAF}Radio Frekvence 1\n{33AA33}Radio HipHopStage\n{0099FF}Radio Impuls","Vybrat","Zavřít");
  990. return 1;
  991. }
  992.  
  993. dcmd_pravidla(playerid, params[])
  994. {
  995. #pragma unused params
  996. new string[952];
  997. strcat(string, "{FF0000}1.{FFFFFF} Je zakázené používat sobeit, cleo, aimbot a ostatní cheaty.\n");
  998. strcat(string, "{FF0000}2.{FFFFFF} Je zakázané dělat reklamy na jíné servery a webové stránky.\n");
  999. strcat(string, "{FF0000}3.{FFFFFF} Je zakázané napadat slovně administrátory a naše jméno.\n");
  1000. strcat(string, "{FF0000}4.{FFFFFF} Je zakázané zneužívat nalezené bugy, je potřeba je hned nahlásit.\n");
  1001. strcat(string, "{FF0000}5.{FFFFFF} Je zakázáno spamovat v chatu.\n");
  1002. strcat(string, "{FF0000}6.{FFFFFF} Je zakázané zabijení hráču na spawnu a teleportu!\n");
  1003. strcat(string, "{FF0000}7.{FFFFFF} Je zakázané vlastnit více jak jeden účet!\n\n");
  1004. strcat(string, "{FFFFFF}Všechna vypsaná pravidla jsou aktuální a jejich porušení se trestá.");
  1005. ShowPlayerDialog(playerid, D_Pravidla, DIALOG_STYLE_MSGBOX, "Pravidla:", string ,"Zavřít","");
  1006. return 1;
  1007. }
  1008.  
  1009. dcmd_dm(playerid, params[])
  1010. {
  1011. new string[256];
  1012. new DM = strval(params);
  1013. if(!params[0]) return SendClientMessage(playerid, 0xFF0000AA, "/dm [1-4]");
  1014. else if(DM < 1 || DM > 4) return SendClientMessage(playerid, 0xFF0000AA, "/dm [1-4]");
  1015.  
  1016. switch(DM)
  1017. {
  1018. case 1:
  1019. {
  1020. SetPlayerVirtualWorld(playerid,1);
  1021. SetPlayerPos(playerid,-1862.5531,668.0342,81.3984);
  1022. ResetPlayerWeapons(playerid);
  1023. dm[playerid] = 1;
  1024. GivePlayerWeapon(playerid, 26, 9998);
  1025. SetPlayerHealth(playerid, 100);
  1026. SetPlayerArmour(playerid, 0);
  1027. format(string,sizeof(string),"Hráč {FFFFFF}%s{33AA33} se zapojil do DM 1 {FFFFFF}Sawnoff Shotgun{33AA33}.",Jmeno(playerid));
  1028. SendClientMessageToAll(0x33AA33AA,string);
  1029. }
  1030. case 2:
  1031. {
  1032. SetPlayerVirtualWorld(playerid,2);
  1033. SetPlayerPos(playerid,-1417.4907,397.4567,30.0859);
  1034. ResetPlayerWeapons(playerid);
  1035. dm[playerid] = 2;
  1036. GivePlayerWeapon(playerid, 27, 9998);
  1037. SetPlayerHealth(playerid, 100);
  1038. SetPlayerArmour(playerid, 0);
  1039. format(string,sizeof(string),"Hráč {FFFFFF}%s{33AA33} se zapojil do DM 2 {FFFFFF}Combat Shotgun{33AA33}.",Jmeno(playerid));
  1040. SendClientMessageToAll(0x33AA33AA,string);
  1041. }
  1042. case 3:
  1043. {
  1044. SetPlayerVirtualWorld(playerid,3);
  1045. SetPlayerPos(playerid,-2048.1331,565.9178,35.0156);
  1046. ResetPlayerWeapons(playerid);
  1047. dm[playerid] = 3;
  1048. GivePlayerWeapon(playerid, 26, 9998);
  1049. SetPlayerHealth(playerid, 100);
  1050. SetPlayerArmour(playerid, 100);
  1051. format(string,sizeof(string),"Hráč {FFFFFF}%s{33AA33} se zapojil do DM 3 {FFFFFF}Sawnoff Shotgun + Armour{33AA33}.",Jmeno(playerid));
  1052. SendClientMessageToAll(0x33AA33AA,string);
  1053. }
  1054. case 4:
  1055. {
  1056. SetPlayerVirtualWorld(playerid,4);
  1057. SetPlayerPos(playerid,-2763.6677,-296.2934,7.0391);
  1058. ResetPlayerWeapons(playerid);
  1059. dm[playerid] = 4;
  1060. GivePlayerWeapon(playerid, 25, 9998);
  1061. GivePlayerWeapon(playerid, 24, 9998);
  1062. SetPlayerHealth(playerid, 100);
  1063. SetPlayerArmour(playerid, 0);
  1064. format(string,sizeof(string),"Hráč {FFFFFF}%s{33AA33} se zapojil do DM 4 {FFFFFF}Shotgun + Desert Eagle{33AA33}.",Jmeno(playerid));
  1065. SendClientMessageToAll(0x33AA33AA,string);
  1066. }
  1067. }
  1068. return true;
  1069. }
  1070.  
  1071. dcmd_dmexit(playerid,params[])
  1072. {
  1073. #pragma unused params
  1074. if(IsPlayerConnected(playerid))
  1075. {
  1076. new string[150];
  1077. SetPlayerVirtualWorld(playerid,0);
  1078. dm[playerid] = 0;
  1079. ResetPlayerWeapons(playerid);
  1080. SpawnPlayer(playerid);
  1081. GivePlayerWeapon(playerid, 26, 9998);
  1082. SetPlayerHealth(playerid, 100);
  1083. SetPlayerArmour(playerid, 0);
  1084. format(string,sizeof(string),"Hráč {FFFFFF}%s{33AA33} opustil DeathMatch.",Jmeno(playerid));
  1085. SendClientMessageToAll(0x33AA33AA,string);
  1086. }
  1087. return 1;
  1088. }
  1089.  
  1090. dcmd_sinslavy(playerid,params[])
  1091. {
  1092. #pragma unused params
  1093. // Nejvíc zabil.
  1094. new maxkills,id,string[256],name[MAX_PLAYER_NAME];
  1095. for (new i = 0; i < MAX_PLAYERS; i++)
  1096. {
  1097. if(Kill[i] > maxkills)
  1098. {
  1099. maxkills = Kill[i];
  1100. id = i;
  1101. }
  1102. }
  1103. GetPlayerName(id,name,sizeof(name));
  1104. //
  1105. // Největší respekt.
  1106. new maxres,idd,namee[MAX_PLAYER_NAME];
  1107. for (new i = 0; i < MAX_PLAYERS; i++)
  1108. {
  1109. if(Respekt[i] > maxres)
  1110. {
  1111. maxres = Respekt[i];
  1112. idd = i;
  1113. }
  1114. }
  1115. GetPlayerName(idd,namee,sizeof(namee));
  1116. //
  1117. format(string,256,"{FFFFFF}Nejvíce hráču na serveru zabil:\n%s [ Kills: %d ]\n\nNejvetší respekt má hráč:\n%s [ Respect: %d ]",name,maxkills,namee,maxres);
  1118. ShowPlayerDialog(playerid,D_SinSlavy,DIALOG_STYLE_MSGBOX,"Sín Slávy",string,"Další","");
  1119. return true;
  1120. }
  1121.  
  1122.  
  1123. // Teleporty .................. START
  1124.  
  1125. dcmd_lv(playerid,params[])
  1126. {
  1127. #pragma unused params
  1128. new string[200];
  1129. Warp(playerid, 1669.0104, 1310.2052, 10.8203, 0);
  1130. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval do Las Venturas.",Jmeno(playerid));
  1131. SendClientMessageToAll(0x0099FFAA,string);
  1132. return true;
  1133. }
  1134.  
  1135. dcmd_ls(playerid,params[])
  1136. {
  1137. #pragma unused params
  1138. new string[200];
  1139. Warp(playerid, 1270.8721,-1338.6042,13.3395, 0);
  1140. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval do Los Santos.",Jmeno(playerid));
  1141. SendClientMessageToAll(0x0099FFAA,string);
  1142. return true;
  1143. }
  1144.  
  1145. dcmd_sf(playerid,params[])
  1146. {
  1147. #pragma unused params
  1148. new string[200];
  1149. Warp(playerid, -1410.6317,-313.1867,13.9926, 0);
  1150. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval do San Fierra.",Jmeno(playerid));
  1151. SendClientMessageToAll(0x0099FFAA,string);
  1152. return true;
  1153. }
  1154.  
  1155. dcmd_pyramida(playerid,params[])
  1156. {
  1157. #pragma unused params
  1158. new string[200];
  1159. Warp(playerid, 2219.9436,1285.3647,10.8203, 0);
  1160. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Pyramide.",Jmeno(playerid));
  1161. SendClientMessageToAll(0x0099FFAA,string);
  1162. return true;
  1163. }
  1164.  
  1165. dcmd_wangcars(playerid,params[])
  1166. {
  1167. #pragma unused params
  1168. new string[200];
  1169. Warp(playerid, -1986.9955,288.2577,34.4164, 0);
  1170. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Wang Cars.",Jmeno(playerid));
  1171. SendClientMessageToAll(0x0099FFAA,string);
  1172. return true;
  1173. }
  1174.  
  1175. dcmd_stavba(playerid,params[])
  1176. {
  1177. #pragma unused params
  1178. new string[200];
  1179. Warp(playerid, 2705.2410,853.3575,9.8438, 0);
  1180. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval na Stavbu.",Jmeno(playerid));
  1181. SendClientMessageToAll(0x0099FFAA,string);
  1182. return true;
  1183. }
  1184.  
  1185. dcmd_tfdragons(playerid,params[])
  1186. {
  1187. #pragma unused params
  1188. new string[200];
  1189. Warp(playerid, 2029.9124,1008.2343,10.8203, 0);
  1190. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k The Four Dragons.",Jmeno(playerid));
  1191. SendClientMessageToAll(0x0099FFAA,string);
  1192. return true;
  1193. }
  1194.  
  1195. dcmd_centrum(playerid,params[])
  1196. {
  1197. #pragma unused params
  1198. new string[200];
  1199. Warp(playerid, 2801.7971,2395.5332,10.8203, 0);
  1200. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Centrum.",Jmeno(playerid));
  1201. SendClientMessageToAll(0x0099FFAA,string);
  1202. return true;
  1203. }
  1204.  
  1205. dcmd_stadion(playerid,params[])
  1206. {
  1207. #pragma unused params
  1208. new string[200];
  1209. Warp(playerid, 2672.1599,-1688.0907,9.3783, 0);
  1210. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Stadionu.",Jmeno(playerid));
  1211. SendClientMessageToAll(0x0099FFAA,string);
  1212. return true;
  1213. }
  1214.  
  1215. dcmd_alhambra(playerid,params[])
  1216. {
  1217. #pragma unused params
  1218. new string[200];
  1219. Warp(playerid, 1823.7289,-1681.9412,13.3828, 0);
  1220. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Alhambra.",Jmeno(playerid));
  1221. SendClientMessageToAll(0x0099FFAA,string);
  1222. return true;
  1223. }
  1224.  
  1225. dcmd_skatepark(playerid,params[])
  1226. {
  1227. #pragma unused params
  1228. new string[200];
  1229. Warp(playerid, 1877.8224,-1387.5604,13.5740, 0);
  1230. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval do Skateparku.",Jmeno(playerid));
  1231. SendClientMessageToAll(0x0099FFAA,string);
  1232. return true;
  1233. }
  1234.  
  1235. dcmd_beach(playerid,params[])
  1236. {
  1237. #pragma unused params
  1238. new string[200];
  1239. Warp(playerid, 582.1698,-1863.1613,4.6498, 0);
  1240. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval na Pláž.",Jmeno(playerid));
  1241. SendClientMessageToAll(0x0099FFAA,string);
  1242. return true;
  1243. }
  1244.  
  1245. dcmd_jizzy(playerid,params[])
  1246. {
  1247. #pragma unused params
  1248. new string[200];
  1249. Warp(playerid, -2636.5427,1359.0043,7.1288, 0);
  1250. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Jizzy.",Jmeno(playerid));
  1251. SendClientMessageToAll(0x0099FFAA,string);
  1252. return true;
  1253. }
  1254.  
  1255. dcmd_golf(playerid,params[])
  1256. {
  1257. #pragma unused params
  1258. new string[200];
  1259. Warp(playerid, -2751.4612,-294.3576,7.0391, 0);
  1260. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval na Golf.",Jmeno(playerid));
  1261. SendClientMessageToAll(0x0099FFAA,string);
  1262. return true;
  1263. }
  1264.  
  1265. // Teleporty .................. KONEC
  1266.  
  1267. // Admin příkazy ....................
  1268.  
  1269. dcmd_ahelp(playerid, params[])
  1270. {
  1271. #pragma unused params
  1272. new string[1500];
  1273. if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1274. strcat(string, "{CC0000}AdminLevel (1):\n");
  1275. strcat(string, "{FFFFFF}?text /vehcolor /deduction /pchat\n\n");
  1276. strcat(string, "{CC0000}AdminLevel (2):\n");
  1277. strcat(string, "{FFFFFF}/setport /veh /vehdel /freeze /unfreeze /goto /get\n\n");
  1278. strcat(string, "{CC0000}AdminLevel (3):\n");
  1279. strcat(string, "{FFFFFF}/kick /killed\n\n");
  1280. strcat(string, "{CC0000}AdminLevel (4):\n");
  1281. strcat(string, "{FFFFFF}/ban\n\n");
  1282. strcat(string, "{CC0000}AdminLevel (5):\n");
  1283. strcat(string, "{FFFFFF}/pban\n\n");
  1284. strcat(string, "{CC0000}Pro Rcon:\n");
  1285. strcat(string, "{FFFFFF}/setlevel\n\n");
  1286. ShowPlayerDialog(playerid, D_ACommands, DIALOG_STYLE_MSGBOX, "Admin příkazy:", string ,"Zavřít","");
  1287. return 1;
  1288. }
  1289.  
  1290. dcmd_setlevel(playerid,params[])
  1291. {
  1292. if(AdminLevel[playerid] == 0 || AdminLevel[playerid] == 1 || AdminLevel[playerid] == 2 || AdminLevel[playerid] == 3 || AdminLevel[playerid] == 4 || AdminLevel[playerid] == 5)
  1293. {
  1294. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1295. {
  1296. new string[128], pos, level;
  1297. if(!params[0]||!(pos=chrfind(' ',params)+1)||!params[pos]) return SendClientMessage(playerid, 0xFF0000AA, "/setlevel [id] [0-5]");
  1298. if(strlen(params) > 23) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Zadal jste chybné parametry.");
  1299. new id = strval(params[0]);
  1300. level = strval(params[pos]);
  1301. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
  1302. if(level < 0 || level > 5) return SendClientMessage(playerid, 0xFF0000AA, "/setlevel [id] [0-5]");
  1303. format(string,128,"Admin {FFFFFF}%s{CC0000} nastavil hráči {FFFFFF}%s{CC0000} admin level {FFFFFF}%d{CC0000}.",Jmeno(playerid),Jmeno(id),level);
  1304. SendClientMessageToAll(0xCC0000AA,string);
  1305. AdminLevel[id] = level;
  1306. }
  1307. }
  1308. return true;
  1309. }
  1310.  
  1311. new Float:xport,Float:yport,Float:zport;
  1312. dcmd_setport(playerid,params[])
  1313. {
  1314. #pragma unused params
  1315. if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1316. GetPlayerPos(playerid,xport,yport,zport);
  1317. new string[128];
  1318. format(string,128,"Admin {FFFFFF}%s{CC0000} uložil veřejný port {FFFFFF}/goport{CC0000}.",Jmeno(playerid));
  1319. SendClientMessageToAll(0xCC0000AA,string);
  1320. return true;
  1321. }
  1322.  
  1323. dcmd_goport(playerid,params[])
  1324. {
  1325. #pragma unused params
  1326. new string[200];
  1327. if(IsPlayerConnected(playerid))
  1328. {
  1329. new vozidlo = GetPlayerVehicleID(playerid);
  1330. if(!IsPlayerInAnyVehicle(playerid))
  1331. {
  1332. SetPlayerPos(playerid,xport,yport,zport);
  1333. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval na veřejný port {AFAFAF}/goport{0099FF}.",Jmeno(playerid));
  1334. SendClientMessageToAll(0x0099FFAA,string);
  1335. }else{
  1336. SetVehiclePos(vozidlo,xport,yport,zport);
  1337. format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval na veřejný port {AFAFAF}/goport{0099FF}.",Jmeno(playerid));
  1338. SendClientMessageToAll(0x0099FFAA,string);
  1339. }
  1340. }
  1341. return true;
  1342. }
  1343.  
  1344. dcmd_veh(playerid,params[])
  1345. {
  1346. if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1347. if(!params[0]) return SendClientMessage(playerid, 0xFF0000AA, "/veh [400 - 611]");
  1348. new ID_CAR = strval(params[0]);
  1349. if(ID_CAR < 400 || ID_CAR > 611) return SendClientMessage(playerid, 0xFF0000AA, "/veh [400 - 611]");
  1350. if(veh[playerid])
  1351. {
  1352. DestroyVehicle(veh[playerid]);
  1353. veh[playerid] = '\0';
  1354. }
  1355.  
  1356. new Float:vehx,Float:vehy,Float:vehz,Float:uhel;
  1357. GetPlayerPos(playerid, vehx, vehy, vehz);
  1358. GetPlayerFacingAngle(playerid, uhel);
  1359. veh[playerid] = CreateVehicle(ID_CAR, vehx, vehy, vehz, uhel, -1, -1, 60);
  1360. PutPlayerInVehicle(playerid, veh[playerid], 0);
  1361. LinkVehicleToInterior(veh[playerid], GetPlayerInterior(playerid));
  1362.  
  1363. new MaxDoors = GetVehicleMaxDoor(ID_CAR);
  1364.  
  1365. new string2[300];
  1366. format(string2, sizeof(string2), "Vytvořil jste {FFFFFF}%d{CC0000} dveřové vozidlo id {FFFFFF}%d{CC0000}.",MaxDoors,ID_CAR);
  1367. SendClientMessage(playerid,0xCC0000AA, string2);
  1368.  
  1369. format(string2, sizeof(string2), "Pro zníčení vystupte na {FFFFFF}60{CC0000} sekund z vozidla nebo použij příkaz {FFFFFF}/vehdel{CC0000}.");
  1370. SendClientMessage(playerid,0xCC0000AA, string2);
  1371.  
  1372. return true;
  1373. }
  1374.  
  1375. dcmd_vehdel(playerid,params[])
  1376. {
  1377. #pragma unused params
  1378. if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1379. if(!veh[playerid]) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Žádné vozidlo nemáte vytvořeno, použijte {99FF00}/veh [400-611]{FFFFFF}!");
  1380.  
  1381. DestroyVehicle(veh[playerid]);
  1382. veh[playerid] = '\0';
  1383.  
  1384. SendClientMessage(playerid, 0xCC0000AA, "Vozidlo bylo zničeno. Můžete znovu použít příkaz {FFFFFF}%s/veh [400-611]{CC0000}!");
  1385. return true;
  1386. }
  1387.  
  1388. dcmd_vehcolor(playerid,params[])
  1389. {
  1390. if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1391. new farba = strval(params),pos = chrfind(' ', params);
  1392. if(pos == -1) return SendClientMessage(playerid, 0xFF0000AA, "/vehcolor [Barva 1] [Barva 2]");
  1393. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nejste ve vozidle.");
  1394. new farba2 = strval(params[pos]);
  1395. if(farba > 128 || farba < 0) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Zadal jste špatné ID první barvy [1-127]!");
  1396. if(farba2 > 128 || farba2 < 0) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Zadal jste špatné ID druhé barvy [1-127]!");
  1397. ChangeVehicleColor(GetPlayerVehicleID(playerid), farba, farba2);
  1398. return true;
  1399. }
  1400.  
  1401. dcmd_freeze(playerid, params[])
  1402. {
  1403. new id = strval(params),string[200];
  1404. if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1405. if (!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "/freeze [id]");
  1406. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
  1407. format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} zmrazil hráče {FFFFFF}%s{CC0000}.", Jmeno(playerid),Jmeno(id));
  1408. SendClientMessageToAll(0xCC0000AA, string);
  1409. TogglePlayerControllable(id,0);
  1410. return 1;
  1411. }
  1412.  
  1413. dcmd_unfreeze(playerid, params[])
  1414. {
  1415. new id = strval(params),string[200];
  1416. if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1417. if (!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "/unfreeze [id]");
  1418. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
  1419. format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} odmrazil hráče {FFFFFF}%s{CC0000}.", Jmeno(playerid),Jmeno(id));
  1420. SendClientMessageToAll(0xCC0000AA, string);
  1421. TogglePlayerControllable(id,1);
  1422. return 1;
  1423. }
  1424.  
  1425. dcmd_deduction(playerid, params[])
  1426. {
  1427. if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1428. if(!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "/deduction [1-60]");
  1429. if(strlen(params) > 15) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Použití: Zadal jste chybné parametry!");
  1430.  
  1431. new Cas = strval(params);
  1432. if(Cas < 1 || 60 < Cas) return SendClientMessage(playerid, 0xFF0000AA, "/deduction [1-60]");
  1433. if(Odpocet > 0) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Odpočet již probíhá!");
  1434.  
  1435. new string[128];
  1436. format(string, 128, "Admin {FFFFFF}%s{CC0000} spustil odpočet na {FFFFFF}%d{CC0000} sekund.", Jmeno(playerid), Cas);
  1437. SendClientMessageToAll(0xCC0000AA, string);
  1438.  
  1439. Odpocet = Cas;
  1440. SetTimer("OdpocetS",1000, false);
  1441. return true;
  1442. }
  1443.  
  1444. public OdpocetS()
  1445. {
  1446. new string[8];
  1447. if(Odpocet > 0)
  1448. {
  1449. format(string,8,"~w~%d",Odpocet);
  1450. GameTextForAll(string, 1000, 4);
  1451. Odpocet--;
  1452. SetTimer("OdpocetS", 1000, false);
  1453. }else{
  1454. GameTextForAll("~g~START!", 2000, 4);
  1455. }
  1456. }
  1457.  
  1458. dcmd_kick(playerid, params[])
  1459. {
  1460. new duvod[25];
  1461. new id = strval(params);
  1462. new string[256];
  1463. if(AdminLevel[playerid] < 3) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1464. if(sscanf(params,"uz",id,duvod)) return SendClientMessage(playerid, 0xFF0000AA, "/kick [id] [důvod]");
  1465. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
  1466. format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} vyhodil hráče {FFFFFF}%s{CC0000} z důvodu: [ {FFFFFF}%s{CC0000} ].", Jmeno(playerid), Jmeno(id), duvod);
  1467. SendClientMessageToAll(0xCC0000AA, string);
  1468. Kick(id);
  1469. return 1;
  1470. }
  1471.  
  1472. dcmd_ban(playerid, params[])
  1473. {
  1474. new duvod[25];
  1475. new id = strval(params);
  1476. new string[256];
  1477. if(AdminLevel[playerid] < 4) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1478. if(sscanf(params,"uz",id,duvod)) return SendClientMessage(playerid, 0xFF0000AA, "/ban [id] [důvod]");
  1479. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
  1480. format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} zabanoval hráče {FFFFFF}%s{CC0000} z důvodu: [ {FFFFFF}%s{CC0000} ].", Jmeno(playerid), Jmeno(id), duvod);
  1481. SendClientMessageToAll(0xCC0000AA, string);
  1482. Ban(id);
  1483. return 1;
  1484. }
  1485.  
  1486. dcmd_pban(playerid, params[])
  1487. {
  1488. new duvod[25];
  1489. new id = strval(params);
  1490. new string[256];
  1491. if(AdminLevel[playerid] < 5) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1492. if(sscanf(params,"uz",id,duvod)) return SendClientMessage(playerid, 0xFF0000AA, "/pban [id] [důvod]");
  1493. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
  1494. format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} dal pban hráči {FFFFFF}%s{CC0000} z důvodu: [ {FFFFFF}%s{CC0000} ].", Jmeno(playerid), Jmeno(id), duvod);
  1495. SendClientMessageToAll(0xCC0000AA, string);
  1496. BanEx(id,"Pernamentní Ban");
  1497. return 1;
  1498. }
  1499.  
  1500. dcmd_pchat(playerid, params[])
  1501. {
  1502. #pragma unused params
  1503. if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1504. for(new c=0;c<10;c++) SendClientMessageToAll(-1," ");
  1505. new string[200];
  1506. format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} promazal chat.", Jmeno(playerid));
  1507. SendClientMessageToAll(0xCC0000AA, string);
  1508. return 1;
  1509. }
  1510.  
  1511. dcmd_killed(playerid, params[])
  1512. {
  1513. #pragma unused params
  1514. if(AdminLevel[playerid] < 3) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1515. if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "/killed [id]");
  1516. new id = strval(params);
  1517. SetPlayerHealth(id,-1);
  1518.  
  1519. new string[256];
  1520. format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} zabil hráče {FFFFFF}%s{CC0000}.",Jmeno(playerid),Jmeno(id));
  1521. SendClientMessageToAll(0xCC0000AA, string);
  1522. return 1;
  1523. }
  1524.  
  1525. dcmd_goto(playerid,params[])
  1526. {
  1527. #pragma unused params
  1528. if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1529. if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "/goto [id]");
  1530. new id = strval(params);
  1531. new Float:Pos[3];
  1532. GetPlayerPos(id,Pos[0],Pos[1],Pos[2]);
  1533. SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  1534. new string[256];
  1535. format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} se teleportoval k hráči {FFFFFF}%s{CC0000}.",Jmeno(playerid),Jmeno(id));
  1536. SendClientMessageToAll(0xCC0000AA, string);
  1537. return true;
  1538. }
  1539.  
  1540. dcmd_get(playerid,params[])
  1541. {
  1542. #pragma unused params
  1543. if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
  1544. if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "/get [id]");
  1545. new id = strval(params);
  1546. new Float:Pos[3];
  1547. GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  1548. SetPlayerPos(id,Pos[0],Pos[1],Pos[2]);
  1549. new string[256];
  1550. format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} k sobě přitáhl hráče {FFFFFF}%s{CC0000}.",Jmeno(playerid),Jmeno(id));
  1551. SendClientMessageToAll(0xCC0000AA, string);
  1552. return true;
  1553. }
  1554.  
  1555. // Admin příkazy .............. KONEC
  1556.  
  1557. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1558. {
  1559. return 1;
  1560. }
  1561.  
  1562. public OnPlayerExitVehicle(playerid, vehicleid)
  1563. {
  1564. return 1;
  1565. }
  1566.  
  1567. public OnPlayerStateChange(playerid,newstate,oldstate)
  1568. {
  1569. if(newstate == PLAYER_STATE_DRIVER){
  1570. new vehicleid = GetPlayerVehicleID(playerid);
  1571. for(new h; h < HouseCount+1;h++){
  1572. if(vehicleid == HouseInfo[h][Vehicle]){
  1573. if(!IsPlayerHouseOwner(playerid,h)){
  1574. RemovePlayerFromVehicle(playerid);
  1575. }
  1576. }
  1577. }
  1578. }
  1579. return 1;
  1580. }
  1581.  
  1582. public OnPlayerEnterCheckpoint(playerid)
  1583. {
  1584. return 1;
  1585. }
  1586.  
  1587. public OnPlayerLeaveCheckpoint(playerid)
  1588. {
  1589. return 1;
  1590. }
  1591.  
  1592. public OnPlayerEnterRaceCheckpoint(playerid)
  1593. {
  1594. return 1;
  1595. }
  1596.  
  1597. public OnPlayerLeaveRaceCheckpoint(playerid)
  1598. {
  1599. return 1;
  1600. }
  1601.  
  1602. public OnRconCommand(cmd[])
  1603. {
  1604. return 1;
  1605. }
  1606.  
  1607. public OnPlayerRequestSpawn(playerid)
  1608. {
  1609. return 1;
  1610. }
  1611.  
  1612. public OnObjectMoved(objectid)
  1613. {
  1614. return 1;
  1615. }
  1616.  
  1617. public OnPlayerObjectMoved(playerid, objectid)
  1618. {
  1619. return 1;
  1620. }
  1621.  
  1622. public OnPlayerPickUpPickup(playerid, pickupid)
  1623. {
  1624. new a = GetPlayerHouse(playerid);
  1625. if(!DialogShowed[playerid]){
  1626. if(a != -1){
  1627. SetPVarInt(playerid, "HouseID", a);
  1628. ShowPlayerDialog(playerid,HOUSE_DIALOG,DIALOG_STYLE_LIST,"Dům","Koupit\nProdat\nZamknout\nOdemknout\nStatistiky\nVozidlo\nVstoupit","Vybrat","Zavřít");
  1629. DialogShowed[playerid] = true;
  1630. }}
  1631. // Fortuna v San Fierru.
  1632. if(pickupid == FortunaPickup) {
  1633. SetPlayerInterior(playerid, 3);
  1634. SetPlayerPos(playerid, 832.3189,7.3165,1004.1797);
  1635. return 1;
  1636. }
  1637. if(pickupid == ExitFortunaPickup) {
  1638. SetPlayerInterior(playerid, 0);
  1639. SetPlayerPos(playerid, -2153.6738,151.2602,35.3203);
  1640. return 1;
  1641. }
  1642. if(pickupid == LoterieFortunaPickup) {
  1643. if(Loto_Cislo[playerid] > 0) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Už jsi podával loterii, počkej na slosování.");
  1644. ShowPlayerDialog(playerid,D_Loterie,DIALOG_STYLE_INPUT,"Fortuna","{FFFFFF}Napiš číslo které chceš vsadit do Loterie.\nPokud zadáš číslo které bude jako první, dostaneš výhru {33AA33}$1000000{FFFFFF}!\nNa vsázení je zapotřebí {33AA33}$200{FFFFFF}, rozmezí čísel je {FF0000}0{FFFFFF} až {FF0000}20{FFFFFF}.","Vsadit","Zavřít");
  1645. return 1;
  1646. }
  1647. // Ammunition v San Fierru.
  1648. if(pickupid == AmmunitionPickup) {
  1649. SetPlayerInterior(playerid, 7);
  1650. SetPlayerPos(playerid, 314.8122,-141.3575,999.6016);
  1651. return 1;
  1652. }
  1653. if(pickupid == ExitAmmunitionPickup) {
  1654. SetPlayerInterior(playerid, 0);
  1655. SetPlayerPos(playerid, -2051.7429,558.4496,35.0156);
  1656. return 1;
  1657. }
  1658. if(pickupid == OneAmmunitionPickup) {
  1659. ShowPlayerDialog(playerid,D_Weapons,DIALOG_STYLE_LIST,"Ammunition Balíček:","{FFFFFF}Baseball ({33AA33}$100{FFFFFF})\n{FFFFFF}Katana ({33AA33}$250{FFFFFF})\nDesert Eagle ({33AA33}$400{FFFFFF})\nSawnoff Shotgun ({33AA33}$900{FFFFFF})\nCombat Shotgun ({33AA33}$1000{FFFFFF})\nMicro SMG/Uzi ({33AA33}$1200{FFFFFF})\nAK-47 ({33AA33}$1500{FFFFFF})\nM4 ({33AA33}$1500{FFFFFF})\nSniper Rifle ({33AA33}$2500{FFFFFF})","Koupit","Zavřít");
  1660. return 1;
  1661. }
  1662. return 1;
  1663. }
  1664.  
  1665. public OnVehicleMod(playerid,vehicleid,componentid)
  1666. {
  1667. for(new h; h < HouseCount+1;h++){
  1668. if(HouseInfo[h][Vehicle] == vehicleid){
  1669. new s[128];
  1670. format(s,128,"Houses/House%d.txt",h);
  1671.  
  1672. switch(InitComponents(componentid)){
  1673. case 1: HouseInfo[h][Vmod][0] = componentid;
  1674. case 2: HouseInfo[h][Vmod][1] = componentid;
  1675. case 3: HouseInfo[h][Vmod][2] = componentid;
  1676. case 4: HouseInfo[h][Vmod][3] = componentid;
  1677. case 5: HouseInfo[h][Vmod][4] = componentid;
  1678. case 6: HouseInfo[h][Vmod][5] = componentid;
  1679. case 7: HouseInfo[h][Vmod][6] = componentid;
  1680. case 8: HouseInfo[h][Vmod][7] = componentid;
  1681. case 9: HouseInfo[h][Vmod][8] = componentid;
  1682. case 10: HouseInfo[h][Vmod][9] = componentid;
  1683. case 11: HouseInfo[h][Vmod][10] = componentid;
  1684. case 12: HouseInfo[h][Vmod][11] = componentid;
  1685. case 13: HouseInfo[h][Vmod][12] = componentid;
  1686. case 14: HouseInfo[h][Vmod][13] = componentid;
  1687. case 15: HouseInfo[h][Vmod][14] = componentid;
  1688. case 16: HouseInfo[h][Vmod][15] = componentid;
  1689. case 17: HouseInfo[h][Vmod][16] = componentid;
  1690. }
  1691. printf("Component Slot %d | Componentid %d",InitComponents(componentid),componentid);
  1692. }
  1693. }
  1694. return 1;
  1695. }
  1696.  
  1697. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1698. {
  1699. for(new i; i < HouseCount+1;i++){
  1700. if(vehicleid == HouseInfo[i][Vehicle]){
  1701. new s[128];
  1702. format(s,128,"Houses/House%d.txt",i);
  1703. HouseInfo[i][Paintjob] = paintjobid;
  1704. }
  1705. }
  1706. return 1;
  1707. }
  1708.  
  1709. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1710. {
  1711. for(new i; i < HouseCount+1;i++){
  1712. if(vehicleid == HouseInfo[i][Vehicle]){
  1713. new s[128];
  1714. format(s,128,"Houses/House%d.txt",i);
  1715. HouseInfo[i][Color1] = color1;
  1716. HouseInfo[i][Color2] = color2;
  1717. }
  1718. }
  1719. return 1;
  1720. }
  1721.  
  1722. public OnPlayerSelectedMenuRow(playerid, row)
  1723. {
  1724. return 1;
  1725. }
  1726.  
  1727. public OnPlayerExitedMenu(playerid)
  1728. {
  1729. return 1;
  1730. }
  1731.  
  1732. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  1733. {
  1734. return 1;
  1735. }
  1736.  
  1737. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1738. {
  1739. if(newkeys == KEY_WALK)
  1740. {
  1741. if(InHouse[playerid] != -1){
  1742. new HouseId = InHouse[playerid];
  1743. if(IsPlayerInRangeOfPoint(playerid,10,HouseInfo[HouseId][i_X],HouseInfo[HouseId][i_Y],HouseInfo[HouseId][i_Z]))
  1744. {
  1745. SetPlayerPos(playerid,HouseInfo[HouseId][p_X],HouseInfo[HouseId][p_Y],HouseInfo[HouseId][p_Z]);
  1746. SetPlayerInterior(playerid,0);
  1747. SetPlayerVirtualWorld(playerid,0);
  1748. InHouse[playerid] = -1;
  1749. }
  1750. }
  1751. }
  1752. return 1;
  1753. }
  1754.  
  1755. public OnRconLoginAttempt(ip[], password[], success)
  1756. {
  1757. return 1;
  1758. }
  1759.  
  1760. public OnPlayerUpdate(playerid)
  1761. {
  1762. new drunknew;
  1763. drunknew = GetPlayerDrunkLevel(playerid);
  1764.  
  1765. if (drunknew < 100) {
  1766. SetPlayerDrunkLevel(playerid, 2000);
  1767. } else {
  1768.  
  1769. if (pDrunkLevelLast[playerid] != drunknew) {
  1770.  
  1771. new wfps = pDrunkLevelLast[playerid] - drunknew;
  1772.  
  1773. if ((wfps > 0) && (wfps < 200))
  1774. pFPS[playerid] = wfps;
  1775.  
  1776. pDrunkLevelLast[playerid] = drunknew;
  1777. }
  1778.  
  1779. }
  1780. return 1;
  1781. }
  1782.  
  1783. forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
  1784. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  1785. {
  1786. if(issuerid != INVALID_PLAYER_ID && weaponid == 5)
  1787. {
  1788. new money = GetPlayerMoney(playerid) / random(15);
  1789.  
  1790. GivePlayerMoney(issuerid,money);
  1791. GivePlayerMoney(playerid,-money);
  1792.  
  1793. new str[50];
  1794.  
  1795. format(str, sizeof(str), "~w~+~g~%d",money);
  1796. GameTextForPlayer(issuerid, str, 2000, 1);
  1797.  
  1798. format(str, sizeof(str), "~w~-~r~%d",money);
  1799. GameTextForPlayer(playerid, str, 2000, 1);
  1800. }
  1801. return 0;
  1802. }
  1803.  
  1804. public OnPlayerStreamIn(playerid, forplayerid)
  1805. {
  1806. return 1;
  1807. }
  1808.  
  1809. public OnPlayerStreamOut(playerid, forplayerid)
  1810. {
  1811. return 1;
  1812. }
  1813.  
  1814. public OnVehicleStreamIn(vehicleid, forplayerid)
  1815. {
  1816. return 1;
  1817. }
  1818.  
  1819. public OnVehicleStreamOut(vehicleid, forplayerid)
  1820. {
  1821. return 1;
  1822. }
  1823.  
  1824. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1825. {
  1826. if(dialogid == 1)
  1827. {
  1828. if(response == 1)
  1829. {
  1830. if (udb_Exists(Jmeno(playerid))) return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"KobK","Přihlaš se, napiš své heslo které si uvedl při registraci.","Použít","Odpojit se");
  1831. if (strlen(inputtext)==0) return ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"KobK","Musíš napsat heslo!","Použít","Odpojit se");
  1832. if (udb_Create(Jmeno(playerid),inputtext)) return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"KobK","Víborně, nyní napiš heslo znovu!","Použít","Odpojit se");
  1833. }
  1834. if(response == 2)
  1835. {
  1836. Kick(playerid);
  1837. }
  1838. }
  1839. //==============================================================================
  1840. if(dialogid == 2)
  1841. {
  1842. if(response == 1)
  1843. {
  1844. if (strlen(inputtext)==0) return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"KobK","Musíš zadat heslo, napiš ho...","Použít","Odpojit se");
  1845. if (udb_CheckLogin(Jmeno(playerid),inputtext))
  1846. {
  1847.  
  1848. new Float:hp = dUserINT(Jmeno(playerid)).("Health");
  1849. if(hp != 0)
  1850. {
  1851. SetPlayerHealth(playerid, hp);
  1852. }
  1853. new Float:am = dUserINT(Jmeno(playerid)).("Armour");
  1854. if(am != 0)
  1855. {
  1856. SetPlayerArmour(playerid, am);
  1857. }
  1858. GivePlayerMoney(playerid,dUserINT(Jmeno(playerid)).("Money")-GetPlayerMoney(playerid));
  1859. Kill[playerid] = dUserINT(Jmeno(playerid)).("Kills");
  1860. Killed[playerid] = dUserINT(Jmeno(playerid)).("Deaths");
  1861. Respekt[playerid] = dUserINT(Jmeno(playerid)).("Respect");
  1862. AdminLevel[playerid] = dUserINT(Jmeno(playerid)).("AdminLevel");
  1863.  
  1864. PLAYERLIST_authed[playerid] = true;
  1865. return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Úspěšně jste se přihlásil.");
  1866. }
  1867. return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"KobK","Nesprávné heslo!","Použít","Odpojit se");
  1868. }
  1869. if(response == 2)
  1870. {
  1871. Kick(playerid);
  1872. }
  1873. }
  1874. // Kliknutím na hráče -------------------------------------------------- //
  1875. if(dialogid == D_ClickPlayer)
  1876. {
  1877. if(response == 1)
  1878. {
  1879. if(listitem == 0)
  1880. {
  1881. ShowPlayerDialog(playerid,D_ClickPlayer_Penize,DIALOG_STYLE_INPUT,"Poslat peníze:","Zadejte částku kterou chcete hráči poslat:","Poslat","Zavřít");
  1882. }
  1883. else if(listitem == 1)
  1884. {
  1885. ShowPlayerDialog(playerid,D_ClickPlayer_Zprava,DIALOG_STYLE_INPUT,"Napsat soukromou zprávu:","Zadejte zprávu kterou chcete hráči poslat:","Poslat","Zavřít");
  1886. }
  1887. }
  1888. }
  1889. // --------------------------------------------------------------------- //
  1890. if(dialogid == D_ClickPlayer_Penize)
  1891. {
  1892. if(response == 1)
  1893. {
  1894. new id = ClickPlayer[playerid];
  1895. new cash = strval(inputtext);
  1896. if(!response) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nezadal si částku.");
  1897. if(GetPlayerMoney(playerid) < cash) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  1898. if(cash == 0) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Zadal si malou částku.");
  1899. if(id == playerid) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemůžeš poslat peníze sám sobě.");
  1900.  
  1901. GivePlayerMoney(playerid,-cash);
  1902. GivePlayerMoney(id,cash);
  1903.  
  1904. new string[256];
  1905. format(string, sizeof(string), "Hráč {FF0000}%s{FFFFFF} poslal hráči {FF0000}%s{FFFFFF} částku {33AA33}$%d{FFFFFF}.", Jmeno(playerid), Jmeno(id), cash);
  1906. SendClientMessageToAll(0xFFFFFFAA, string);
  1907. }
  1908. }
  1909. // --------------------------------------------------------------------- //
  1910. if(dialogid == D_ClickPlayer_Zprava)
  1911. {
  1912. if(response == 1)
  1913. {
  1914. new id = ClickPlayer[playerid];
  1915. if(!response) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nenapsal si žádnou zprávu.");
  1916. if(id == playerid) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemůžeš poslat soukromou zprávu sám sobě.");
  1917.  
  1918. new string[256];
  1919.  
  1920. format(string, sizeof(string), "PM pro {FF0000}%s{FFFFFF} [{FF0000}%d{FFFFFF}]: {FFFF00}%s{FFFFFF}", Jmeno(id), id, inputtext);
  1921. SendClientMessage(playerid, 0xFFFFFFAA, string);
  1922.  
  1923. format(string, sizeof(string), "PM od {FF0000}%s{FFFFFF} [{FF0000}%d{FFFFFF}]: {FFFF00}%s{FFFFFF}", Jmeno(playerid), playerid, inputtext);
  1924. SendClientMessage(id, 0xFFFFFFAA, string);
  1925. }
  1926. }
  1927. // Kliknutím na hráče -------------------------------------------- Konec //
  1928.  
  1929. // Radio --------------------------------------------------------------- //
  1930. if(dialogid == D_Radio)
  1931. {
  1932. if(response == 1)
  1933. {
  1934. if(listitem == 0)
  1935. {
  1936. StopAudioStreamForPlayer(playerid);
  1937. SendClientMessage(playerid,0xFF0000AA,"[!]{FFFFFF} Radio vypnuté!");
  1938. }
  1939. else if(listitem == 1)
  1940. {
  1941. PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3");
  1942. SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}EVROPA 2{FFFFFF} se spouští.");
  1943. }
  1944. else if(listitem == 2)
  1945. {
  1946. PlayAudioStreamForPlayer(playerid,"http://ice.abradio.cz:8000/fajn128.mp3");
  1947. SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}FAJN{FFFFFF} se spouští.");
  1948. }
  1949. else if(listitem == 3)
  1950. {
  1951. PlayAudioStreamForPlayer(playerid,"http://sc.foxradio.cz:8888");
  1952. SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}FOX{FFFFFF} se spouští.");
  1953. }
  1954. else if(listitem == 4)
  1955. {
  1956. PlayAudioStreamForPlayer(playerid,"http://icecast6.play.cz/frekvence1-128.mp3");
  1957. SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}FREKVENCE 1{FFFFFF} se spouští.");
  1958. }
  1959. else if(listitem == 5)
  1960. {
  1961. PlayAudioStreamForPlayer(playerid,"http://icecast2.play.cz:8000/HipHopStage192.mp3");
  1962. SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}HIPHOPSTAGE{FFFFFF} se spouští.");
  1963. }
  1964. else if(listitem == 6)
  1965. {
  1966. PlayAudioStreamForPlayer(playerid,"http://icecast5.play.cz/impuls128.mp3.m3u");
  1967. SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}IMPULS{FFFFFF} se spouští.");
  1968. }
  1969. }
  1970. }
  1971. // Radio --------------------------------------------------------- Konec //
  1972. // Weapons ------------------------------------------------------- Konec //
  1973. if(dialogid == D_Weapons)
  1974. {
  1975. if(response == 1)
  1976. {
  1977. if(listitem == 0)
  1978. {
  1979. if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  1980. GivePlayerMoney(playerid, -100);
  1981. GivePlayerWeapon(playerid, 5, 1);
  1982. }
  1983. else if(listitem == 1)
  1984. {
  1985. if(GetPlayerMoney(playerid) < 250) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  1986. GivePlayerMoney(playerid, -250);
  1987. GivePlayerWeapon(playerid, 8, 1);
  1988. }
  1989. else if(listitem == 2)
  1990. {
  1991. if(GetPlayerMoney(playerid) < 400) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  1992. GivePlayerMoney(playerid, -400);
  1993. GivePlayerWeapon(playerid, 24, 150);
  1994. }
  1995. else if(listitem == 3)
  1996. {
  1997. if(GetPlayerMoney(playerid) < 900) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  1998. GivePlayerMoney(playerid, -900);
  1999. GivePlayerWeapon(playerid, 26, 150);
  2000. }
  2001. else if(listitem == 4)
  2002. {
  2003. if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  2004. GivePlayerMoney(playerid, -1000);
  2005. GivePlayerWeapon(playerid, 27, 150);
  2006. }
  2007. else if(listitem == 5)
  2008. {
  2009. if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  2010. GivePlayerMoney(playerid, -1200);
  2011. GivePlayerWeapon(playerid, 28, 150);
  2012. }
  2013. else if(listitem == 6)
  2014. {
  2015. if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  2016. GivePlayerMoney(playerid, -1500);
  2017. GivePlayerWeapon(playerid, 30, 150);
  2018. }
  2019. else if(listitem == 7)
  2020. {
  2021. if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  2022. GivePlayerMoney(playerid, -1500);
  2023. GivePlayerWeapon(playerid, 31, 150);
  2024. }
  2025. else if(listitem == 8)
  2026. {
  2027. if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  2028. GivePlayerMoney(playerid, -2500);
  2029. GivePlayerWeapon(playerid, 34, 150);
  2030. }
  2031. }
  2032. }
  2033.  
  2034. if(dialogid == D_Loterie)
  2035. {
  2036. if(response == 1)
  2037. {
  2038. new castka = strval(inputtext), str[150];
  2039. if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz, potřebuješ $200.");
  2040. if(!strlen(inputtext)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Zadal jsi chybé číslo.");
  2041. if(castka < 1 || castka > 20) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Rozmezí čísel je 1 až 20.");
  2042. Loto_Cislo[playerid] = castka;
  2043. GivePlayerMoney(playerid, -200);
  2044. format(str, 150, "Vsadil jsi do loterie číslo {FF0000}%d{FFFFFF}, byl ti stržen poplatek {FF0000}-$200{FFFFFF}.", castka);
  2045. SendClientMessage(playerid, 0xFFFFFFAA, str);
  2046. }
  2047. }
  2048.  
  2049. DialogShowed[playerid] = false;
  2050. new h = GetPlayerHouse(playerid);
  2051. if(dialogid == HOUSE_DIALOG)
  2052. {
  2053. if(response == 1)
  2054. {
  2055. if(listitem == 0)
  2056. {
  2057. if(GetPlayerMoney(playerid) < HouseInfo[h][Cena]) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
  2058. if(!IsHouseForSale(h)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Tento dům již někdo vlastní.");
  2059. new s[128];
  2060. format(s,128,"Houses/House%d.txt",h);
  2061. dini_Set(s,"Owner",PlayerName(playerid));
  2062. GivePlayerMoney(playerid, -HouseInfo[h][Cena]);
  2063. SendClientMessage(playerid, 0xFF0000AA, "Nyní jsi nový Majitel tohoto domů.");
  2064. new sx[100];
  2065. format(sx,100,"Dům č.%d\r\nMajitel: %s",h,dini_Get(s,"Owner"));
  2066. Update3DTextLabelText(HouseInfo[h][Text],0xFF0000FF,sx);
  2067. DestroyPickup(HouseInfo[h][Pickup]);
  2068. HouseInfo[h][Pickup] = CreatePickup(1272,1,HouseInfo[h][p_X],HouseInfo[h][p_Y],HouseInfo[h][p_Z]);
  2069. }
  2070. else if(listitem == 1)
  2071. {
  2072. if(!IsPlayerHouseOwner(playerid,h)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nejsi Majitel tohoto domů.");
  2073. new s[128];
  2074. format(s,128,"Houses/House%d.txt",h);
  2075. dini_Set(s,"Owner","none");
  2076. GivePlayerMoney(playerid, HouseInfo[h][Cena]/2);
  2077. SendClientMessage(playerid, 0xFF0000AA, "Úspešne jsi prodal svůj dům. Dostal jsi polovinu ceny domů.");
  2078. new sx[100];
  2079. format(sx,100,"Dům č.%d\r\nMajitel: Nikdo\r\nCena: %d",h,HouseInfo[h][Cena]);
  2080. Update3DTextLabelText(HouseInfo[h][Text],0xFF0000FF,sx);
  2081. DestroyPickup(HouseInfo[h][Pickup]);
  2082. HouseInfo[h][Pickup] = CreatePickup(1273,1,HouseInfo[h][p_X],HouseInfo[h][p_Y],HouseInfo[h][p_Z]);
  2083. }
  2084. else if(listitem == 2)
  2085. {
  2086. if(!IsPlayerHouseOwner(playerid,h)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nejsi Majitel tohoto domů.");
  2087. new s[128];
  2088. format(s,128,"Houses/House%d.txt",h);
  2089. dini_IntSet(s,"Locked",1);
  2090. HouseInfo[h][Zamek] = 0;
  2091. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Dveře domů zamčené.");
  2092. }
  2093. else if(listitem == 3)
  2094. {
  2095. if(!IsPlayerHouseOwner(playerid,h)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nejsi Majitel tohoto domů.");
  2096. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Dveře domů odemčené.");
  2097. new s[128];
  2098. format(s,128,"Houses/House%d.txt",h);
  2099. dini_IntSet(s,"Locked",0);
  2100. HouseInfo[h][Zamek] = 1;
  2101. }
  2102. else if(listitem == 4)
  2103. {
  2104. SendClientMessage(playerid, 0xFFFFFFFF, "Informace o domů:");
  2105. if(HouseInfo[h][Zamek] == 0)
  2106. {
  2107. SendClientMessage(playerid,0xFF0000AA,"Dveře domů jsou zamčené.");
  2108. }else{
  2109. SendClientMessage(playerid,0xFF0000AA,"Dveře domů jsou odemčené.");
  2110. }
  2111. if (IsHouseForSale(h))
  2112. {
  2113. SendClientMessage(playerid,0xFF0000AA,"Tento dům je možné si koupit.");
  2114. }else{
  2115. SendClientMessage(playerid,0xFF0000AA,"Tento dům není na prodej.");
  2116. }
  2117. }
  2118. else if(listitem == 5){
  2119. if(!IsPlayerHouseOwner(playerid,h)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nejsi Majitel tohoto domů.");
  2120. ShowPlayerDialog(playerid,CAR_DIALOG,DIALOG_STYLE_LIST,"Vozidlo","Vozidlo\nUložit tuning\nProdat vozidlo","Vybrat","Zavřít");
  2121. DialogShowed[playerid] = true;
  2122. }
  2123. else if(listitem == 6)
  2124. {
  2125. if(HouseInfo[h][Zamek] == 0) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Dveře domů jsou zamčené.");
  2126. SetPlayerPos(playerid, HouseInfo[h][i_X],HouseInfo[h][i_Y],HouseInfo[h][i_Z]);
  2127. SetPlayerInterior(playerid, HouseInfo[h][iin]);
  2128. SetPlayerVirtualWorld(playerid,HouseInfo[h][VW]);
  2129. InHouse[playerid] = h;
  2130. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Dům opustíš pomocí L.ALT.");
  2131. }
  2132. }
  2133. }
  2134.  
  2135. if(dialogid == CAR_DIALOG && response == 1){
  2136. new s[128];
  2137. format(s,128,"Houses/House%d.txt",h);
  2138. if(listitem == 0){
  2139. ShowPlayerDialog(playerid,VEHICLE_DIALOG,DIALOG_STYLE_LIST,"Vozidlo","Infernus\t1 000 000\nTurismo\t1 250 000\nNRG-500\t250 000\nPCJ-600\t100 000\nSultan\t\t750 000\nBlade\t\t800 000\nSavanna\t650 000\nRemington\t500 000\nClover\t\t450 000\nElegy\t\t900 000\nAlpha\t\t340 000\nBullet\t\t800 000\nEuros\t\t400 000\nHotring\t\t1 200 000\nJester\t\t850 000\nPhoenix\t600 000\nSuper GT\t900 000","Koupit","Zavřít");
  2140. DialogShowed[playerid] = true;
  2141. }
  2142. else if(listitem == 1){
  2143. if(dini_Int(s,"Auto") == 0) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nevlastníš vozidlo.");
  2144.  
  2145.  
  2146.  
  2147. dini_IntSet(s,"Color1",HouseInfo[h][Color1]);
  2148. dini_IntSet(s,"Color2",HouseInfo[h][Color1]);
  2149. dini_IntSet(s,"Paintjob",HouseInfo[h][Paintjob]);
  2150. dini_IntSet(s,"Tuning1",HouseInfo[h][Vmod][0]);
  2151. dini_IntSet(s,"Tuning2",HouseInfo[h][Vmod][1]);
  2152. dini_IntSet(s,"Tuning3",HouseInfo[h][Vmod][2]);
  2153. dini_IntSet(s,"Tuning4",HouseInfo[h][Vmod][3]);
  2154. dini_IntSet(s,"Tuning5",HouseInfo[h][Vmod][4]);
  2155. dini_IntSet(s,"Tuning6",HouseInfo[h][Vmod][5]);
  2156. dini_IntSet(s,"Tuning7",HouseInfo[h][Vmod][6]);
  2157. dini_IntSet(s,"Tuning8",HouseInfo[h][Vmod][7]);
  2158. dini_IntSet(s,"Tuning9",HouseInfo[h][Vmod][8]);
  2159. dini_IntSet(s,"Tuning10",HouseInfo[h][Vmod][9]);
  2160. dini_IntSet(s,"Tuning11",HouseInfo[h][Vmod][10]);
  2161. dini_IntSet(s,"Tuning12",HouseInfo[h][Vmod][11]);
  2162. dini_IntSet(s,"Tuning13",HouseInfo[h][Vmod][12]);
  2163. dini_IntSet(s,"Tuning14",HouseInfo[h][Vmod][13]);
  2164. dini_IntSet(s,"Tuning15",HouseInfo[h][Vmod][14]);
  2165. dini_IntSet(s,"Tuning16",HouseInfo[h][Vmod][15]);
  2166. dini_IntSet(s,"Tuning17",HouseInfo[h][Vmod][16]);
  2167.  
  2168. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Tuning vozidla uložen.");
  2169. }
  2170. else if(listitem == 2){
  2171. if(dini_Int(s,"Auto") == 0) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nevlastníš vozidlo.");
  2172. DestroyVehicle(HouseInfo[h][Vehicle]);
  2173. dini_IntSet(s,"Auto",0);
  2174. dini_IntSet(s,"Vehicle",0);
  2175. dini_IntSet(s,"Color1",0);
  2176. dini_IntSet(s,"Color2",0);
  2177. dini_IntSet(s,"Paintjob",-1);
  2178. dini_IntSet(s,"Tuning1",0);
  2179. dini_IntSet(s,"Tuning2",0);
  2180. dini_IntSet(s,"Tuning3",0);
  2181. dini_IntSet(s,"Tuning4",0);
  2182. dini_IntSet(s,"Tuning5",0);
  2183. dini_IntSet(s,"Tuning6",0);
  2184. dini_IntSet(s,"Tuning7",0);
  2185. dini_IntSet(s,"Tuning8",0);
  2186. dini_IntSet(s,"Tuning9",0);
  2187. dini_IntSet(s,"Tuning10",0);
  2188. dini_IntSet(s,"Tuning11",0);
  2189. dini_IntSet(s,"Tuning12",0);
  2190. dini_IntSet(s,"Tuning13",0);
  2191. dini_IntSet(s,"Tuning14",0);
  2192. dini_IntSet(s,"Tuning15",0);
  2193. dini_IntSet(s,"Tuning16",0);
  2194. dini_IntSet(s,"Tuning17",0);
  2195. HouseInfo[h][Vehicle] = -1;
  2196. //kdyz smaze vozidlo
  2197. }
  2198. }
  2199.  
  2200. if(dialogid == VEHICLE_DIALOG && response == 1){
  2201. new s[128];
  2202. format(s,128,"Houses/House%d.txt",h);
  2203. if(listitem == 0){
  2204. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2205. HaveNotMoney(playerid,1000000);
  2206. HouseInfo[h][Vehicle] = CreateVehicle(411,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2207. dini_IntSet(s,"Vehicle",411);
  2208. GivePlayerMoney(playerid,-1000000);
  2209. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2210. dini_IntSet(s,"Auto",1);
  2211. }
  2212. if(listitem == 1){
  2213. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2214. HaveNotMoney(playerid,1250000);
  2215. HouseInfo[h][Vehicle] = CreateVehicle(451,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2216. dini_IntSet(s,"Vehicle",451);
  2217. GivePlayerMoney(playerid,-1250000);
  2218. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2219. dini_IntSet(s,"Auto",1);
  2220. }
  2221. if(listitem == 2){
  2222. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2223. HaveNotMoney(playerid,250000);
  2224. HouseInfo[h][Vehicle] = CreateVehicle(522,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2225. dini_IntSet(s,"Vehicle",522);
  2226. GivePlayerMoney(playerid,-250000);
  2227. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si novou motorku.");
  2228. dini_IntSet(s,"Auto",1);
  2229. }
  2230. if(listitem == 3){
  2231.  
  2232. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2233. HaveNotMoney(playerid,100000);
  2234. HouseInfo[h][Vehicle] = CreateVehicle(461,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2235. dini_IntSet(s,"Vehicle",461);
  2236. GivePlayerMoney(playerid,-100000);
  2237. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2238. dini_IntSet(s,"Auto",1);
  2239. }
  2240. if(listitem == 4){
  2241. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2242. HaveNotMoney(playerid,750000);
  2243. HouseInfo[h][Vehicle] = CreateVehicle(560,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2244. dini_IntSet(s,"Vehicle", 560);
  2245. GivePlayerMoney(playerid,-750000);
  2246. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2247. dini_IntSet(s,"Auto",1);
  2248. }
  2249. if(listitem == 5){
  2250. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2251. HaveNotMoney(playerid,800000);
  2252. HouseInfo[h][Vehicle] = CreateVehicle(567,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2253. dini_IntSet(s,"Vehicle",567);
  2254. GivePlayerMoney(playerid,-800000);
  2255. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2256. dini_IntSet(s,"Auto",1);
  2257. }
  2258. if(listitem == 6){
  2259. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2260. HaveNotMoney(playerid,650000);
  2261. HouseInfo[h][Vehicle] = CreateVehicle(534,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2262. dini_IntSet(s,"Vehicle",534);
  2263. GivePlayerMoney(playerid,-650000);
  2264. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2265. dini_IntSet(s,"Auto",1);
  2266. }
  2267. if(listitem == 7){
  2268. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2269. HaveNotMoney(playerid,500000);
  2270. HouseInfo[h][Vehicle] = CreateVehicle(542,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2271. dini_IntSet(s,"Vehicle",542);
  2272. GivePlayerMoney(playerid,-500000);
  2273. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2274. dini_IntSet(s,"Auto",1);
  2275. }
  2276. if(listitem == 8){
  2277. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2278. HaveNotMoney(playerid,450000);
  2279. HouseInfo[h][Vehicle] = CreateVehicle(562,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2280. dini_IntSet(s,"Vehicle",562);
  2281. GivePlayerMoney(playerid,-450000);
  2282. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2283. dini_IntSet(s,"Auto",1);
  2284. }
  2285. if(listitem == 9){
  2286. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2287. HaveNotMoney(playerid,900000);
  2288. HouseInfo[h][Vehicle] = CreateVehicle(536,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2289. dini_IntSet(s,"Vehicle",536);
  2290. GivePlayerMoney(playerid,-900000);
  2291. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2292. dini_IntSet(s,"Auto",1);
  2293. }
  2294. if(listitem == 10){
  2295. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2296. HaveNotMoney(playerid,340000);
  2297. HouseInfo[h][Vehicle] = CreateVehicle(602,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2298. dini_IntSet(s,"Vehicle",602);
  2299. GivePlayerMoney(playerid,-340000);
  2300. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2301. dini_IntSet(s,"Auto",1);
  2302. }
  2303. if(listitem == 11){
  2304. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2305. HaveNotMoney(playerid,800000);
  2306. HouseInfo[h][Vehicle] = CreateVehicle(541,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2307. dini_IntSet(s,"Vehicle",541);
  2308. GivePlayerMoney(playerid,-800000);
  2309. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2310. dini_IntSet(s,"Auto",1);
  2311. }
  2312. if(listitem == 12){
  2313. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2314. HaveNotMoney(playerid,400000);
  2315. HouseInfo[h][Vehicle] = CreateVehicle( 587,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2316. dini_IntSet(s,"Vehicle", 587);
  2317. GivePlayerMoney(playerid,-400000);
  2318. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2319. dini_IntSet(s,"Auto",1);
  2320. }
  2321. if(listitem == 13){
  2322. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2323. HaveNotMoney(playerid,1200000);
  2324. HouseInfo[h][Vehicle] = CreateVehicle(494,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2325. dini_IntSet(s,"Vehicle",494);
  2326. GivePlayerMoney(playerid,-1200000);
  2327. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2328. dini_IntSet(s,"Auto",1);
  2329. }
  2330. if(listitem == 14){
  2331. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2332. HaveNotMoney(playerid,850000);
  2333. HouseInfo[h][Vehicle] = CreateVehicle(559,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2334. dini_IntSet(s,"Vehicle",559);
  2335. GivePlayerMoney(playerid,-850000);
  2336. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2337. dini_IntSet(s,"Auto",1);
  2338. }
  2339. if(listitem == 15){
  2340. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2341. HaveNotMoney(playerid,600000);
  2342. HouseInfo[h][Vehicle] = CreateVehicle( 603,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2343. dini_IntSet(s,"Vehicle", 603);
  2344. GivePlayerMoney(playerid,-600000);
  2345. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2346. dini_IntSet(s,"Auto",1);
  2347. }
  2348. if(listitem == 16){
  2349. if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
  2350. HaveNotMoney(playerid,900000);
  2351. HouseInfo[h][Vehicle] = CreateVehicle( 506,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
  2352. dini_IntSet(s,"Vehicle", 506);
  2353. GivePlayerMoney(playerid,-900000);
  2354. SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
  2355. dini_IntSet(s,"Auto",1);
  2356. }
  2357. }
  2358.  
  2359. return 1;
  2360. }
  2361.  
  2362. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  2363. {
  2364. ClickPlayer[playerid] = clickedplayerid;
  2365. new str[128];
  2366. format(str,128,"%s",Jmeno(clickedplayerid));
  2367. ShowPlayerDialog(playerid,D_ClickPlayer,DIALOG_STYLE_LIST,str,"Poslat hráči peníze\nNapsat hráči soukromou zprávu","Vybrat","Zavřít");
  2368. return 1;
  2369. }
  2370.  
  2371. forward UpdateAll();
  2372. public UpdateAll()
  2373. {
  2374. new str[256],Float:ratio;
  2375. for(new i; i < MAX_PLAYERS;i++){
  2376. if(Killed[i] == 0) ratio = Kill[i];
  2377. else ratio = float(Kill[i])/float(Killed[i]);
  2378. new Fps = GetPlayerFPS(i);
  2379. new Ping = GetPlayerPing(i);
  2380. format(str,256,"~w~Kills: ~b~%d ~w~l Deaths: ~r~%d ~w~l Ratio: ~y~%0.2f~n~~w~Fps: ~y~%d ~w~l Ping: ~r~%d~n~~w~Respect: ~g~%d",Kill[i],Killed[i],ratio,Fps,Ping,Respekt[i]);
  2381. TextDrawSetString(ZUR[i],str);
  2382. TextDrawHideForPlayer(i,ZUR[i]);
  2383. TextDrawShowForPlayer(i,ZUR[i]);
  2384. }
  2385. return 1;
  2386. }
  2387.  
  2388. stock UpdatePlayer(playerid)
  2389. {
  2390. new str[256],Float:ratio;
  2391. if(Killed[playerid] == 0) ratio = Kill[playerid];
  2392. else ratio = float(Kill[playerid])/float(Killed[playerid]);
  2393. new Fps = GetPlayerFPS(playerid);
  2394. new Ping = GetPlayerPing(playerid);
  2395. format(str,256,"~w~Kills: ~b~%d ~w~l Deaths: ~r~%d ~w~l Ratio: ~y~%0.2f~n~~w~Fps: ~y~%d ~w~l Ping: ~r~%d~n~~w~Respect: ~g~%d",Kill[playerid],Killed[playerid],ratio,Fps,Ping,Respekt[playerid]);
  2396. TextDrawSetString(ZUR[playerid],str);
  2397. TextDrawHideForPlayer(playerid,ZUR[playerid]);
  2398. TextDrawShowForPlayer(playerid,ZUR[playerid]);
  2399. return 1;
  2400. }
  2401.  
  2402. stock TextDraws()
  2403. {
  2404. for(new i; i < MAX_PLAYERS;i++){
  2405. ZUR[i] = TextDrawCreate(470 ,390 ,"~w~Kills: ~b~0 ~w~l Deaths: ~r~0 ~w~l Ratio: ~y~0.00~n~~w~Fps: ~y~0 ~w~l Ping: ~r~0~n~~w~Respect: ~g~0");
  2406. TextDrawTextSize(ZUR[i] ,700,700);
  2407. TextDrawFont(ZUR[i],1);
  2408. TextDrawSetShadow(ZUR[i],1);
  2409. TextDrawColor(ZUR[i], 0xFFFFFFAA);
  2410. TextDrawUseBox(ZUR[i],0);
  2411. TextDrawLetterSize(ZUR[i] ,0.20 ,1.20);
  2412. TextDrawBoxColor(ZUR[i], 0xFFFFFFAA);
  2413. }
  2414.  
  2415. ModeName = TextDrawCreate(500 ,5 ,"~g~Kill ~w~or be ~r~Killed");
  2416. TextDrawTextSize(ModeName ,700,700);
  2417. TextDrawFont(ModeName,1);
  2418. TextDrawSetShadow(ModeName,1);
  2419. TextDrawColor(ModeName, 0xFFFFFFAA);
  2420. TextDrawUseBox(ModeName,0);
  2421. TextDrawLetterSize(ModeName ,0.20 ,1.20);
  2422. TextDrawBoxColor(ModeName, 0xFFFFFFAA);
  2423.  
  2424. txtTimeDisp = TextDrawCreate(565 ,40 ,"~w~00~r~:~w~00");
  2425. TextDrawTextSize(txtTimeDisp ,700,700);
  2426. TextDrawFont(txtTimeDisp,1);
  2427. TextDrawSetShadow(txtTimeDisp,1);
  2428. TextDrawColor(txtTimeDisp, 0xFFFFFFAA);
  2429. TextDrawUseBox(txtTimeDisp,0);
  2430. TextDrawLetterSize(txtTimeDisp ,0.20 ,1.20);
  2431. TextDrawBoxColor(txtTimeDisp, 0xFFFFFFAA);
  2432.  
  2433. TimeName = TextDrawCreate(565 ,30 ,"~w~Time~r~:");
  2434. TextDrawTextSize(TimeName,700,700);
  2435. TextDrawFont(TimeName,1);
  2436. TextDrawSetShadow(TimeName,1);
  2437. TextDrawColor(TimeName, 0xFFFFFFAA);
  2438. TextDrawUseBox(TimeName,0);
  2439. TextDrawLetterSize(TimeName ,0.20 ,1.20);
  2440. TextDrawBoxColor(TimeName, 0xFFFFFFAA);
  2441.  
  2442. ModeName2 = TextDrawCreate(180 ,200 ,"~n~ ~g~Kill ~w~or be ~r~Killed~n~");
  2443. TextDrawTextSize(ModeName2 ,700,700);
  2444. TextDrawFont(ModeName2,1);
  2445. TextDrawSetShadow(ModeName2,1);
  2446. TextDrawColor(ModeName2, 0xFFFFFFAA);
  2447. TextDrawUseBox(ModeName2,0);
  2448. TextDrawLetterSize(ModeName2 ,1.00 ,3.00);
  2449. TextDrawBoxColor(ModeName2, 0xFFFFFFAA);
  2450. }
  2451.  
  2452. stock GetPlayerFPS(playerid) return pFPS[playerid];
  2453.  
  2454. stock Jmeno(playerid)
  2455. {
  2456. new n[26];
  2457. GetPlayerName(playerid, n, sizeof(n));
  2458. return n;
  2459. }
  2460.  
  2461. stock Warp(playerid, Float:X, Float:Y, Float:Z, interior){
  2462. if(IsPlayerConnected(playerid)){
  2463. if(IsPlayerInAnyVehicle(playerid)){
  2464. SetPlayerInterior(playerid, interior);
  2465. LinkVehicleToInterior(GetPlayerVehicleID(playerid), interior);
  2466. SetVehiclePos(GetPlayerVehicleID(playerid), X,Y,Z);
  2467. }else{
  2468. SetPlayerInterior(playerid, interior);
  2469. SetPlayerPos(playerid, X,Y,Z);
  2470. }
  2471. }
  2472. }
  2473.  
  2474. stock chrfind(needle, haystack[], start = 0)
  2475. {
  2476. while (haystack[start]) if (haystack[start++] == needle) return start - 1;
  2477. return -1;
  2478. }
  2479.  
  2480. stock sscanf(string[], format[], {Float,_}:...)
  2481. {
  2482. #if defined isnnull
  2483. if (isnnull(string))
  2484. #else
  2485. if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
  2486. #endif
  2487. {
  2488. return format[0];
  2489. }
  2490. #pragma tabsize 4
  2491. new
  2492. formatPos = 0,
  2493. stringPos = 0,
  2494. paramPos = 2,
  2495. paramCount = numargs(),
  2496. delim = ' ';
  2497. while (string[stringPos] && string[stringPos] <= ' ')
  2498. {
  2499. stringPos++;
  2500. }
  2501. while (paramPos < paramCount && string[stringPos])
  2502. {
  2503. switch (format[formatPos++])
  2504. {
  2505. case '\0':
  2506. {
  2507. return 0;
  2508. }
  2509. case 'i', 'd':
  2510. {
  2511. new
  2512. neg = 1,
  2513. num = 0,
  2514. ch = string[stringPos];
  2515. if (ch == '-')
  2516. {
  2517. neg = -1;
  2518. ch = string[++stringPos];
  2519. }
  2520. do
  2521. {
  2522. stringPos++;
  2523. if ('0' <= ch <= '9')
  2524. {
  2525. num = (num * 10) + (ch - '0');
  2526. }
  2527. else
  2528. {
  2529. return -1;
  2530. }
  2531. }
  2532. while ((ch = string[stringPos]) > ' ' && ch != delim);
  2533. setarg(paramPos, 0, num * neg);
  2534. }
  2535. case 'h', 'x':
  2536. {
  2537. new
  2538. num = 0,
  2539. ch = string[stringPos];
  2540. do
  2541. {
  2542. stringPos++;
  2543. switch (ch)
  2544. {
  2545. case 'x', 'X':
  2546. {
  2547. num = 0;
  2548. continue;
  2549. }
  2550. case '0' .. '9':
  2551. {
  2552. num = (num << 4) | (ch - '0');
  2553. }
  2554. case 'a' .. 'f':
  2555. {
  2556. num = (num << 4) | (ch - ('a' - 10));
  2557. }
  2558. case 'A' .. 'F':
  2559. {
  2560. num = (num << 4) | (ch - ('A' - 10));
  2561. }
  2562. default:
  2563. {
  2564. return -1;
  2565. }
  2566. }
  2567. }
  2568. while ((ch = string[stringPos]) > ' ' && ch != delim);
  2569. setarg(paramPos, 0, num);
  2570. }
  2571. case 'c':
  2572. {
  2573. setarg(paramPos, 0, string[stringPos++]);
  2574. }
  2575. case 'f':
  2576. {
  2577.  
  2578. new changestr[16], changepos = 0, strpos = stringPos;
  2579. while(changepos < 16 && string[strpos] && string[strpos] != delim)
  2580. {
  2581. changestr[changepos++] = string[strpos++];
  2582. }
  2583. changestr[changepos] = '\0';
  2584. setarg(paramPos,0,_:floatstr(changestr));
  2585. }
  2586. case 'p':
  2587. {
  2588. delim = format[formatPos++];
  2589. continue;
  2590. }
  2591. case '\'':
  2592. {
  2593. new
  2594. end = formatPos - 1,
  2595. ch;
  2596. while ((ch = format[++end]) && ch != '\'') {}
  2597. if (!ch)
  2598. {
  2599. return -1;
  2600. }
  2601. format[end] = '\0';
  2602. if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
  2603. {
  2604. if (format[end + 1])
  2605. {
  2606. return -1;
  2607. }
  2608. return 0;
  2609. }
  2610. format[end] = '\'';
  2611. stringPos = ch + (end - formatPos);
  2612. formatPos = end + 1;
  2613. }
  2614. case 'u':
  2615. {
  2616. new
  2617. end = stringPos - 1,
  2618. id = 0,
  2619. bool:num = true,
  2620. ch;
  2621. while ((ch = string[++end]) && ch != delim)
  2622. {
  2623. if (num)
  2624. {
  2625. if ('0' <= ch <= '9')
  2626. {
  2627. id = (id * 10) + (ch - '0');
  2628. }
  2629. else
  2630. {
  2631. num = false;
  2632. }
  2633. }
  2634. }
  2635. if (num && IsPlayerConnected(id))
  2636. {
  2637. setarg(paramPos, 0, id);
  2638. }
  2639. else
  2640. {
  2641. #if !defined foreach
  2642. #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  2643. #define __SSCANF_FOREACH__
  2644. #endif
  2645. string[end] = '\0';
  2646. num = false;
  2647. new
  2648. name[MAX_PLAYER_NAME];
  2649. id = end - stringPos;
  2650. foreach (Player, playerid)
  2651. {
  2652. GetPlayerName(playerid, name, sizeof (name));
  2653. if (!strcmp(name, string[stringPos], true, id))
  2654. {
  2655. setarg(paramPos, 0, playerid);
  2656. num = true;
  2657. break;
  2658. }
  2659. }
  2660. if (!num)
  2661. {
  2662. setarg(paramPos, 0, INVALID_PLAYER_ID);
  2663. }
  2664. string[end] = ch;
  2665. #if defined __SSCANF_FOREACH__
  2666. #undef foreach
  2667. #undef __SSCANF_FOREACH__
  2668. #endif
  2669. }
  2670. stringPos = end;
  2671. }
  2672. case 's', 'z':
  2673. {
  2674. new
  2675. i = 0,
  2676. ch;
  2677. if (format[formatPos])
  2678. {
  2679. while ((ch = string[stringPos++]) && ch != delim)
  2680. {
  2681. setarg(paramPos, i++, ch);
  2682. }
  2683. if (!i)
  2684. {
  2685. return -1;
  2686. }
  2687. }
  2688. else
  2689. {
  2690. while ((ch = string[stringPos++]))
  2691. {
  2692. setarg(paramPos, i++, ch);
  2693. }
  2694. }
  2695. stringPos--;
  2696. setarg(paramPos, i, '\0');
  2697. }
  2698. default:
  2699. {
  2700. continue;
  2701. }
  2702. }
  2703. while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
  2704. {
  2705. stringPos++;
  2706. }
  2707. while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
  2708. {
  2709. stringPos++;
  2710. }
  2711. paramPos++;
  2712. }
  2713. do
  2714. {
  2715. if ((delim = format[formatPos++]) > ' ')
  2716. {
  2717. if (delim == '\'')
  2718. {
  2719. while ((delim = format[formatPos++]) && delim != '\'') {}
  2720. }
  2721. else if (delim != 'z')
  2722. {
  2723. return delim;
  2724. }
  2725. }
  2726. }
  2727. while (delim > ' ');
  2728. return 0;
  2729. }
  2730.  
  2731. stock GetVehicleMaxDoor(vehicleid)
  2732. {
  2733. new a;
  2734. if(vehicleid < 400 || vehicleid > 611) return 0;
  2735.  
  2736. switch(vehicleid)
  2737. {
  2738. case 435,449,450,465,501,564,569,570,584,590,591,594,606,607,608,610,611: a=0;
  2739. case 406,425,430,431,432,441,446,448,452,453,454,464,472,473,476,481,484,485,486,493,509,510,512,513,519,520,530,531,532,537,538,539,548,553,568,571,572,574,577,583,592,595: a=1;
  2740. case 401..403,407,408,410..412,414,415,417,419,422,423,424,429,433,434,436,439,442,443,444,447,451,455,456,457,460,461,462,463,468,469,471,474,475,477,478,480,488,489,491,494,495,496,499,500,502,503,504,505,506,508,511,514,515,517,518,521,522,523,524,525,526,527,528,533,534,535,536,541,542,543,544,545,549,552,554,555,556,557,558,559,562,563,565,573,575,576,578,581,586,587,588,589,593,599,600,601,602,603,605: a=2;
  2741. case 483: a=3;
  2742. case 400,404,405,409,413,416,418,420,421,426,427,428,438,440,445,458,459,466,467,470,479,482,487,490,492,497,498,507,516,529,540,546,547,550,551,560,561,566,567,579,580,582,585,596,597,598,604,609: a=4;
  2743. case 437: a=5;
  2744. default: a=0;
  2745. }
  2746.  
  2747. return a;
  2748. }
  2749.  
  2750. stock PlayerName(playerid){
  2751. new name[MAX_PLAYER_NAME];
  2752. GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  2753. return name;
  2754. }
  2755. stock IsPlayerHouseOwner(playerid,houseid)
  2756. {
  2757. new cesta[50];
  2758. format(cesta,150,"Houses/House%d.txt",houseid);
  2759. if(strcmp(PlayerName(playerid),dini_Get(cesta,"Owner"), false) == 0) return true;
  2760. return false;
  2761. }
  2762.  
  2763. stock IsHouseForSale(houseid)
  2764. {
  2765. new cesta[50];
  2766. format(cesta,150,"Houses/House%d.txt",houseid);
  2767. if(strcmp("none",dini_Get(cesta,"Owner"), false) == 0) return true;
  2768. return false;
  2769. }
  2770.  
  2771. stock GetPlayerHouse(playerid){
  2772. for(new h=0;h<HouseCount+1;h++)
  2773. {
  2774. if(IsPlayerInRangeOfPoint(playerid,2,HouseInfo[h][p_X],HouseInfo[h][p_Y],HouseInfo[h][p_Z]))
  2775. {
  2776. return h;
  2777. }
  2778. }
  2779. return -1;
  2780. }
  2781.  
  2782. InitComponents(componentid)
  2783. {
  2784. new i;
  2785. for(i=0; i<20; i++)
  2786. {
  2787. if(spoiler[i][0]==componentid) { return 1; }
  2788. }
  2789. for(i=0; i<3; i++)
  2790. {
  2791. if(nitro[i][0]==componentid) { return 2; }
  2792. }
  2793. for(i=0; i<23; i++)
  2794. {
  2795. if(fbumper[i][0]==componentid) { return 3; }
  2796. }
  2797. for(i=0; i<22; i++)
  2798. {
  2799. if(rbumper[i][0]==componentid) { return 4; }
  2800. }
  2801. for(i=0; i<28; i++)
  2802. {
  2803. if(exhaust[i][0]==componentid) { return 5; }
  2804. }
  2805. for(i=0; i<2; i++)
  2806. {
  2807. if(bventr[i][0]==componentid) { return 6; }
  2808. }
  2809. for(i=0; i<2; i++)
  2810. {
  2811. if(bventl[i][0]==componentid) { return 7; }
  2812. }
  2813. for(i=0; i<4; i++)
  2814. {
  2815. if(bscoop[i][0]==componentid) { return 8; }
  2816. }
  2817. for(i=0; i<13; i++)
  2818. {
  2819. if(rscoop[i][0]==componentid) { return 9; }
  2820. }
  2821. for(i=0; i<21; i++)
  2822. {
  2823. if(lskirt[i][0]==componentid) { return 10; }
  2824. }
  2825. for(i=0; i<21; i++)
  2826. {
  2827. if(rskirt[i][0]==componentid) { return 11; }
  2828. }
  2829. if(hydraulics[0][0]==componentid) { return 12; }
  2830. if(base[0][0]==componentid) { return 13; }
  2831. for(i=0; i<2; i++)
  2832. {
  2833. if(rbbars[i][0]==componentid) { return 14; }
  2834. }
  2835. for(i=0; i<2; i++)
  2836. {
  2837. if(fbbars[i][0]==componentid) { return 15; }
  2838. }
  2839. for(i=0; i<17; i++)
  2840. {
  2841. if(wheels[i][0]==componentid) { return 16; }
  2842. }
  2843. for(i=0; i<2; i++)
  2844. {
  2845. if(lights[i][0]==componentid) { return 17; }
  2846. }
  2847. return 0;
  2848. }
  2849.  
  2850. stock TuneThisCar(i,vehicleid)
  2851. {
  2852. if(HouseInfo[i][Vmod][0]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][0]); }
  2853. if(HouseInfo[i][Vmod][1]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][1]); }
  2854. if(HouseInfo[i][Vmod][2]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][2]); }
  2855. if(HouseInfo[i][Vmod][3]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][3]); }
  2856. if(HouseInfo[i][Vmod][4]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][4]); }
  2857. if(HouseInfo[i][Vmod][5]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][5]); }
  2858. if(HouseInfo[i][Vmod][6]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][6]); }
  2859. if(HouseInfo[i][Vmod][7]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][7]); }
  2860. if(HouseInfo[i][Vmod][8]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][8]); }
  2861. if(HouseInfo[i][Vmod][9]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][9]); }
  2862. if(HouseInfo[i][Vmod][10]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][10]); }
  2863. if(HouseInfo[i][Vmod][11]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][11]); }
  2864. if(HouseInfo[i][Vmod][12]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][12]); }
  2865. if(HouseInfo[i][Vmod][13]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][13]); }
  2866. if(HouseInfo[i][Vmod][14]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][14]); }
  2867. if(HouseInfo[i][Vmod][15]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][15]); }
  2868. if(HouseInfo[i][Vmod][16]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][16]); }
  2869. if(HouseInfo[i][Paintjob]!=-1) { ChangeVehiclePaintjob(vehicleid,HouseInfo[i][Paintjob]); }
  2870. if(HouseInfo[i][Color1]!=0 || HouseInfo[i][Color2]!=0)
  2871. {
  2872. ChangeVehicleColor(vehicleid,HouseInfo[i][Color1],HouseInfo[i][Color2]);
  2873. }
  2874. return 1;
  2875. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement