Advertisement
Guest User

MobeitRu

a guest
Jan 4th, 2012
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 35.87 KB | None | 0 0
  1. //сделанно Merlin-ом. ICQ: 111113433\Skype: samvel1023 //
  2. #include <a_samp>
  3. #define COLOR_RED 0xEB1313FF
  4. #define RELEASED(%0) \
  5.     (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
  6. #define PRESSED(%0) \
  7.     (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  8. forward ab1(playerid);
  9. forward ab2(playerid);
  10. forward ab3(playerid);
  11. forward ab4(playerid);
  12. forward ab5(playerid);
  13. forward ab6(playerid);
  14. forward fly(playerid);
  15. forward sbar(playerid);
  16. forward speedo(playerid);
  17. new PlayerText3D:wh[MAX_PLAYERS],SpeedTimer[MAX_PLAYERS];
  18. new colour1, colour2,ab[MAX_PLAYERS];
  19. new timer1, timer2,timer3,timer4,timer5, timer6, timer7;
  20. new Text:MBand[MAX_PLAYERS],Text:MArHealth[MAX_PLAYERS],Text:MGM[MAX_PLAYERS],Text:MMoney[MAX_PLAYERS],Text:MWeapon[MAX_PLAYERS],Text:MFreeze[MAX_PLAYERS],Text:MAB[MAX_PLAYERS],Text:Msd[MAX_PLAYERS],Text:MCM[MAX_PLAYERS],Text:MFly[MAX_PLAYERS],Text:MCords[MAX_PLAYERS],Text:MFPS[MAX_PLAYERS],Text:speed[MAX_PLAYERS];
  21.  
  22. new Float:interPos[151][3]={
  23. {770.8033,-0.7033,1000.7267},
  24. {974.0177,-9.5937,1001.1484},
  25. {961.9308,-51.9071,1001.1172},
  26. {830.6016,5.9404,1004.1797},
  27. {1037.8276,0.3970,1001.2845},
  28. {1212.1489,-28.5388,1000.9531},
  29. {1290.4106,1.9512,1001.0201},
  30. {1412.1472,-2.2836,1000.9241},
  31. {1527.0468,-12.0236,1002.0971},
  32. {2547.1853,2824.2493,10.8203},
  33. {612.2191,-123.9028,997.9922},
  34. {512.9291,-11.6929,1001.5653},
  35. {418.4666,-80.4595,1001.8047},
  36. {386.5259,173.6381,1008.3828},
  37. {288.4723,170.0647,1007.1794},
  38. {206.4627,-137.7076,1003.0938},
  39. {-100.2674,-22.9376,1000.7188},
  40. {-201.2236,-43.2465,1002.2734},
  41. {-202.9381,-6.7006,1002.2734},
  42. {-17.9142,-173.4321,1003.5469},
  43. {454.9853,-107.2548,999.4376},
  44. {372.5565,-131.3607,1001.4922},
  45. {1378.0260,-190.5155,1000.6328},
  46. {315.2440,-140.8858,999.6016},
  47. {225.0306,-9.1838,1002.2180},
  48. {611.3536,-77.5574,997.9995},
  49. {246.0688,108.9703,1003.2188},
  50. {6.0856,-28.8966,1003.5494},
  51. {773.7318,-74.6957,1000.6542},
  52. {621.4528,-23.7289,1000.9219},
  53. {445.6003,-6.9823,1000.7344},
  54. {285.8361,-39.0166,1001.5156},
  55. {204.1174,-46.8047,1001.8047},
  56. {245.2307,304.7632,999.1484},
  57. {290.6230,309.0622,999.1484},
  58. {322.5014,303.6906,999.1484},
  59. {-2041.2334,178.3969,28.8465},
  60. {-1402.6613,106.3897,1032.2734},
  61. {-1403.0116,-250.4526,1043.5341},
  62. {1207.5087,3.6289,-1000.9219},
  63. {2016.1156,1017.1541,996.8750},
  64. {-741.8495,493.0036,1371.9766},
  65. {2447.8704,-1704.4509,1013.5078},
  66. {2527.0176,-1679.2076,1015.4986},
  67. {-1129.8909,1057.5424,1346.4141},
  68. {2496.0549,-1695.1749,1014.7422},
  69. {366.0248,-73.3478,1001.5078},
  70. {2233.9363,1711.8038,1011.6312},
  71. {269.6405,305.9512,999.1484},
  72. {414.2987,-18.8044,1001.8047},
  73. {1.1853,-3.2387,999.4284},
  74. {-30.9875,-89.6806,1003.5469},
  75. {161.4048,-94.2416,1001.8047},
  76. {-2638.8232,1407.3395,906.4609},
  77. {1267.8407,-776.9587,1091.9063},
  78. {2536.5322,-1294.8425,1044.1250},
  79. {2350.1597,-1181.0658,1027.9766},
  80. {-2158.6731,642.0900,1052.3750},
  81. {419.8936,2537.1155,10.0000},
  82. {256.9047,-41.6537,1002.0234},
  83. {204.1658,-165.7678,1000.5234},
  84. {1133.3500,-7.8462,1000.6797},
  85. {-1420.4277,1616.9221,1052.5313},
  86. {488.4389,-11.4271,1000.6797},
  87. {1727.2853,-1642.9451,20.2254},
  88. {-202.8420,-24.0325,1002.2734},
  89. {2233.6919,-1112.8107,1050.8828},
  90. {1211.2484,1049.0234,359.9410},
  91. {2319.1272,-1023.9562,1050.2109},
  92. {2261.0977,-1137.8833,1050.6328},
  93. {2267.5454,-1210.7793,1048.1165},
  94. {-944.2402,1886.1536,5.0051},
  95. {-24.6959,-130.3763,1003.5469},
  96. {2217.2810,-1150.5349,1025.7969},
  97. {1.5491,23.3183,1199.5938},
  98. {681.6216,-451.8933,-25.6172},
  99. {234.6087,1187.8195,1080.2578},
  100. {225.5707,1240.0643,1082.1406},
  101. {224.2880,1289.1907,1082.1406},
  102. {239.2819,1114.1991,1080.9922},
  103. {207.5219,-109.7448,1005.1328},
  104. {295.1391,1473.3719,1080.2578},
  105. {327.6742,1478.8611,1084.4375},
  106. {385.5207,1471.7783,1080.1875},
  107. {375.0593,1417.7213,1081.3281},
  108. {-1417.8927,932.4482,1041.5313},
  109. {446.3247,509.9662,1001.4195},
  110. {2306.3826,-15.2365,26.7496},
  111. {2331.8984,6.7816,26.5032},
  112. {663.0588,-573.6274,16.3359},
  113. {-227.5703,1401.5544,27.7656},
  114. {-688.1496,942.0826,13.6328},
  115. {-1916.1268,714.8617,46.5625},
  116. {818.7714,-1102.8689,25.7940},
  117. {255.2083,-59.6753,1.5703},
  118. {446.6260,1397.7380,1084.3047},
  119. {490.8576,1400.0381,1080.2645},
  120. {227.3922,1114.6572,1080.9985},
  121. {227.7559,1114.3844,1080.9922},
  122. {261.1165,1287.2197,1080.2578},
  123. {291.7626,-80.1306,1001.5156},
  124. {449.0172,-88.9894,999.5547},
  125. {-27.8440,-26.6737,1003.5573},
  126. {2135.2004,-2276.2815,20.6719},
  127. {306.1966,307.8190,1003.3047},
  128. {24.3769,1341.1829,1084.3750},
  129. {963.0586,2159.7563,1011.0303},
  130. {2548.4807,2823.7429,10.8203},
  131. {215.1515,1874.0579,13.1406},
  132. {221.6766,1142.4962,1082.6094},
  133. {2323.7063,-1147.6509,1050.7101},
  134. {344.9984,307.1824,999.1557},
  135. {411.9707,-51.9217,1001.8984},
  136. {-1421.5618,-663.8262,1059.5569},
  137. {773.8887,-47.7698,1000.5859},
  138. {246.6695,65.8039,1003.6406},
  139. {-1864.9434,55.7325,1055.5276},
  140. {-262.1759,1456.6158,1084.3672},
  141. {22.8610,1404.9165,1084.4297},
  142. {140.3679,1367.8837,1083.8621},
  143. {1494.8589,1306.4800,1093.2953},
  144. {-1813.2130,-58.0120,1058.9641},
  145. {-1401.0670,1265.3706,1039.8672},
  146. {234.2826,1065.2290,1084.2101},
  147. {-68.5145,1353.8485,1080.2109},
  148. {-2240.1028,136.9730,1035.4141},
  149. {297.1440,-109.8702,1001.5156},
  150. {316.5025,-167.6272,999.5938},
  151. {-285.2511,1471.1970,1084.3750},
  152. {-26.8339,-55.5846,1003.5469},
  153. {442.1295,-52.4782,999.7167},
  154. {2182.2017,1628.5848,1043.8723},
  155. {748.4623,1438.2378,1102.9531},
  156. {2807.3604,-1171.7048,1025.5703},
  157. {366.0002,-9.4338,1001.8516},
  158. {2216.1282,-1076.3052,1050.4844},
  159. {2268.5156,1647.7682,1084.2344},
  160. {2236.6997,-1078.9478,1049.0234},
  161. {-2031.1196,-115.8287,1035.1719},
  162. {2365.1089,-1133.0795,1050.8750},
  163. {1168.5120,1360.1145,10.9293},
  164. {315.4544,976.5972,1960.8511},
  165. {1893.0731,1017.8958,31.8828},
  166. {501.9578,-70.5648,998.7578},
  167. {-42.5267,1408.2300,1084.4297},
  168. {2283.3118,1139.3070,1050.8984},
  169. {84.9244,1324.2983,1083.8594},
  170. {260.7421,1238.2261,1084.2578},
  171. {-1658.1656,1215.0002,7.2500},
  172. {-1961.6281,    295.2378,35.4688},
  173. {2003.1178,1015.1948,33.0080}
  174. };
  175.  
  176. new interInt[151]={
  177. 0,3,3,3,3,3,18,1,9,0,3,3,3,3,3,3,3,3,17,17,5,5,17,7,5,
  178. 2,10,10,7,1,1,1,1,1,3,5,1,1,7,2,10,1,2,1,10,3,10,1,2,
  179. 2,2,18,18,2,2,2,5,1,10,14,14,12,14,17,18,16,5,6,9,10,10,17,
  180. 16,15,1,1,3,2,1,5,15,15,15,15,15,15,12,0,0,0,18,0,0,0,0,
  181. 2,2,5,5,4,4,4,4,0,4,10,1,0,0,4,12,6,12,4,6,6,14,4,5,5,3,
  182. 14,16,6,6,6,6,6,15,6,6,2,6,8,9,1,1,2,3,8,0,9,10,11,8,11,
  183. 9,9,0,0,11};
  184. public OnFilterScriptInit()
  185. {
  186.     print("\n--------------------------------------");
  187.     print(" Mobeit загружен!");
  188.     print("--------------------------------------\n");
  189.     return 1;
  190. }
  191.  
  192. public OnFilterScriptExit()
  193. {
  194.     return 1;
  195. }
  196. public OnPlayerConnect(playerid)
  197. {
  198.         //new Float:health,string[60],plname[MAX_PLAYER_NAME];
  199.         //GetPlayerHealth(playerid,health);
  200.         //GetPlayerName(playerid,plname,24);
  201.         //format(string, sizeof(string), "%s %.0f", plname, health);
  202.         MBand[playerid] = TextDrawCreate(314.000000, 434.000000, "|");
  203.         TextDrawAlignment(MBand[playerid], 2);
  204.         TextDrawBackgroundColor(MBand[playerid], 255);
  205.         TextDrawFont(MBand[playerid], 1);
  206.         TextDrawLetterSize(MBand[playerid], 0.000000, 1.399999);
  207.         TextDrawColor(MBand[playerid], 16711935);
  208.         TextDrawSetOutline(MBand[playerid], 0);
  209.         TextDrawSetProportional(MBand[playerid], 1);
  210.         TextDrawSetShadow(MBand[playerid], 1);
  211.         TextDrawUseBox(MBand[playerid], 1);
  212.         TextDrawBoxColor(MBand[playerid], 80);
  213.         TextDrawTextSize(MBand[playerid], 0.000000, 657.000000);
  214.  
  215.         MArHealth[playerid] = TextDrawCreate(3.000000, 431.000000, "Armor: 100   ~n~Health:100"); // Броня, здоровье
  216.         TextDrawBackgroundColor(MArHealth[playerid], 255);
  217.         TextDrawFont(MArHealth[playerid], 2);
  218.         TextDrawLetterSize(MArHealth[playerid], 0.289999, 0.850000);
  219.         TextDrawColor(MArHealth[playerid], -1);
  220.         TextDrawSetOutline(MArHealth[playerid], 1);
  221.         TextDrawSetProportional(MArHealth[playerid], 1);
  222.  
  223.         MGM[playerid] = TextDrawCreate(87.000000, 433.000000, "(Inv)"); // Годмод
  224.         TextDrawBackgroundColor(MGM[playerid], 255);
  225.         TextDrawFont(MGM[playerid], 2);
  226.         TextDrawLetterSize(MGM[playerid], 0.300000, 1.500000);
  227.         TextDrawColor(MGM[playerid], -1);
  228.         TextDrawSetOutline(MGM[playerid], 1);
  229.         TextDrawSetProportional(MGM[playerid], 1);
  230.  
  231.         MMoney[playerid] = TextDrawCreate(187.000000, 433.000000, "(Money)");
  232.         TextDrawBackgroundColor(MMoney[playerid], 255);
  233.         TextDrawFont(MMoney[playerid], 2);
  234.         TextDrawLetterSize(MMoney[playerid], 0.300000, 1.500000);
  235.         TextDrawColor(MMoney[playerid], -1);
  236.         TextDrawSetOutline(MMoney[playerid], 1);
  237.         TextDrawSetProportional(MMoney[playerid], 1);
  238.  
  239.         MWeapon[playerid] = TextDrawCreate(121.000000, 433.000000, "(Weapons)");
  240.         TextDrawBackgroundColor(MWeapon[playerid], 255);
  241.         TextDrawFont(MWeapon[playerid], 2);
  242.         TextDrawLetterSize(MWeapon[playerid], 0.300000, 1.500000);
  243.         TextDrawColor(MWeapon[playerid], -1);
  244.         TextDrawSetOutline(MWeapon[playerid], 1);
  245.         TextDrawSetProportional(MWeapon[playerid], 1);
  246.  
  247.         MFreeze[playerid] = TextDrawCreate(242.000000, 433.000000, "(Freeze)"); // в следующей версии
  248.         TextDrawBackgroundColor(MFreeze[playerid], 255);
  249.         TextDrawFont(MFreeze[playerid], 2);
  250.         TextDrawLetterSize(MFreeze[playerid], 0.300000, 1.500000);
  251.         TextDrawColor(MFreeze[playerid], -1);
  252.         TextDrawSetOutline(MFreeze[playerid], 1);
  253.         TextDrawSetProportional(MFreeze[playerid], 1);
  254.  
  255.         MAB[playerid] = TextDrawCreate(301.000000, 433.000000, "(Air_Brk)");
  256.         TextDrawBackgroundColor(MAB[playerid], 255);
  257.         TextDrawFont(MAB[playerid], 2);
  258.         TextDrawLetterSize(MAB[playerid], 0.300000, 1.500000);
  259.         TextDrawColor(MAB[playerid], -1);
  260.         TextDrawSetOutline(MAB[playerid], 1);
  261.         TextDrawSetProportional(MAB[playerid], 1);
  262.  
  263.         Msd[playerid] = TextDrawCreate(413.000000, 433.000000, "(S.D.)"); // супер урон
  264.         TextDrawBackgroundColor(Msd[playerid], 255);
  265.         TextDrawFont(Msd[playerid], 2);
  266.         TextDrawLetterSize(Msd[playerid], 0.300000, 1.500000);
  267.         TextDrawColor(Msd[playerid], -1);
  268.         TextDrawSetOutline(Msd[playerid], 1);
  269.         TextDrawSetProportional(Msd[playerid], 1);
  270.  
  271.         MCM[playerid] = TextDrawCreate(363.000000, 433.000000, "(C.M.)"); // тп по карте
  272.         TextDrawBackgroundColor(MCM[playerid], 255);
  273.         TextDrawFont(MCM[playerid], 2);
  274.         TextDrawLetterSize(MCM[playerid], 0.300000, 1.500000);
  275.         TextDrawColor(MCM[playerid], -1);
  276.         TextDrawSetOutline(MCM[playerid], 1);
  277.         TextDrawSetProportional(MCM[playerid], 1);
  278.  
  279.         MFly[playerid] = TextDrawCreate(449.000000, 433.000000, "(Fly)"); // =D летание в следующей версии
  280.         TextDrawBackgroundColor(MFly[playerid], 255);
  281.         TextDrawFont(MFly[playerid], 2);
  282.         TextDrawLetterSize(MFly[playerid], 0.300000, 1.500000);
  283.         TextDrawColor(MFly[playerid], -1);
  284.         TextDrawSetOutline(MFly[playerid], 1);
  285.         TextDrawSetProportional(MFly[playerid], 1);
  286.  
  287.         MCords[playerid] = TextDrawCreate(485.000000, 435.000000, "1000.00, 1000.00, 1000.00; int: 10"); // координаты и интерьер
  288.         TextDrawBackgroundColor(MCords[playerid], 255);
  289.         TextDrawFont(MCords[playerid], 2);
  290.         TextDrawLetterSize(MCords[playerid], 0.160000, 1.100000);
  291.         TextDrawColor(MCords[playerid], -1);
  292.         TextDrawSetOutline(MCords[playerid], 0);
  293.         TextDrawSetProportional(MCords[playerid], 1);
  294.         TextDrawSetShadow(MCords[playerid], 1);
  295.  
  296.         MFPS[playerid] = TextDrawCreate(606.000000, 434.000000, "(99)"); // фпс
  297.         TextDrawBackgroundColor(MFPS[playerid], 255);
  298.         TextDrawFont(MFPS[playerid], 1);
  299.         TextDrawLetterSize(MFPS[playerid], 0.500000, 1.000000);
  300.         TextDrawColor(MFPS[playerid], -1);
  301.         TextDrawSetOutline(MFPS[playerid], 0);
  302.         TextDrawSetProportional(MFPS[playerid], 1);
  303.         TextDrawSetShadow(MFPS[playerid], 1);
  304.  
  305.         speed[playerid] = TextDrawCreate(295.000000, 416.000000, "Speed: 100  Model: 100   VHealth: 100");
  306.         TextDrawBackgroundColor(speed[playerid], 255);
  307.         TextDrawFont(speed[playerid], 2);
  308.         TextDrawLetterSize(speed[playerid], 0.400000, 1.000000);
  309.         TextDrawColor(speed[playerid], -1);
  310.         TextDrawSetOutline(speed[playerid], 0);
  311.         TextDrawSetProportional(speed[playerid], 1);
  312.         TextDrawSetShadow(speed[playerid], 1);
  313.         return 1;
  314. }
  315.  
  316. public OnPlayerDisconnect(playerid, reason)
  317. {
  318. //  if(IsPlayerAdmin(playerid))
  319.     //{
  320.         TextDrawHideForPlayer(playerid, MCords[playerid]);// coordiates hide
  321.         TextDrawHideForPlayer(playerid, MBand[playerid]);// band hide
  322.         TextDrawHideForPlayer(playerid, MArHealth[playerid]);// health armour
  323.         TextDrawHideForPlayer(playerid, MFPS[playerid]);//fps hide
  324.         TextDrawHideForPlayer(playerid, MGM[playerid]); // gm hide
  325.         TextDrawHideForPlayer(playerid, MWeapon[playerid]); // weapon hide
  326.         TextDrawHideForPlayer(playerid, MMoney[playerid]); // money hide
  327.         TextDrawHideForPlayer(playerid, Msd[playerid]); // Msd[playerid] hide
  328.         TextDrawHideForPlayer(playerid, MCM[playerid]); // at hide
  329.         TextDrawHideForPlayer(playerid, MAB[playerid]); // allow teleport
  330.         TextDrawSetString(MWeapon[playerid],"(Weapon)");
  331.         TextDrawSetString(MMoney[playerid],"(Money)");
  332.         TextDrawSetString(Msd[playerid],"(S.D.)");
  333.         TextDrawSetString(MGM[playerid],"(INV)");
  334.         SetPlayerHealth(playerid,100);
  335.         SetPVarInt(playerid,"RepairVehicle",0);
  336.         SetPVarInt(playerid,"sd",0);
  337.         TextDrawSetString(MAB[playerid],"(Air_Brk)");
  338.         TextDrawSetString(MCM[playerid],"(C.M.)");
  339.         KillTimer(SpeedTimer[playerid]);
  340. //  }
  341.         return 1;
  342. }
  343.  
  344. public OnPlayerSpawn(playerid)
  345. {
  346.     return 1;
  347. }
  348.  
  349. public OnPlayerDeath(playerid, killerid, reason)
  350. {
  351.     if(IsPlayerAdmin(playerid))
  352.     {
  353.         KillTimer(timer1);
  354.         KillTimer(timer2);
  355.         KillTimer(timer3);
  356.         KillTimer(timer4);
  357.         KillTimer(timer5);
  358.         KillTimer(timer6);
  359.         KillTimer(timer7);
  360.     }
  361.     return 1;
  362. }
  363. public OnPlayerCommandText(playerid, cmdtext[])
  364. {
  365.     return 0;
  366. }
  367.  
  368. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  369. {
  370.     return 1;
  371. }
  372.  
  373. public OnPlayerExitVehicle(playerid, vehicleid)
  374. {
  375.     return 1;
  376. }
  377.  
  378. public OnPlayerStateChange(playerid, newstate, oldstate)
  379. {
  380.     if(IsPlayerAdmin(playerid))
  381.     {
  382.     if(newstate == PLAYER_STATE_DRIVER) return TextDrawShowForPlayer(playerid, speed[playerid]);
  383.     }
  384.     return 1;
  385. }
  386.  
  387. public OnPlayerEnterCheckpoint(playerid)
  388. {
  389.     return 1;
  390. }
  391.  
  392. public OnPlayerLeaveCheckpoint(playerid)
  393. {
  394.     return 1;
  395. }
  396.  
  397. public OnPlayerEnterRaceCheckpoint(playerid)
  398. {
  399.     return 1;
  400. }
  401.  
  402. public OnPlayerLeaveRaceCheckpoint(playerid)
  403. {
  404.     return 1;
  405. }
  406.  
  407. public OnRconCommand(cmd[])
  408. {
  409.     return 1;
  410. }
  411.  
  412. public OnPlayerRequestSpawn(playerid)
  413. {
  414.     return 1;
  415. }
  416.  
  417. public OnObjectMoved(objectid)
  418. {
  419.     return 1;
  420. }
  421.  
  422. public OnPlayerObjectMoved(playerid, objectid)
  423. {
  424.     return 1;
  425. }
  426.  
  427. public OnPlayerPickUpPickup(playerid, pickupid)
  428. {
  429.     return 1;
  430. }
  431.  
  432. public OnVehicleMod(playerid, vehicleid, componentid)
  433. {
  434.     return 1;
  435. }
  436.  
  437. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  438. {
  439.     return 1;
  440. }
  441.  
  442. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  443. {
  444.     return 1;
  445. }
  446.  
  447. public OnPlayerSelectedMenuRow(playerid, row)
  448. {
  449.     return 1;
  450. }
  451.  
  452. public OnPlayerExitedMenu(playerid)
  453. {
  454.     return 1;
  455. }
  456.  
  457. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  458. {
  459.     return 1;
  460. }
  461.  
  462. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  463. {
  464.     if(IsPlayerAdmin(playerid))
  465.     {
  466.         if(GetPVarInt(playerid,"bu")==1)
  467.         {
  468.             new str[30];
  469.             format(str,sizeof(str),"%d - newkeys, %d - oldkeys",newkeys,oldkeys);
  470.             SendClientMessage(playerid,-1,str);
  471.         }
  472.         if (PRESSED(KEY_FIRE) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)//speed
  473.         {
  474.                 new Float:vX, Float:vY, Float:vZ, Float:vA;
  475.                 GetVehicleZAngle(GetPlayerVehicleID(playerid), vA);
  476.                 GetVehicleVelocity(GetPlayerVehicleID(playerid),vX,vY, vZ);
  477.                 SetVehicleVelocity(GetPlayerVehicleID(playerid), vX+=0.60 * floatsin(-vA, degrees), vY+=0.60 * floatcos(-vA, degrees), vZ);
  478.         }
  479.         if (PRESSED(16384)) return ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"ММеню","Читы\r\nОружие\r\nМашины\r\nТелепорты\r\nПрочее\r\nИд_Кнопок\r\nМенюМашины","Ok", "Закрыть");
  480.         if (PRESSED(2) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)// jump in car
  481.         {
  482.                 new Float:vX, Float:vY, Float:vZ, Float:vA;
  483.                 GetVehicleZAngle(GetPlayerVehicleID(playerid), vA);
  484.                 GetVehicleVelocity(GetPlayerVehicleID(playerid),vX,vY, vZ);
  485.                 SetVehicleVelocity(GetPlayerVehicleID(playerid), vX+=0.15 * floatsin(-vA, degrees), vY+=0.15 * floatcos(-vA, degrees), 0.33);
  486.         }
  487.         if (PRESSED(65536)) return PutPlayerInVehicle(playerid, GetClosestVehicle(playerid),0);
  488.         if (PRESSED(131072) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  489.         {
  490.             new Float:cx,Float:cy,Float:cz,Float:zv;
  491.             GetVehiclePos(GetPlayerVehicleID(playerid),cx,cy,cz);
  492.             GetVehicleZAngle(GetPlayerVehicleID(playerid), zv);
  493.             SetVehiclePos(GetPlayerVehicleID(playerid),cx,cy,cz);
  494.             SetVehicleZAngle(GetPlayerVehicleID(playerid),zv);
  495.         }
  496.         /*if (PRESSED(32))// fly
  497.         {
  498.             ApplyAnimation( playerid, "SWIM", "Swim_Breast", 10.1, 1, 1, 1, 0, 0 );
  499.             SetTimer("fly",1000,true);
  500.         }*/
  501.         if (PRESSED(262144))// Air Breake
  502.         {
  503.             if(ab[playerid] ==1 )
  504.             {
  505.             //SetPVarInt(playerid,"ab",0);
  506.             ab[playerid] = 0;
  507.             TextDrawSetString(MAB[playerid],"(Air_Brk)");
  508.             TogglePlayerControllable(playerid, 1);
  509.             KillTimer(timer1);
  510.             KillTimer(timer2);
  511.             KillTimer(timer3);
  512.             KillTimer(timer4);
  513.             KillTimer(timer5);
  514.             KillTimer(timer6);
  515.             }
  516.             else
  517.             {
  518.             TogglePlayerControllable(playerid, 0);
  519.             //SetPVarInt(playerid,"ab",1);
  520.             ab[playerid] = 1;
  521.             TextDrawSetString(MAB[playerid],"(~g~Air_Brk~w~)");
  522.             }
  523.  
  524.         }
  525.         if(ab[playerid]==1)
  526.             {
  527.                     if(PRESSED(131072))
  528.                     {
  529.                     timer6 = SetTimer("ab6",10,true);
  530.                     //SetPlayerPos(playerid, x, y+0.3, z);
  531.                     }
  532.                     if(RELEASED(131072)) return KillTimer(timer6);
  533.                     if(PRESSED(2))
  534.                     {
  535.                     timer5 = SetTimer("ab5",10,true);
  536.                     //SetPlayerPos(playerid, x, y-0.3, z);
  537.                     }
  538.                     if(RELEASED(2)) return KillTimer(timer5);
  539.                     if(PRESSED(1024))
  540.                     {
  541.                     timer4 = SetTimer("ab4",10,true);
  542.                     //SetPlayerPos(playerid, x-0.3, y, z);
  543.                     }
  544.                     if(RELEASED(1024)) return KillTimer(timer4);
  545.                     if(PRESSED(8))
  546.                     {
  547.                     timer3 = SetTimer("ab3",10,true);
  548.                     //SetPlayerPos(playerid, x+0.3, y, z);
  549.                     }
  550.                     if(RELEASED(8)) return KillTimer(timer3);
  551.                     if(PRESSED(4))
  552.                     {
  553.                     timer2 = SetTimer("ab2",10,true);
  554.                     //SetPlayerPos(playerid, x, y, z-0.3);
  555.                     }
  556.                     if(RELEASED(4)) return KillTimer(timer2);
  557.                     if(PRESSED(32))
  558.                     {
  559.                     timer1 = SetTimer("ab1",10,true);
  560.                     //SetPlayerPos(playerid, x, y, z+0.3);
  561.                     }
  562.                     if(RELEASED(32)) return KillTimer(timer1);
  563.             }
  564.         /*if (PRESSED(8) && GetPVarInt(playerid,"ab")==1)
  565.         {
  566.             new
  567.                 Float:fPX, Float:fPY, Float:fPZ,
  568.                 Float:fVX, Float:fVY, Float:fVZ,
  569.                 Float:ax, Float:ay, Float:az;
  570.             const
  571.                 Float:fScale = 0.5;
  572.             GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
  573.             GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
  574.             GetPlayerPos(playerid,x,y,az);
  575.             ax = fPX - floatmul(fVX, fScale);
  576.             ay = fPY - floatmul(fVY, fScale);
  577.             SetPlayerPos(playerid,ax,ay,az);
  578.         }*/
  579.         if (PRESSED(512) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return RepairVehicle(GetPlayerVehicleID(playerid));// autorepair
  580.         if (PRESSED(1)) return TogglePlayerControllable(playerid, 1); // unfreeze
  581.         if(newkeys==8192)//GM
  582.         {
  583.             if(GetPVarInt(playerid,"RepairVehicle")==1)
  584.             {
  585.                 SetPlayerHealth(playerid,100);
  586.                 SetPVarInt(playerid,"RepairVehicle",0);
  587.                 TextDrawSetString(MGM[playerid],"(INV)");
  588.             }
  589.             else
  590.             {
  591.                 SetPVarInt(playerid,"RepairVehicle",1);
  592.                 SetPlayerHealth(playerid,100000);
  593.                 TextDrawSetString(MGM[playerid],"(~g~INV~w~)");
  594.             }
  595.         }
  596.     }
  597.     return 1;
  598. }
  599.  
  600. public OnRconLoginAttempt(ip[], password[], success)
  601. {
  602.     if(success)
  603.     {
  604.         new pip[16];
  605.         for(new i=0; i<MAX_PLAYERS; i++)
  606.         {
  607.             GetPlayerIp(i, pip, sizeof(pip));
  608.             if(!strcmp(ip, pip, true))
  609.             {
  610.             SpeedTimer[i] = SetTimerEx("speedo", 200, true, "e", i);
  611.             SetPVarInt(i,"cm",0); // click map
  612.             TextDrawShowForPlayer(i, MCords[i]); // coordiates
  613.             TextDrawShowForPlayer(i, MBand[i]);// band
  614.             TextDrawShowForPlayer(i, MArHealth[i]);// health armour
  615.             TextDrawShowForPlayer(i, MFPS[i]);// fps
  616.             TextDrawShowForPlayer(i, MGM[i]); // gm
  617.             TextDrawShowForPlayer(i, MWeapon[i]); // weapon
  618.             TextDrawShowForPlayer(i, MMoney[i]); // money
  619.             TextDrawShowForPlayer(i, MCM[i]); // allow teleport
  620.             TextDrawShowForPlayer(i, MAB[i]); // allow teleport
  621.             TextDrawShowForPlayer(i, Msd[i]); // Msd[i]
  622.             }
  623.         }
  624.     }
  625.     return 1;
  626. }
  627.  
  628. public OnPlayerUpdate(playerid)
  629. {
  630.     new cords[80],ha[120],MFFPS[20],Float:x,Float:y,Float:z,Float:ah[2],plname[MAX_PLAYER_NAME],string[256];
  631.     GetPlayerName(playerid,plname,24);
  632.     GetPlayerHealth(playerid,ah[1]);
  633.     format(string, sizeof(string), "%s %.0f", plname, ah[1]);
  634.     for(new i, j = GetMaxPlayers(); i != j; i++)
  635.     {
  636.         if(!IsPlayerConnected(i)) continue;
  637.         if(IsPlayerNPC(i)) continue;
  638.         if(!IsPlayerAdmin(i)) continue;
  639.         if(IsPlayerAdmin(playerid)) continue;
  640.         UpdatePlayer3DTextLabelText(i, wh[playerid], COLOR_RED, string);
  641.     }
  642.     if(IsPlayerAdmin(playerid))
  643.     {
  644.         GetPlayerPos(playerid,x,y,z); GetPlayerArmour(playerid,ah[0]);
  645.         format(ha,120,"Armor: %.0f   ~n~Health:~r~%.0f",ah[0],ah[1]);
  646.         format(cords,80,"%.2f, %.2f, %.2f; Int:%.d",x,y,z,GetPlayerInterior(playerid));
  647.         format(MFFPS,sizeof(MFFPS),"(%.d)",GetPlayerPing(playerid));
  648.         TextDrawSetString(MCords[playerid],cords);
  649.         TextDrawSetString(MArHealth[playerid],ha);
  650.         TextDrawSetString(MFPS[playerid],MFFPS);
  651.     }
  652.     return 1;
  653. }
  654.  
  655. public OnPlayerStreamIn(playerid, forplayerid)
  656. {
  657.     if(!IsPlayerAdmin(forplayerid)) return 1;
  658.     if(IsPlayerAdmin(playerid)) return 1;
  659.     if(IsPlayerNPC(playerid)) return 1;
  660.     wh[playerid] = CreatePlayer3DTextLabel(forplayerid, "text", COLOR_RED, 0.0, 0.0, 0.35, 200.0, playerid, INVALID_VEHICLE_ID, 0);
  661.     return 1;
  662. }
  663.  
  664. public OnPlayerStreamOut(playerid, forplayerid)
  665. {
  666.     if(IsPlayerNPC(playerid)) return 1;
  667.     if(!IsPlayerAdmin(forplayerid)) return 1;
  668.     if(IsPlayerAdmin(playerid)) return 1;
  669.     for(new i; i < 6; i++) DeletePlayer3DTextLabel(forplayerid, wh[playerid]);
  670.     return 1;
  671. }
  672.  
  673. public OnVehicleStreamIn(vehicleid, forplayerid)
  674. {
  675.     return 1;
  676. }
  677.  
  678. public OnVehicleStreamOut(vehicleid, forplayerid)
  679. {
  680.     return 1;
  681. }
  682.  
  683. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  684. {
  685.     if(IsPlayerAdmin(playerid))
  686.     {
  687.     /*new g_string[80];
  688.     if(GetPVarInt(playerid,"sd") == 1) return format(g_string,sizeof(g_string),"{4CBF3F}Включён{FFFFFF}");
  689.     else return format(g_string,sizeof(g_string),"{F0053F}Выключен{FFFFFF}");
  690.     new string[250];*/
  691.         if(dialogid==0 && response)
  692.         {
  693.             switch(listitem) // main menu
  694.             {
  695.                     case 0: ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Читы","Назад в меню\r\nВосстановить здоровье\r\nВосстановить броню\r\nПогода\r\nВремя","Ok", "Закрыть");
  696.                     case 1: ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "Оружие", "Введите id оружия.(1-46)", "Ввод", "Отмена");
  697.                     case 2: ShowPlayerDialog(playerid, 5, DIALOG_STYLE_INPUT, "Машины", "Введите id машины.", "Ввод", "Отмена");
  698.                     case 3: ShowPlayerDialog(playerid,6,DIALOG_STYLE_LIST,"Телепорты","Назад в меню\r\nИнтерьеры\r\nВажные точки","Ok", "Закрыть");
  699.                     case 4: ShowPlayerDialog(playerid,9,DIALOG_STYLE_LIST,"Прочее","Назад в меню\r\nСмерть\r\nСменить скин\r\nДеньги\r\nЦвет машины\r\nДжетПак\r\nОгромный урон|Вкл|Выкл|\r\nТелепорт по карте|Вкл|Выкл|","Ok","Закрыть");
  700.                     case 5:
  701.                     {
  702.                        if(GetPVarInt(playerid,"bu")==1) return SetPVarInt(playerid,"bu",0);
  703.                        SetPVarInt(playerid,"bu",1);
  704.                     }
  705.                     case 6: SendClientMessage(playerid,COLOR_RED,"Ждите следующей версии. ;D");
  706.             }
  707.         }
  708.         if(dialogid==1 && response)
  709.         {
  710.             switch(listitem) // cheats
  711.             {
  712.                     case 0: ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"ММеню","Читы\r\nОружие\r\nМашины\r\nТелепорты\r\nПрочее\r\nИд_Кнопок\r\nМенюМашины","Ok", "Закрыть");
  713.                     case 1: SetPlayerHealth(playerid,100);
  714.                     case 2: SetPlayerArmour(playerid,100);
  715.                     case 3: ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Погода","Назад к читам\r\nГолубое небо\r\nШторм\r\nТуман\r\nПесочная буря\r\nЧерно-белое небо\r\nОранжевое небо ;D\r\nДождик\r\nОчень темное\r\nКоричневое\r\nОчень яркое небо","Ok", "Закрыть");
  716.                     case 4: ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Время","Назад к читам\r\n00-00\r\n06-00\r\n12-00\r\n18-00","Ok", "Закрыть");
  717.             }
  718.         }
  719.         if(dialogid==2 && response) // weather
  720.         {
  721.             switch(listitem)
  722.             {
  723.                     case 0: ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Читы","Назад в меню\r\nВосстановить здоровье\r\nВосстановить броню\r\nПогода\r\nВремя","Ok", "Закрыть");
  724.                     case 1: SetPlayerWeather(playerid, 3);
  725.                     case 2: SetPlayerWeather(playerid, 8);
  726.                     case 3: SetPlayerWeather(playerid, 9);
  727.                     case 4: SetPlayerWeather(playerid, 19);
  728.                     case 5: SetPlayerWeather(playerid, 44);
  729.                     case 6: SetPlayerWeather(playerid, 38);
  730.                     case 7: SetPlayerWeather(playerid, 18);
  731.                     case 8: SetPlayerWeather(playerid, 21);
  732.                     case 9: SetPlayerWeather(playerid, 35);
  733.                     case 10: SetPlayerWeather(playerid, 39);
  734.             }
  735.         }
  736.         if(dialogid==3 && response) // Time
  737.         {
  738.             switch(listitem)
  739.             {
  740.                     case 0: ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"ММеню","Читы\r\nОружие\r\nМашины\r\nТелепорты\r\nПрочее\r\nИд_Кнопок\r\nМенюМашины","Ok", "Закрыть");
  741.                     case 1: SetPlayerTime(playerid,0,0);
  742.                     case 2: SetPlayerTime(playerid,6,0);
  743.                     case 3: SetPlayerTime(playerid,12,0);
  744.                     case 4: SetPlayerTime(playerid,18,0);
  745.             }
  746.         }
  747.         if(dialogid==4 && response) // weapon
  748.         {
  749.             new wp = strval(inputtext);
  750.             GivePlayerWeapon(playerid, wp, 9999);
  751.             TextDrawSetString(MWeapon[playerid],"(~g~Weapon~w~)");
  752.         }
  753.         if(dialogid==5 && response) // vehicle
  754.         {
  755.             new Float:x,Float:y,Float:z,car = strval(inputtext);
  756.             GetPlayerPos(playerid,x,y,z);
  757.             CreateVehicle(car,x+1.0,y+1.0,z,100.0, 0, 1, 60);
  758.         }
  759.         if(dialogid==6 && response) // tp
  760.         {
  761.             switch(listitem)
  762.             {
  763.                     case 0: ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"ММеню","Читы\r\nОружие\r\nМашины\r\nТелепорты\r\nПрочее\r\nИд_Кнопок\r\nМенюМашины","Ok", "Закрыть");
  764.                     case 1: ShowPlayerDialog(playerid,7,DIALOG_STYLE_INPUT,"Интерьеры","(0-150)","Ok", "Закрыть");
  765.                     case 2: ShowPlayerDialog(playerid,8,DIALOG_STYLE_LIST,"Важные точки","Назад в меню\r\nЛос-Сантос:\r\nSkyscraper\r\nTuning\r\nQuay\r\nPolice\r\nAmmunation\r\nAirport\r\nЛас-Вентурас:\r\nPolice\r\nSexshop\r\nKaligula\r\nCasino\r\nAmmunation\r\nAirport\r\nPirate\r\nPyramid\r\nСан-Фиеро:\r\nTuning\r\nMilitary\r\nAirport\r\nTopBridge\r\nBridge\r\nSkyscraper\r\nTopSkyscrapers\r\nQuays\r\nРазное:\r\nЧиллиад\r\nАэропорт\r\nВоенная база\r\nГора\r\nЗамок","Ok", "Закрыть");
  766.             }
  767.         }
  768.         if(dialogid==7 && response) // inteior
  769.         {
  770.             SetPlayerInterior(playerid,interInt[strval(inputtext)]);
  771.             SetPlayerPos(playerid,interPos[strval(inputtext)][0],interPos[strval(inputtext)][1],interPos[strval(inputtext)][2]);
  772.         }
  773.         if(dialogid==8 && response) // tp
  774.         {
  775.             switch(listitem)
  776.             {
  777.                     case 0: ShowPlayerDialog(playerid,6,DIALOG_STYLE_LIST,"Телепорты","Назад в меню\r\nИнтерьеры\r\nВажные точки","Ok", "Закрыть");
  778.                     case 1: SendClientMessage(playerid,-1,"Los-Santos_List");
  779.                     case 2: SetPos(playerid, 1546.4706,-1353.1392,329.4724);
  780.                     case 3: SetPos(playerid, 1043.5872,-1042.9121,31.7864);
  781.                     case 4: SetPos(playerid, 840.8961,-2058.4443,12.8672);
  782.                     case 5: SetPos(playerid, 1545.4237,-1675.3828,13.5603);
  783.                     case 6: SetPos(playerid, 1360.5272,-1282.8705,13.3771);
  784.                     case 7: SetPos(playerid, 1906.2207,-2429.4124,13.5391);
  785.                     case 8: SendClientMessage(playerid,-1,"Las-Venturas_List");
  786.                     case 9: SetPos(playerid, 2242.4707,2452.4792,10.8203);
  787.                     case 10: SetPos(playerid, 2089.9355,2076.5129,10.8203);
  788.                     case 11: SetPos(playerid, 2192.3721,1677.2687,12.3672);
  789.                     case 12: SetPos(playerid, 2023.6177,1006.8246,10.8203);
  790.                     case 13: SetPos(playerid, 2155.7151,943.7850,10.8203);
  791.                     case 14: SetPos(playerid, 1592.5265,1445.1265,10.8302);
  792.                     case 15: SetPos(playerid, 2002.7113,1542.9701,13.5859);
  793.                     case 16: SetPos(playerid, 2323.0342,1283.6992,96.7743);
  794.                     case 17: SendClientMessage(playerid,-1,"San-Fiero_List");
  795.                     case 18: SetPos(playerid, -2704.7307,218.5696,4.1797);
  796.                     case 19: SetPos(playerid, -1429.2852,502.9500,18.2294);
  797.                     case 20: SetPos(playerid, -1417.7987,-591.8294,14.1484);
  798.                     case 21: SetPos(playerid, -1520.3173,676.5159,139.2734);
  799.                     case 22: SetPos(playerid, -1319.8330,899.6963,46.3729);
  800.                     case 23: SetPos(playerid, -1803.9529,576.1880,234.8906);
  801.                     case 24: SetPos(playerid, -1753.8151,885.5803,295.8750);
  802.                     case 25: SetPos(playerid, -1629.5845,1427.2319,7.1745);
  803.                     case 26: SendClientMessage(playerid,-1,"Other_List_List");
  804.                     case 27: SetPos(playerid, -2334.8123,-1633.4257,483.7031);
  805.                     case 28: SetPos(playerid, 400.5048,2502.1021,16.4844);
  806.                     case 29: SetPos(playerid, -1366.8934,1488.1726,11.0391);
  807.                     case 30: SetPos(playerid, -2871.6252,2714.4536,275.7968);
  808.                     case 31: SetPos(playerid, -2464.0979,2334.0642,4.8359);
  809.             }
  810.         }
  811.         if(dialogid==9 && response) // tp
  812.         {
  813.             switch(listitem)
  814.             {
  815.                 case 0: ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"ММеню","Читы\r\nОружие\r\nМашины\r\nТелепорты\r\nПрочее\r\nИд_Кнопок\r\nМенюМашины","Ok", "Закрыть");
  816.                 case 1: SetPlayerHealth(playerid,0);
  817.                 case 2: ShowPlayerDialog(playerid,10,DIALOG_STYLE_INPUT,"Скины","Введите id скина","Ok", "Закрыть");
  818.                 case 3: ShowPlayerDialog(playerid,11,DIALOG_STYLE_INPUT,"Деньги","Введите колличество денег","Ok", "Закрыть");
  819.                 case 4: ShowPlayerDialog(playerid,12,DIALOG_STYLE_INPUT,"Цвет","Введите первый id цвета автомобиля","Ok", "Закрыть");
  820.                 case 5: SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
  821.                 case 6:
  822.                 {
  823.                     if(GetPVarInt(playerid,"sd")==1)
  824.                     {
  825.                         TextDrawSetString(Msd[playerid],"(S.D.)");
  826.                         SetPVarInt(playerid,"sd",0);
  827.                     }
  828.                     else
  829.                     {
  830.                         SetPVarInt(playerid,"sd",1);
  831.                         TextDrawSetString(Msd[playerid],"(~g~S.D.~w~)");
  832.                     }
  833.                 }
  834.                 case 7:
  835.                 {
  836.                     if(GetPVarInt(playerid,"cm")==1)
  837.                     {
  838.                         TextDrawSetString(MCM[playerid],"(C.M.)");
  839.                         SetPVarInt(playerid,"cm",0);
  840.                     }
  841.                     else
  842.                     {
  843.                         SetPVarInt(playerid,"cm",1);
  844.                         TextDrawSetString(MCM[playerid],"(~g~C.M.~w~)");
  845.                     }
  846.                 }
  847.             }
  848.         }
  849.         if(dialogid==10 && response) return SetPlayerSkin(playerid,strval(inputtext));
  850.         if(dialogid==11 && response)
  851.         {
  852.             TextDrawSetString(MMoney[playerid],"(~g~Money~w~)");
  853.             GivePlayerMoney(playerid,strval(inputtext));
  854.         }
  855.         if(dialogid==12 && response)
  856.         {
  857.             colour1 = strval(inputtext);
  858.             ShowPlayerDialog(playerid,13,DIALOG_STYLE_INPUT,"Цвет","Введите второй id цвета автомобиля","Ok", "Закрыть");
  859.         }
  860.         if(dialogid==13 && response)
  861.         {
  862.             colour2 = strval(inputtext);
  863.             ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour2);
  864.         }
  865.     }
  866.     return 1;
  867. }
  868. public OnVehicleDamageStatusUpdate(vehicleid,playerid)
  869. {
  870.     if(IsPlayerAdmin(playerid))
  871.     {
  872.         if(GetPVarInt(playerid,"RepairVehicle") == 1) return RepairVehicle(GetPlayerVehicleID(playerid));
  873.     }
  874.     return 1;
  875. }
  876. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  877. {
  878.     if(IsPlayerAdmin(playerid))
  879.     {
  880.         if(issuerid != INVALID_PLAYER_ID)
  881.         {
  882.             if(GetPVarInt(issuerid,"sd")==1) return SetPlayerHealth(playerid,0);
  883.         }
  884.     }
  885.     return 1;
  886. }
  887. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  888. {
  889. if(GetPVarInt(playerid,"cm")==1) return SetPos(playerid, fX, fY, fZ);
  890. return 1;
  891. }
  892. /*public fly(playerid)
  893. {
  894.         new
  895.             Float:x,Float:y,Float:z,
  896.             Float:fPX, Float:fPY, Float:fPZ,
  897.             Float:fVX, Float:fVY, Float:fVZ,
  898.             Float:ox,Float:oy,Float:oz,
  899.             Float:object_x, Float:object_y, Float:object_z;
  900.         const
  901.             Float:fScale = 1.5;
  902.         GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
  903.         GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
  904.         GetPlayerPos(playerid,x,y,z);
  905.         object_x = fPX + floatmul(fVX, fScale);
  906.         object_y = fPY + floatmul(fVY, fScale);
  907.         object_z = fPZ + floatmul(fVZ, fScale);
  908.         ox = object_x - x;
  909.         oy = object_y - y;
  910.         oz = object_z - z;
  911.         SetPlayerVelocity(playerid,ox,oy,oz);
  912. }*/
  913. public ab1(playerid)
  914. {
  915. new Float:x,Float:y,Float:z;
  916. GetPlayerPos(playerid,x,y,z);
  917. SetPos(playerid, x, y, z+0.3);
  918. }
  919. public ab2(playerid)
  920. {
  921. new Float:x,Float:y,Float:z;
  922. GetPlayerPos(playerid,x,y,z);
  923. SetPos(playerid, x, y, z-0.3);
  924. }
  925. public ab3(playerid)
  926. {
  927. new Float:x,Float:y,Float:z;
  928. GetPlayerPos(playerid,x,y,z);
  929. SetPos(playerid, x+0.3, y, z);
  930. }
  931. public ab4(playerid)
  932. {
  933. new Float:x,Float:y,Float:z;
  934. GetPlayerPos(playerid,x,y,z);
  935. SetPos(playerid, x-0.3, y, z);
  936. }
  937. public ab5(playerid)
  938. {
  939. new Float:x,Float:y,Float:z;
  940. GetPlayerPos(playerid,x,y,z);
  941. SetPos(playerid, x, y-0.3, z);
  942. }
  943. public ab6(playerid)
  944. {
  945. new Float:x,Float:y,Float:z;
  946. GetPlayerPos(playerid,x,y,z);
  947. SetPos(playerid, x, y+0.3, z);
  948. }
  949. public speedo(playerid)
  950. {
  951.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  952.     {
  953.         new Float: vPos[3],Float:Speed,Float:health,string[80];
  954.         new mod = GetVehicleModel(GetPlayerVehicleID(playerid));
  955.         GetVehicleHealth(GetPlayerVehicleID(playerid),health);
  956.         GetVehicleVelocity(GetPlayerVehicleID(playerid), vPos[0], vPos[1], vPos[2]);
  957.         Speed = floatmul(floatsqroot(floatadd(floatpower(vPos[0], 2), floatadd(floatpower(vPos[1], 2), floatpower(vPos[2], 2)))), 100);
  958.         format(string, sizeof(string), "Speed: %0.0f km/h Model: %d VHealth: %.0f", Speed,mod,health/10), TextDrawSetString(speed[playerid], string), TextDrawShowForPlayer(playerid, speed[playerid]);
  959.     }
  960.     else return TextDrawHideForPlayer(playerid,speed[playerid]);
  961.     return 1;
  962. }
  963. stock GetClosestVehicle(playerid)
  964. {
  965.     new Float:DefaultDistance = 3000.0;
  966.     new Float:Distance,VehID;
  967.     new Float:X,Float:Y,Float:Z;
  968.     for(new d=1; d < MAX_VEHICLES; d++)
  969.     {
  970.         if(GetVehicleModel(d))
  971.         {
  972.             GetPlayerPos(playerid,X,Y,Z);
  973.             Distance = GetVehicleDistanceFromPoint(d,X,Y,Z);
  974.             if(Distance < DefaultDistance)
  975.             {
  976.                 VehID = d;
  977.                 DefaultDistance = Distance;
  978.             }
  979.         }
  980.     }
  981.     return VehID;
  982. }
  983. stock SetPos(playerid,Float:x,Float:y,Float:z)
  984. {
  985.     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  986.         SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
  987.     else
  988.         SetPlayerPos(playerid,x,y,z);
  989.     return 1;
  990. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement