Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //сделанно Merlin-ом. ICQ: 111113433\Skype: samvel1023 //
- #include <a_samp>
- #define COLOR_RED 0xEB1313FF
- #define RELEASED(%0) \
- (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- forward ab1(playerid);
- forward ab2(playerid);
- forward ab3(playerid);
- forward ab4(playerid);
- forward ab5(playerid);
- forward ab6(playerid);
- forward fly(playerid);
- forward sbar(playerid);
- forward speedo(playerid);
- new PlayerText3D:wh[MAX_PLAYERS],SpeedTimer[MAX_PLAYERS];
- new colour1, colour2,ab[MAX_PLAYERS];
- new timer1, timer2,timer3,timer4,timer5, timer6, timer7;
- 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];
- new Float:interPos[151][3]={
- {770.8033,-0.7033,1000.7267},
- {974.0177,-9.5937,1001.1484},
- {961.9308,-51.9071,1001.1172},
- {830.6016,5.9404,1004.1797},
- {1037.8276,0.3970,1001.2845},
- {1212.1489,-28.5388,1000.9531},
- {1290.4106,1.9512,1001.0201},
- {1412.1472,-2.2836,1000.9241},
- {1527.0468,-12.0236,1002.0971},
- {2547.1853,2824.2493,10.8203},
- {612.2191,-123.9028,997.9922},
- {512.9291,-11.6929,1001.5653},
- {418.4666,-80.4595,1001.8047},
- {386.5259,173.6381,1008.3828},
- {288.4723,170.0647,1007.1794},
- {206.4627,-137.7076,1003.0938},
- {-100.2674,-22.9376,1000.7188},
- {-201.2236,-43.2465,1002.2734},
- {-202.9381,-6.7006,1002.2734},
- {-17.9142,-173.4321,1003.5469},
- {454.9853,-107.2548,999.4376},
- {372.5565,-131.3607,1001.4922},
- {1378.0260,-190.5155,1000.6328},
- {315.2440,-140.8858,999.6016},
- {225.0306,-9.1838,1002.2180},
- {611.3536,-77.5574,997.9995},
- {246.0688,108.9703,1003.2188},
- {6.0856,-28.8966,1003.5494},
- {773.7318,-74.6957,1000.6542},
- {621.4528,-23.7289,1000.9219},
- {445.6003,-6.9823,1000.7344},
- {285.8361,-39.0166,1001.5156},
- {204.1174,-46.8047,1001.8047},
- {245.2307,304.7632,999.1484},
- {290.6230,309.0622,999.1484},
- {322.5014,303.6906,999.1484},
- {-2041.2334,178.3969,28.8465},
- {-1402.6613,106.3897,1032.2734},
- {-1403.0116,-250.4526,1043.5341},
- {1207.5087,3.6289,-1000.9219},
- {2016.1156,1017.1541,996.8750},
- {-741.8495,493.0036,1371.9766},
- {2447.8704,-1704.4509,1013.5078},
- {2527.0176,-1679.2076,1015.4986},
- {-1129.8909,1057.5424,1346.4141},
- {2496.0549,-1695.1749,1014.7422},
- {366.0248,-73.3478,1001.5078},
- {2233.9363,1711.8038,1011.6312},
- {269.6405,305.9512,999.1484},
- {414.2987,-18.8044,1001.8047},
- {1.1853,-3.2387,999.4284},
- {-30.9875,-89.6806,1003.5469},
- {161.4048,-94.2416,1001.8047},
- {-2638.8232,1407.3395,906.4609},
- {1267.8407,-776.9587,1091.9063},
- {2536.5322,-1294.8425,1044.1250},
- {2350.1597,-1181.0658,1027.9766},
- {-2158.6731,642.0900,1052.3750},
- {419.8936,2537.1155,10.0000},
- {256.9047,-41.6537,1002.0234},
- {204.1658,-165.7678,1000.5234},
- {1133.3500,-7.8462,1000.6797},
- {-1420.4277,1616.9221,1052.5313},
- {488.4389,-11.4271,1000.6797},
- {1727.2853,-1642.9451,20.2254},
- {-202.8420,-24.0325,1002.2734},
- {2233.6919,-1112.8107,1050.8828},
- {1211.2484,1049.0234,359.9410},
- {2319.1272,-1023.9562,1050.2109},
- {2261.0977,-1137.8833,1050.6328},
- {2267.5454,-1210.7793,1048.1165},
- {-944.2402,1886.1536,5.0051},
- {-24.6959,-130.3763,1003.5469},
- {2217.2810,-1150.5349,1025.7969},
- {1.5491,23.3183,1199.5938},
- {681.6216,-451.8933,-25.6172},
- {234.6087,1187.8195,1080.2578},
- {225.5707,1240.0643,1082.1406},
- {224.2880,1289.1907,1082.1406},
- {239.2819,1114.1991,1080.9922},
- {207.5219,-109.7448,1005.1328},
- {295.1391,1473.3719,1080.2578},
- {327.6742,1478.8611,1084.4375},
- {385.5207,1471.7783,1080.1875},
- {375.0593,1417.7213,1081.3281},
- {-1417.8927,932.4482,1041.5313},
- {446.3247,509.9662,1001.4195},
- {2306.3826,-15.2365,26.7496},
- {2331.8984,6.7816,26.5032},
- {663.0588,-573.6274,16.3359},
- {-227.5703,1401.5544,27.7656},
- {-688.1496,942.0826,13.6328},
- {-1916.1268,714.8617,46.5625},
- {818.7714,-1102.8689,25.7940},
- {255.2083,-59.6753,1.5703},
- {446.6260,1397.7380,1084.3047},
- {490.8576,1400.0381,1080.2645},
- {227.3922,1114.6572,1080.9985},
- {227.7559,1114.3844,1080.9922},
- {261.1165,1287.2197,1080.2578},
- {291.7626,-80.1306,1001.5156},
- {449.0172,-88.9894,999.5547},
- {-27.8440,-26.6737,1003.5573},
- {2135.2004,-2276.2815,20.6719},
- {306.1966,307.8190,1003.3047},
- {24.3769,1341.1829,1084.3750},
- {963.0586,2159.7563,1011.0303},
- {2548.4807,2823.7429,10.8203},
- {215.1515,1874.0579,13.1406},
- {221.6766,1142.4962,1082.6094},
- {2323.7063,-1147.6509,1050.7101},
- {344.9984,307.1824,999.1557},
- {411.9707,-51.9217,1001.8984},
- {-1421.5618,-663.8262,1059.5569},
- {773.8887,-47.7698,1000.5859},
- {246.6695,65.8039,1003.6406},
- {-1864.9434,55.7325,1055.5276},
- {-262.1759,1456.6158,1084.3672},
- {22.8610,1404.9165,1084.4297},
- {140.3679,1367.8837,1083.8621},
- {1494.8589,1306.4800,1093.2953},
- {-1813.2130,-58.0120,1058.9641},
- {-1401.0670,1265.3706,1039.8672},
- {234.2826,1065.2290,1084.2101},
- {-68.5145,1353.8485,1080.2109},
- {-2240.1028,136.9730,1035.4141},
- {297.1440,-109.8702,1001.5156},
- {316.5025,-167.6272,999.5938},
- {-285.2511,1471.1970,1084.3750},
- {-26.8339,-55.5846,1003.5469},
- {442.1295,-52.4782,999.7167},
- {2182.2017,1628.5848,1043.8723},
- {748.4623,1438.2378,1102.9531},
- {2807.3604,-1171.7048,1025.5703},
- {366.0002,-9.4338,1001.8516},
- {2216.1282,-1076.3052,1050.4844},
- {2268.5156,1647.7682,1084.2344},
- {2236.6997,-1078.9478,1049.0234},
- {-2031.1196,-115.8287,1035.1719},
- {2365.1089,-1133.0795,1050.8750},
- {1168.5120,1360.1145,10.9293},
- {315.4544,976.5972,1960.8511},
- {1893.0731,1017.8958,31.8828},
- {501.9578,-70.5648,998.7578},
- {-42.5267,1408.2300,1084.4297},
- {2283.3118,1139.3070,1050.8984},
- {84.9244,1324.2983,1083.8594},
- {260.7421,1238.2261,1084.2578},
- {-1658.1656,1215.0002,7.2500},
- {-1961.6281, 295.2378,35.4688},
- {2003.1178,1015.1948,33.0080}
- };
- new interInt[151]={
- 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,
- 2,10,10,7,1,1,1,1,1,3,5,1,1,7,2,10,1,2,1,10,3,10,1,2,
- 2,2,18,18,2,2,2,5,1,10,14,14,12,14,17,18,16,5,6,9,10,10,17,
- 16,15,1,1,3,2,1,5,15,15,15,15,15,15,12,0,0,0,18,0,0,0,0,
- 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,
- 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,
- 9,9,0,0,11};
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Mobeit загружен!");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- //new Float:health,string[60],plname[MAX_PLAYER_NAME];
- //GetPlayerHealth(playerid,health);
- //GetPlayerName(playerid,plname,24);
- //format(string, sizeof(string), "%s %.0f", plname, health);
- MBand[playerid] = TextDrawCreate(314.000000, 434.000000, "|");
- TextDrawAlignment(MBand[playerid], 2);
- TextDrawBackgroundColor(MBand[playerid], 255);
- TextDrawFont(MBand[playerid], 1);
- TextDrawLetterSize(MBand[playerid], 0.000000, 1.399999);
- TextDrawColor(MBand[playerid], 16711935);
- TextDrawSetOutline(MBand[playerid], 0);
- TextDrawSetProportional(MBand[playerid], 1);
- TextDrawSetShadow(MBand[playerid], 1);
- TextDrawUseBox(MBand[playerid], 1);
- TextDrawBoxColor(MBand[playerid], 80);
- TextDrawTextSize(MBand[playerid], 0.000000, 657.000000);
- MArHealth[playerid] = TextDrawCreate(3.000000, 431.000000, "Armor: 100 ~n~Health:100"); // Броня, здоровье
- TextDrawBackgroundColor(MArHealth[playerid], 255);
- TextDrawFont(MArHealth[playerid], 2);
- TextDrawLetterSize(MArHealth[playerid], 0.289999, 0.850000);
- TextDrawColor(MArHealth[playerid], -1);
- TextDrawSetOutline(MArHealth[playerid], 1);
- TextDrawSetProportional(MArHealth[playerid], 1);
- MGM[playerid] = TextDrawCreate(87.000000, 433.000000, "(Inv)"); // Годмод
- TextDrawBackgroundColor(MGM[playerid], 255);
- TextDrawFont(MGM[playerid], 2);
- TextDrawLetterSize(MGM[playerid], 0.300000, 1.500000);
- TextDrawColor(MGM[playerid], -1);
- TextDrawSetOutline(MGM[playerid], 1);
- TextDrawSetProportional(MGM[playerid], 1);
- MMoney[playerid] = TextDrawCreate(187.000000, 433.000000, "(Money)");
- TextDrawBackgroundColor(MMoney[playerid], 255);
- TextDrawFont(MMoney[playerid], 2);
- TextDrawLetterSize(MMoney[playerid], 0.300000, 1.500000);
- TextDrawColor(MMoney[playerid], -1);
- TextDrawSetOutline(MMoney[playerid], 1);
- TextDrawSetProportional(MMoney[playerid], 1);
- MWeapon[playerid] = TextDrawCreate(121.000000, 433.000000, "(Weapons)");
- TextDrawBackgroundColor(MWeapon[playerid], 255);
- TextDrawFont(MWeapon[playerid], 2);
- TextDrawLetterSize(MWeapon[playerid], 0.300000, 1.500000);
- TextDrawColor(MWeapon[playerid], -1);
- TextDrawSetOutline(MWeapon[playerid], 1);
- TextDrawSetProportional(MWeapon[playerid], 1);
- MFreeze[playerid] = TextDrawCreate(242.000000, 433.000000, "(Freeze)"); // в следующей версии
- TextDrawBackgroundColor(MFreeze[playerid], 255);
- TextDrawFont(MFreeze[playerid], 2);
- TextDrawLetterSize(MFreeze[playerid], 0.300000, 1.500000);
- TextDrawColor(MFreeze[playerid], -1);
- TextDrawSetOutline(MFreeze[playerid], 1);
- TextDrawSetProportional(MFreeze[playerid], 1);
- MAB[playerid] = TextDrawCreate(301.000000, 433.000000, "(Air_Brk)");
- TextDrawBackgroundColor(MAB[playerid], 255);
- TextDrawFont(MAB[playerid], 2);
- TextDrawLetterSize(MAB[playerid], 0.300000, 1.500000);
- TextDrawColor(MAB[playerid], -1);
- TextDrawSetOutline(MAB[playerid], 1);
- TextDrawSetProportional(MAB[playerid], 1);
- Msd[playerid] = TextDrawCreate(413.000000, 433.000000, "(S.D.)"); // супер урон
- TextDrawBackgroundColor(Msd[playerid], 255);
- TextDrawFont(Msd[playerid], 2);
- TextDrawLetterSize(Msd[playerid], 0.300000, 1.500000);
- TextDrawColor(Msd[playerid], -1);
- TextDrawSetOutline(Msd[playerid], 1);
- TextDrawSetProportional(Msd[playerid], 1);
- MCM[playerid] = TextDrawCreate(363.000000, 433.000000, "(C.M.)"); // тп по карте
- TextDrawBackgroundColor(MCM[playerid], 255);
- TextDrawFont(MCM[playerid], 2);
- TextDrawLetterSize(MCM[playerid], 0.300000, 1.500000);
- TextDrawColor(MCM[playerid], -1);
- TextDrawSetOutline(MCM[playerid], 1);
- TextDrawSetProportional(MCM[playerid], 1);
- MFly[playerid] = TextDrawCreate(449.000000, 433.000000, "(Fly)"); // =D летание в следующей версии
- TextDrawBackgroundColor(MFly[playerid], 255);
- TextDrawFont(MFly[playerid], 2);
- TextDrawLetterSize(MFly[playerid], 0.300000, 1.500000);
- TextDrawColor(MFly[playerid], -1);
- TextDrawSetOutline(MFly[playerid], 1);
- TextDrawSetProportional(MFly[playerid], 1);
- MCords[playerid] = TextDrawCreate(485.000000, 435.000000, "1000.00, 1000.00, 1000.00; int: 10"); // координаты и интерьер
- TextDrawBackgroundColor(MCords[playerid], 255);
- TextDrawFont(MCords[playerid], 2);
- TextDrawLetterSize(MCords[playerid], 0.160000, 1.100000);
- TextDrawColor(MCords[playerid], -1);
- TextDrawSetOutline(MCords[playerid], 0);
- TextDrawSetProportional(MCords[playerid], 1);
- TextDrawSetShadow(MCords[playerid], 1);
- MFPS[playerid] = TextDrawCreate(606.000000, 434.000000, "(99)"); // фпс
- TextDrawBackgroundColor(MFPS[playerid], 255);
- TextDrawFont(MFPS[playerid], 1);
- TextDrawLetterSize(MFPS[playerid], 0.500000, 1.000000);
- TextDrawColor(MFPS[playerid], -1);
- TextDrawSetOutline(MFPS[playerid], 0);
- TextDrawSetProportional(MFPS[playerid], 1);
- TextDrawSetShadow(MFPS[playerid], 1);
- speed[playerid] = TextDrawCreate(295.000000, 416.000000, "Speed: 100 Model: 100 VHealth: 100");
- TextDrawBackgroundColor(speed[playerid], 255);
- TextDrawFont(speed[playerid], 2);
- TextDrawLetterSize(speed[playerid], 0.400000, 1.000000);
- TextDrawColor(speed[playerid], -1);
- TextDrawSetOutline(speed[playerid], 0);
- TextDrawSetProportional(speed[playerid], 1);
- TextDrawSetShadow(speed[playerid], 1);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- // if(IsPlayerAdmin(playerid))
- //{
- TextDrawHideForPlayer(playerid, MCords[playerid]);// coordiates hide
- TextDrawHideForPlayer(playerid, MBand[playerid]);// band hide
- TextDrawHideForPlayer(playerid, MArHealth[playerid]);// health armour
- TextDrawHideForPlayer(playerid, MFPS[playerid]);//fps hide
- TextDrawHideForPlayer(playerid, MGM[playerid]); // gm hide
- TextDrawHideForPlayer(playerid, MWeapon[playerid]); // weapon hide
- TextDrawHideForPlayer(playerid, MMoney[playerid]); // money hide
- TextDrawHideForPlayer(playerid, Msd[playerid]); // Msd[playerid] hide
- TextDrawHideForPlayer(playerid, MCM[playerid]); // at hide
- TextDrawHideForPlayer(playerid, MAB[playerid]); // allow teleport
- TextDrawSetString(MWeapon[playerid],"(Weapon)");
- TextDrawSetString(MMoney[playerid],"(Money)");
- TextDrawSetString(Msd[playerid],"(S.D.)");
- TextDrawSetString(MGM[playerid],"(INV)");
- SetPlayerHealth(playerid,100);
- SetPVarInt(playerid,"RepairVehicle",0);
- SetPVarInt(playerid,"sd",0);
- TextDrawSetString(MAB[playerid],"(Air_Brk)");
- TextDrawSetString(MCM[playerid],"(C.M.)");
- KillTimer(SpeedTimer[playerid]);
- // }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(IsPlayerAdmin(playerid))
- {
- KillTimer(timer1);
- KillTimer(timer2);
- KillTimer(timer3);
- KillTimer(timer4);
- KillTimer(timer5);
- KillTimer(timer6);
- KillTimer(timer7);
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(newstate == PLAYER_STATE_DRIVER) return TextDrawShowForPlayer(playerid, speed[playerid]);
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(GetPVarInt(playerid,"bu")==1)
- {
- new str[30];
- format(str,sizeof(str),"%d - newkeys, %d - oldkeys",newkeys,oldkeys);
- SendClientMessage(playerid,-1,str);
- }
- if (PRESSED(KEY_FIRE) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)//speed
- {
- new Float:vX, Float:vY, Float:vZ, Float:vA;
- GetVehicleZAngle(GetPlayerVehicleID(playerid), vA);
- GetVehicleVelocity(GetPlayerVehicleID(playerid),vX,vY, vZ);
- SetVehicleVelocity(GetPlayerVehicleID(playerid), vX+=0.60 * floatsin(-vA, degrees), vY+=0.60 * floatcos(-vA, degrees), vZ);
- }
- if (PRESSED(16384)) return ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"ММеню","Читы\r\nОружие\r\nМашины\r\nТелепорты\r\nПрочее\r\nИд_Кнопок\r\nМенюМашины","Ok", "Закрыть");
- if (PRESSED(2) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)// jump in car
- {
- new Float:vX, Float:vY, Float:vZ, Float:vA;
- GetVehicleZAngle(GetPlayerVehicleID(playerid), vA);
- GetVehicleVelocity(GetPlayerVehicleID(playerid),vX,vY, vZ);
- SetVehicleVelocity(GetPlayerVehicleID(playerid), vX+=0.15 * floatsin(-vA, degrees), vY+=0.15 * floatcos(-vA, degrees), 0.33);
- }
- if (PRESSED(65536)) return PutPlayerInVehicle(playerid, GetClosestVehicle(playerid),0);
- if (PRESSED(131072) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new Float:cx,Float:cy,Float:cz,Float:zv;
- GetVehiclePos(GetPlayerVehicleID(playerid),cx,cy,cz);
- GetVehicleZAngle(GetPlayerVehicleID(playerid), zv);
- SetVehiclePos(GetPlayerVehicleID(playerid),cx,cy,cz);
- SetVehicleZAngle(GetPlayerVehicleID(playerid),zv);
- }
- /*if (PRESSED(32))// fly
- {
- ApplyAnimation( playerid, "SWIM", "Swim_Breast", 10.1, 1, 1, 1, 0, 0 );
- SetTimer("fly",1000,true);
- }*/
- if (PRESSED(262144))// Air Breake
- {
- if(ab[playerid] ==1 )
- {
- //SetPVarInt(playerid,"ab",0);
- ab[playerid] = 0;
- TextDrawSetString(MAB[playerid],"(Air_Brk)");
- TogglePlayerControllable(playerid, 1);
- KillTimer(timer1);
- KillTimer(timer2);
- KillTimer(timer3);
- KillTimer(timer4);
- KillTimer(timer5);
- KillTimer(timer6);
- }
- else
- {
- TogglePlayerControllable(playerid, 0);
- //SetPVarInt(playerid,"ab",1);
- ab[playerid] = 1;
- TextDrawSetString(MAB[playerid],"(~g~Air_Brk~w~)");
- }
- }
- if(ab[playerid]==1)
- {
- if(PRESSED(131072))
- {
- timer6 = SetTimer("ab6",10,true);
- //SetPlayerPos(playerid, x, y+0.3, z);
- }
- if(RELEASED(131072)) return KillTimer(timer6);
- if(PRESSED(2))
- {
- timer5 = SetTimer("ab5",10,true);
- //SetPlayerPos(playerid, x, y-0.3, z);
- }
- if(RELEASED(2)) return KillTimer(timer5);
- if(PRESSED(1024))
- {
- timer4 = SetTimer("ab4",10,true);
- //SetPlayerPos(playerid, x-0.3, y, z);
- }
- if(RELEASED(1024)) return KillTimer(timer4);
- if(PRESSED(8))
- {
- timer3 = SetTimer("ab3",10,true);
- //SetPlayerPos(playerid, x+0.3, y, z);
- }
- if(RELEASED(8)) return KillTimer(timer3);
- if(PRESSED(4))
- {
- timer2 = SetTimer("ab2",10,true);
- //SetPlayerPos(playerid, x, y, z-0.3);
- }
- if(RELEASED(4)) return KillTimer(timer2);
- if(PRESSED(32))
- {
- timer1 = SetTimer("ab1",10,true);
- //SetPlayerPos(playerid, x, y, z+0.3);
- }
- if(RELEASED(32)) return KillTimer(timer1);
- }
- /*if (PRESSED(8) && GetPVarInt(playerid,"ab")==1)
- {
- new
- Float:fPX, Float:fPY, Float:fPZ,
- Float:fVX, Float:fVY, Float:fVZ,
- Float:ax, Float:ay, Float:az;
- const
- Float:fScale = 0.5;
- GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
- GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
- GetPlayerPos(playerid,x,y,az);
- ax = fPX - floatmul(fVX, fScale);
- ay = fPY - floatmul(fVY, fScale);
- SetPlayerPos(playerid,ax,ay,az);
- }*/
- if (PRESSED(512) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return RepairVehicle(GetPlayerVehicleID(playerid));// autorepair
- if (PRESSED(1)) return TogglePlayerControllable(playerid, 1); // unfreeze
- if(newkeys==8192)//GM
- {
- if(GetPVarInt(playerid,"RepairVehicle")==1)
- {
- SetPlayerHealth(playerid,100);
- SetPVarInt(playerid,"RepairVehicle",0);
- TextDrawSetString(MGM[playerid],"(INV)");
- }
- else
- {
- SetPVarInt(playerid,"RepairVehicle",1);
- SetPlayerHealth(playerid,100000);
- TextDrawSetString(MGM[playerid],"(~g~INV~w~)");
- }
- }
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(success)
- {
- new pip[16];
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- GetPlayerIp(i, pip, sizeof(pip));
- if(!strcmp(ip, pip, true))
- {
- SpeedTimer[i] = SetTimerEx("speedo", 200, true, "e", i);
- SetPVarInt(i,"cm",0); // click map
- TextDrawShowForPlayer(i, MCords[i]); // coordiates
- TextDrawShowForPlayer(i, MBand[i]);// band
- TextDrawShowForPlayer(i, MArHealth[i]);// health armour
- TextDrawShowForPlayer(i, MFPS[i]);// fps
- TextDrawShowForPlayer(i, MGM[i]); // gm
- TextDrawShowForPlayer(i, MWeapon[i]); // weapon
- TextDrawShowForPlayer(i, MMoney[i]); // money
- TextDrawShowForPlayer(i, MCM[i]); // allow teleport
- TextDrawShowForPlayer(i, MAB[i]); // allow teleport
- TextDrawShowForPlayer(i, Msd[i]); // Msd[i]
- }
- }
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- new cords[80],ha[120],MFFPS[20],Float:x,Float:y,Float:z,Float:ah[2],plname[MAX_PLAYER_NAME],string[256];
- GetPlayerName(playerid,plname,24);
- GetPlayerHealth(playerid,ah[1]);
- format(string, sizeof(string), "%s %.0f", plname, ah[1]);
- for(new i, j = GetMaxPlayers(); i != j; i++)
- {
- if(!IsPlayerConnected(i)) continue;
- if(IsPlayerNPC(i)) continue;
- if(!IsPlayerAdmin(i)) continue;
- if(IsPlayerAdmin(playerid)) continue;
- UpdatePlayer3DTextLabelText(i, wh[playerid], COLOR_RED, string);
- }
- if(IsPlayerAdmin(playerid))
- {
- GetPlayerPos(playerid,x,y,z); GetPlayerArmour(playerid,ah[0]);
- format(ha,120,"Armor: %.0f ~n~Health:~r~%.0f",ah[0],ah[1]);
- format(cords,80,"%.2f, %.2f, %.2f; Int:%.d",x,y,z,GetPlayerInterior(playerid));
- format(MFFPS,sizeof(MFFPS),"(%.d)",GetPlayerPing(playerid));
- TextDrawSetString(MCords[playerid],cords);
- TextDrawSetString(MArHealth[playerid],ha);
- TextDrawSetString(MFPS[playerid],MFFPS);
- }
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- if(!IsPlayerAdmin(forplayerid)) return 1;
- if(IsPlayerAdmin(playerid)) return 1;
- if(IsPlayerNPC(playerid)) return 1;
- wh[playerid] = CreatePlayer3DTextLabel(forplayerid, "text", COLOR_RED, 0.0, 0.0, 0.35, 200.0, playerid, INVALID_VEHICLE_ID, 0);
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- if(IsPlayerNPC(playerid)) return 1;
- if(!IsPlayerAdmin(forplayerid)) return 1;
- if(IsPlayerAdmin(playerid)) return 1;
- for(new i; i < 6; i++) DeletePlayer3DTextLabel(forplayerid, wh[playerid]);
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(IsPlayerAdmin(playerid))
- {
- /*new g_string[80];
- if(GetPVarInt(playerid,"sd") == 1) return format(g_string,sizeof(g_string),"{4CBF3F}Включён{FFFFFF}");
- else return format(g_string,sizeof(g_string),"{F0053F}Выключен{FFFFFF}");
- new string[250];*/
- if(dialogid==0 && response)
- {
- switch(listitem) // main menu
- {
- case 0: ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Читы","Назад в меню\r\nВосстановить здоровье\r\nВосстановить броню\r\nПогода\r\nВремя","Ok", "Закрыть");
- case 1: ShowPlayerDialog(playerid, 4, DIALOG_STYLE_INPUT, "Оружие", "Введите id оружия.(1-46)", "Ввод", "Отмена");
- case 2: ShowPlayerDialog(playerid, 5, DIALOG_STYLE_INPUT, "Машины", "Введите id машины.", "Ввод", "Отмена");
- case 3: ShowPlayerDialog(playerid,6,DIALOG_STYLE_LIST,"Телепорты","Назад в меню\r\nИнтерьеры\r\nВажные точки","Ok", "Закрыть");
- case 4: ShowPlayerDialog(playerid,9,DIALOG_STYLE_LIST,"Прочее","Назад в меню\r\nСмерть\r\nСменить скин\r\nДеньги\r\nЦвет машины\r\nДжетПак\r\nОгромный урон|Вкл|Выкл|\r\nТелепорт по карте|Вкл|Выкл|","Ok","Закрыть");
- case 5:
- {
- if(GetPVarInt(playerid,"bu")==1) return SetPVarInt(playerid,"bu",0);
- SetPVarInt(playerid,"bu",1);
- }
- case 6: SendClientMessage(playerid,COLOR_RED,"Ждите следующей версии. ;D");
- }
- }
- if(dialogid==1 && response)
- {
- switch(listitem) // cheats
- {
- case 0: ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"ММеню","Читы\r\nОружие\r\nМашины\r\nТелепорты\r\nПрочее\r\nИд_Кнопок\r\nМенюМашины","Ok", "Закрыть");
- case 1: SetPlayerHealth(playerid,100);
- case 2: SetPlayerArmour(playerid,100);
- 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", "Закрыть");
- case 4: ShowPlayerDialog(playerid,3,DIALOG_STYLE_LIST,"Время","Назад к читам\r\n00-00\r\n06-00\r\n12-00\r\n18-00","Ok", "Закрыть");
- }
- }
- if(dialogid==2 && response) // weather
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Читы","Назад в меню\r\nВосстановить здоровье\r\nВосстановить броню\r\nПогода\r\nВремя","Ok", "Закрыть");
- case 1: SetPlayerWeather(playerid, 3);
- case 2: SetPlayerWeather(playerid, 8);
- case 3: SetPlayerWeather(playerid, 9);
- case 4: SetPlayerWeather(playerid, 19);
- case 5: SetPlayerWeather(playerid, 44);
- case 6: SetPlayerWeather(playerid, 38);
- case 7: SetPlayerWeather(playerid, 18);
- case 8: SetPlayerWeather(playerid, 21);
- case 9: SetPlayerWeather(playerid, 35);
- case 10: SetPlayerWeather(playerid, 39);
- }
- }
- if(dialogid==3 && response) // Time
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"ММеню","Читы\r\nОружие\r\nМашины\r\nТелепорты\r\nПрочее\r\nИд_Кнопок\r\nМенюМашины","Ok", "Закрыть");
- case 1: SetPlayerTime(playerid,0,0);
- case 2: SetPlayerTime(playerid,6,0);
- case 3: SetPlayerTime(playerid,12,0);
- case 4: SetPlayerTime(playerid,18,0);
- }
- }
- if(dialogid==4 && response) // weapon
- {
- new wp = strval(inputtext);
- GivePlayerWeapon(playerid, wp, 9999);
- TextDrawSetString(MWeapon[playerid],"(~g~Weapon~w~)");
- }
- if(dialogid==5 && response) // vehicle
- {
- new Float:x,Float:y,Float:z,car = strval(inputtext);
- GetPlayerPos(playerid,x,y,z);
- CreateVehicle(car,x+1.0,y+1.0,z,100.0, 0, 1, 60);
- }
- if(dialogid==6 && response) // tp
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"ММеню","Читы\r\nОружие\r\nМашины\r\nТелепорты\r\nПрочее\r\nИд_Кнопок\r\nМенюМашины","Ok", "Закрыть");
- case 1: ShowPlayerDialog(playerid,7,DIALOG_STYLE_INPUT,"Интерьеры","(0-150)","Ok", "Закрыть");
- 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", "Закрыть");
- }
- }
- if(dialogid==7 && response) // inteior
- {
- SetPlayerInterior(playerid,interInt[strval(inputtext)]);
- SetPlayerPos(playerid,interPos[strval(inputtext)][0],interPos[strval(inputtext)][1],interPos[strval(inputtext)][2]);
- }
- if(dialogid==8 && response) // tp
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid,6,DIALOG_STYLE_LIST,"Телепорты","Назад в меню\r\nИнтерьеры\r\nВажные точки","Ok", "Закрыть");
- case 1: SendClientMessage(playerid,-1,"Los-Santos_List");
- case 2: SetPos(playerid, 1546.4706,-1353.1392,329.4724);
- case 3: SetPos(playerid, 1043.5872,-1042.9121,31.7864);
- case 4: SetPos(playerid, 840.8961,-2058.4443,12.8672);
- case 5: SetPos(playerid, 1545.4237,-1675.3828,13.5603);
- case 6: SetPos(playerid, 1360.5272,-1282.8705,13.3771);
- case 7: SetPos(playerid, 1906.2207,-2429.4124,13.5391);
- case 8: SendClientMessage(playerid,-1,"Las-Venturas_List");
- case 9: SetPos(playerid, 2242.4707,2452.4792,10.8203);
- case 10: SetPos(playerid, 2089.9355,2076.5129,10.8203);
- case 11: SetPos(playerid, 2192.3721,1677.2687,12.3672);
- case 12: SetPos(playerid, 2023.6177,1006.8246,10.8203);
- case 13: SetPos(playerid, 2155.7151,943.7850,10.8203);
- case 14: SetPos(playerid, 1592.5265,1445.1265,10.8302);
- case 15: SetPos(playerid, 2002.7113,1542.9701,13.5859);
- case 16: SetPos(playerid, 2323.0342,1283.6992,96.7743);
- case 17: SendClientMessage(playerid,-1,"San-Fiero_List");
- case 18: SetPos(playerid, -2704.7307,218.5696,4.1797);
- case 19: SetPos(playerid, -1429.2852,502.9500,18.2294);
- case 20: SetPos(playerid, -1417.7987,-591.8294,14.1484);
- case 21: SetPos(playerid, -1520.3173,676.5159,139.2734);
- case 22: SetPos(playerid, -1319.8330,899.6963,46.3729);
- case 23: SetPos(playerid, -1803.9529,576.1880,234.8906);
- case 24: SetPos(playerid, -1753.8151,885.5803,295.8750);
- case 25: SetPos(playerid, -1629.5845,1427.2319,7.1745);
- case 26: SendClientMessage(playerid,-1,"Other_List_List");
- case 27: SetPos(playerid, -2334.8123,-1633.4257,483.7031);
- case 28: SetPos(playerid, 400.5048,2502.1021,16.4844);
- case 29: SetPos(playerid, -1366.8934,1488.1726,11.0391);
- case 30: SetPos(playerid, -2871.6252,2714.4536,275.7968);
- case 31: SetPos(playerid, -2464.0979,2334.0642,4.8359);
- }
- }
- if(dialogid==9 && response) // tp
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"ММеню","Читы\r\nОружие\r\nМашины\r\nТелепорты\r\nПрочее\r\nИд_Кнопок\r\nМенюМашины","Ok", "Закрыть");
- case 1: SetPlayerHealth(playerid,0);
- case 2: ShowPlayerDialog(playerid,10,DIALOG_STYLE_INPUT,"Скины","Введите id скина","Ok", "Закрыть");
- case 3: ShowPlayerDialog(playerid,11,DIALOG_STYLE_INPUT,"Деньги","Введите колличество денег","Ok", "Закрыть");
- case 4: ShowPlayerDialog(playerid,12,DIALOG_STYLE_INPUT,"Цвет","Введите первый id цвета автомобиля","Ok", "Закрыть");
- case 5: SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
- case 6:
- {
- if(GetPVarInt(playerid,"sd")==1)
- {
- TextDrawSetString(Msd[playerid],"(S.D.)");
- SetPVarInt(playerid,"sd",0);
- }
- else
- {
- SetPVarInt(playerid,"sd",1);
- TextDrawSetString(Msd[playerid],"(~g~S.D.~w~)");
- }
- }
- case 7:
- {
- if(GetPVarInt(playerid,"cm")==1)
- {
- TextDrawSetString(MCM[playerid],"(C.M.)");
- SetPVarInt(playerid,"cm",0);
- }
- else
- {
- SetPVarInt(playerid,"cm",1);
- TextDrawSetString(MCM[playerid],"(~g~C.M.~w~)");
- }
- }
- }
- }
- if(dialogid==10 && response) return SetPlayerSkin(playerid,strval(inputtext));
- if(dialogid==11 && response)
- {
- TextDrawSetString(MMoney[playerid],"(~g~Money~w~)");
- GivePlayerMoney(playerid,strval(inputtext));
- }
- if(dialogid==12 && response)
- {
- colour1 = strval(inputtext);
- ShowPlayerDialog(playerid,13,DIALOG_STYLE_INPUT,"Цвет","Введите второй id цвета автомобиля","Ok", "Закрыть");
- }
- if(dialogid==13 && response)
- {
- colour2 = strval(inputtext);
- ChangeVehicleColor(GetPlayerVehicleID(playerid), colour1, colour2);
- }
- }
- return 1;
- }
- public OnVehicleDamageStatusUpdate(vehicleid,playerid)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(GetPVarInt(playerid,"RepairVehicle") == 1) return RepairVehicle(GetPlayerVehicleID(playerid));
- }
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(issuerid != INVALID_PLAYER_ID)
- {
- if(GetPVarInt(issuerid,"sd")==1) return SetPlayerHealth(playerid,0);
- }
- }
- return 1;
- }
- public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
- {
- if(GetPVarInt(playerid,"cm")==1) return SetPos(playerid, fX, fY, fZ);
- return 1;
- }
- /*public fly(playerid)
- {
- new
- Float:x,Float:y,Float:z,
- Float:fPX, Float:fPY, Float:fPZ,
- Float:fVX, Float:fVY, Float:fVZ,
- Float:ox,Float:oy,Float:oz,
- Float:object_x, Float:object_y, Float:object_z;
- const
- Float:fScale = 1.5;
- GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
- GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
- GetPlayerPos(playerid,x,y,z);
- object_x = fPX + floatmul(fVX, fScale);
- object_y = fPY + floatmul(fVY, fScale);
- object_z = fPZ + floatmul(fVZ, fScale);
- ox = object_x - x;
- oy = object_y - y;
- oz = object_z - z;
- SetPlayerVelocity(playerid,ox,oy,oz);
- }*/
- public ab1(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- SetPos(playerid, x, y, z+0.3);
- }
- public ab2(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- SetPos(playerid, x, y, z-0.3);
- }
- public ab3(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- SetPos(playerid, x+0.3, y, z);
- }
- public ab4(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- SetPos(playerid, x-0.3, y, z);
- }
- public ab5(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- SetPos(playerid, x, y-0.3, z);
- }
- public ab6(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- SetPos(playerid, x, y+0.3, z);
- }
- public speedo(playerid)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new Float: vPos[3],Float:Speed,Float:health,string[80];
- new mod = GetVehicleModel(GetPlayerVehicleID(playerid));
- GetVehicleHealth(GetPlayerVehicleID(playerid),health);
- GetVehicleVelocity(GetPlayerVehicleID(playerid), vPos[0], vPos[1], vPos[2]);
- Speed = floatmul(floatsqroot(floatadd(floatpower(vPos[0], 2), floatadd(floatpower(vPos[1], 2), floatpower(vPos[2], 2)))), 100);
- 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]);
- }
- else return TextDrawHideForPlayer(playerid,speed[playerid]);
- return 1;
- }
- stock GetClosestVehicle(playerid)
- {
- new Float:DefaultDistance = 3000.0;
- new Float:Distance,VehID;
- new Float:X,Float:Y,Float:Z;
- for(new d=1; d < MAX_VEHICLES; d++)
- {
- if(GetVehicleModel(d))
- {
- GetPlayerPos(playerid,X,Y,Z);
- Distance = GetVehicleDistanceFromPoint(d,X,Y,Z);
- if(Distance < DefaultDistance)
- {
- VehID = d;
- DefaultDistance = Distance;
- }
- }
- }
- return VehID;
- }
- stock SetPos(playerid,Float:x,Float:y,Float:z)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
- else
- SetPlayerPos(playerid,x,y,z);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement