Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma tabsize 0
- #define locate
- //defines velocity
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- //Colors
- #define Ccp
- #define work
- #define COLOR_ACTIVEBORDER 0xB4B4B4FF
- #define COLOR_ACTIVECAPTION 0x99B4D1FF
- #define COLOR_ACTIVECAPTIONTEXT 0x000000FF
- #define COLOR_ALICEBLUE 0xF0F8FFFF
- #define COLOR_ANTIQUEWHITE 0xFAEBD7FF
- #define COLOR_APPWORKSPACE 0xABABABFF
- #define COLOR_AQUA 0x00FFFFFF
- #define COLOR_AQUAMARINE 0x7FFFD4FF
- #define COLOR_AZURE 0xF0FFFFFF
- #define COLOR_BEIGE 0xF5F5DCFF
- #define COLOR_BISQUE 0xFFE4C4FF
- #define COLOR_BLACK 0x000000FF
- #define COLOR_BLANCHEDALMOND 0xFFEBCDFF
- #define COLOR_BLUE 0x0000FFFF
- #define COLOR_BLUEVIOLET 0x8A2BE2FF
- #define COLOR_BROWN 0xA52A2AFF
- #define COLOR_BURLYWOOD 0xDEB887FF
- #define COLOR_BUTTONFACE 0xF0F0F0FF
- #define COLOR_BUTTONHIGHLIGHT 0xFFFFFFFF
- #define COLOR_BUTTONSHADOW 0xA0A0A0FF
- #define COLOR_CADETBLUE 0x5F9EA0FF
- #define COLOR_CHARTREUSE 0x7FFF00FF
- #define COLOR_CHOCOLATE 0xD2691EFF
- #define COLOR_CONTROL 0xF0F0F0FF
- #define COLOR_CONTROLDARK 0xA0A0A0FF
- #define COLOR_CONTROLDARKDARK 0x696969FF
- #define COLOR_CONTROLLIGHT 0xE3E3E3FF
- #define COLOR_CONTROLLIGHTLIGHT 0xFFFFFFFF
- #define COLOR_CONTROLTEXT 0x000000FF
- #define COLOR_CORAL 0xFF7F50FF
- #define COLOR_CORNFLOWERBLUE 0x6495EDFF
- #define COLOR_CORNSILK 0xFFF8DCFF
- #define COLOR_CRIMSON 0xDC143CFF
- #define COLOR_CYAN 0x00FFFFFF
- #define COLOR_DARKBLUE 0x00008BFF
- #define COLOR_DARKCYAN 0x008B8BFF
- #define COLOR_DARKGOLDENROD 0xB8860BFF
- #define COLOR_DARKGRAY 0xA9A9A9FF
- #define COLOR_DARKGREEN 0x006400FF
- #define COLOR_DARKKHAKI 0xBDB76BFF
- #define COLOR_DARKMAGENTA 0x8B008BFF
- #define COLOR_DARKOLIVEGREEN 0x556B2FFF
- #define COLOR_DARKORANGE 0xFF8C00FF
- #define COLOR_DARKORCHID 0x9932CCFF
- #define COLOR_DARKRED 0x8B0000FF
- #define COLOR_DARKSALMON 0xE9967AFF
- #define COLOR_DARKSEAGREEN 0x8FBC8BFF
- #define COLOR_DARKSLATEBLUE 0x483D8BFF
- #define COLOR_DARKSLATEGRAY 0x2F4F4FFF
- #define COLOR_DARKTURQUOISE 0x00CED1FF
- #define COLOR_DARKVIOLET 0x9400D3FF
- #define COLOR_DEEPPINK 0xFF1493FF
- #define COLOR_DEEPSKYBLUE 0x00BFFFFF
- #define COLOR_DESKTOP 0x000000FF
- #define COLOR_DIMGRAY 0x696969FF
- #define COLOR_DODGERBLUE 0x1E90FFFF
- #define COLOR_FIREBRICK 0xB22222FF
- #define COLOR_FLORALWHITE 0xFFFAF0FF
- #define COLOR_FORESTGREEN 0x228B22FF
- #define COLOR_FUCHSIA 0xFF00FFFF
- #define COLOR_GAINSBORO 0xDCDCDCFF
- #define COLOR_GHOSTWHITE 0xF8F8FFFF
- #define COLOR_GOLD 0xFFD700FF
- #define COLOR_GOLDENROD 0xDAA520FF
- #define COLOR_GRADIENTACTIVECAPTION 0xB9D1EAFF
- #define COLOR_GRADIENTINACTIVECAPTION 0xD7E4F2FF
- #define COLOR_GRAY 0x808080FF
- #define COLOR_GRAYTEXT 0x808080FF
- #define COLOR_GREEN 0x008000FF
- #define COLOR_GREENYELLOW 0xADFF2FFF
- #define COLOR_HIGHLIGHT 0x3399FFFF
- #define COLOR_HIGHLIGHTTEXT 0xFFFFFFFF
- #define COLOR_HONEYDEW 0xF0FFF0FF
- #define COLOR_HOTPINK 0xFF69B4FF
- #define COLOR_HOTTRACK 0x0066CCFF
- #define COLOR_INACTIVEBORDER 0xF4F7FCFF
- #define COLOR_INACTIVECAPTION 0xBFCDDBFF
- #define COLOR_INACTIVECAPTIONTEXT 0x434E54FF
- #define COLOR_INDIANRED 0xCD5C5CFF
- #define COLOR_INDIGO 0x4B0082FF
- #define COLOR_INFO 0xFFFFE1FF
- #define COLOR_INFOTEXT 0x000000FF
- #define COLOR_IVORY 0xFFFFF0FF
- #define COLOR_KHAKI 0xF0E68CFF
- #define COLOR_LAVENDER 0xE6E6FAFF
- #define COLOR_LAVENDERBLUSH 0xFFF0F5FF
- #define COLOR_LAWNGREEN 0x7CFC00FF
- #define COLOR_LEMONCHIFFON 0xFFFACDFF
- #define COLOR_LIGHTBLUE 0xADD8E6FF
- #define COLOR_LIGHTCORAL 0xF08080FF
- #define COLOR_LIGHTCYAN 0xE0FFFFFF
- #define COLOR_LIGHTGOLDENRODYELLOW 0xFAFAD2FF
- #define COLOR_LIGHTGRAY 0xD3D3D3FF
- #define COLOR_LIGHTGREEN 0x90EE90FF
- #define COLOR_LIGHTPINK 0xFFB6C1FF
- #define COLOR_LIGHTSALMON 0xFFA07AFF
- #define COLOR_LIGHTSEAGREEN 0x20B2AAFF
- #define COLOR_LIGHTSKYBLUE 0x87CEFAFF
- #define COLOR_LIGHTSLATEGRAY 0x778899FF
- #define COLOR_LIGHTSTEELBLUE 0xB0C4DEFF
- #define COLOR_LIGHTYELLOW 0xFFFFE0FF
- #define COLOR_LIME 0x00FF00FF
- #define COLOR_LIMEGREEN 0x32CD32FF
- #define COLOR_LINEN 0xFAF0E6FF
- #define COLOR_MAGENTA 0xFF00FFFF
- #define COLOR_MAROON 0x800000FF
- #define COLOR_MEDIUMAQUAMARINE 0x66CDAAFF
- #define COLOR_MEDIUMBLUE 0x0000CDFF
- #define COLOR_MEDIUMORCHID 0xBA55D3FF
- #define COLOR_MEDIUMPURPLE 0x9370DBFF
- #define COLOR_MEDIUMSEAGREEN 0x3CB371FF
- #define COLOR_MEDIUMSLATEBLUE 0x7B68EEFF
- #define COLOR_MEDIUMSPRINGGREEN 0x00FA9AFF
- #define COLOR_MEDIUMTURQUOISE 0x48D1CCFF
- #define COLOR_MEDIUMVIOLETRED 0xC71585FF
- #define COLOR_MENU 0xF0F0F0FF
- #define COLOR_MENUBAR 0xF0F0F0FF
- #define COLOR_MENUHIGHLIGHT 0x3399FFFF
- #define COLOR_MENUTEXT 0x000000FF
- #define COLOR_MIDNIGHTBLUE 0x191970FF
- #define COLOR_MINTCREAM 0xF5FFFAFF
- #define COLOR_MISTYROSE 0xFFE4E1FF
- #define COLOR_MOCCASIN 0xFFE4B5FF
- #define COLOR_NAVAJOWHITE 0xFFDEADFF
- #define COLOR_NAVY 0x000080FF
- #define COLOR_OLDLACE 0xFDF5E6FF
- #define COLOR_OLIVE 0x808000FF
- #define COLOR_OLIVEDRAB 0x6B8E23FF
- #define COLOR_ORANGE 0xFFA500FF
- #define COLOR_ORANGERED 0xFF4500FF
- #define COLOR_ORCHID 0xDA70D6FF
- #define COLOR_PALEGOLDENROD 0xEEE8AAFF
- #define COLOR_PALEGREEN 0x98FB98FF
- #define COLOR_PALETURQUOISE 0xAFEEEEFF
- #define COLOR_PALEVIOLETRED 0xDB7093FF
- #define COLOR_PAPAYAWHIP 0xFFEFD5FF
- #define COLOR_PEACHPUFF 0xFFDAB9FF
- #define COLOR_PERU 0xCD853FFF
- #define COLOR_PINK 0xFFC0CBFF
- #define COLOR_PLUM 0xDDA0DDFF
- #define COLOR_POWDERBLUE 0xB0E0E6FF
- #define COLOR_PURPLE 0x800080FF
- #define COLOR_RED 0xFF0000FF
- #define COLOR_ROSYBROWN 0xBC8F8FFF
- #define COLOR_ROYALBLUE 0x4169E1FF
- #define COLOR_SADDLEBROWN 0x8B4513FF
- #define COLOR_SALMON 0xFA8072FF
- #define COLOR_SANDYBROWN 0xF4A460FF
- #define COLOR_SCROLLBAR 0xC8C8C8FF
- #define COLOR_SEAGREEN 0x2E8B57FF
- #define COLOR_SEASHELL 0xFFF5EEFF
- #define COLOR_SIENNA 0xA0522DFF
- #define COLOR_SILVER 0xC0C0C0FF
- #define COLOR_SKYBLUE 0x87CEEBFF
- #define COLOR_SLATEBLUE 0x6A5ACDFF
- #define COLOR_SLATEGRAY 0x708090FF
- #define COLOR_SNOW 0xFFFAFAFF
- #define COLOR_SPRINGGREEN 0x00FF7FFF
- #define COLOR_STEELBLUE 0x4682B4FF
- #define COLOR_TAN 0xD2B48CFF
- #define COLOR_TEAL 0x008080FF
- #define COLOR_THISTLE 0xD8BFD8FF
- #define COLOR_TOMATO 0xFF6347FF
- #define COLOR_TRANSPARENT 0xFFFFFF00
- #define COLOR_TURQUOISE 0x40E0D0FF
- #define COLOR_VIOLET 0xEE82EEFF
- #define COLOR_WHEAT 0xF5DEB3FF
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_WHITESMOKE 0xF5F5F5FF
- #define COLOR_WINDOW 0xFFFFFFFF
- #define COLOR_WINDOWFRAME 0x646464FF
- #define COLOR_WINDOWTEXT 0x000000FF
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_YELLOWGREEN 0x9ACD32FF
- #define STEALTH_ORANGE 0xFF880000
- #define STEALTH_OLIVE 0x66660000
- #define STEALTH_GREEN 0x33DD1100
- #define STEALTH_PINK 0xFF22EE00
- #define STEALTH_BLUE 0x0077BB00
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_MEDIUMAQUA 0x83BFBFAA
- #define SetPlayerSpectating
- #define COLOR_MEDIUMMAGENTA 0x8B008BAA
- #include <a_samp>
- #if defined FILTERSCRIPT
- #define Filterscript
- new gate;
- new bool:gateopen;
- forward GateCheck();
- public GateCheck()
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerInRangeOfPoint(i,-2012.55,1346.81,7.87,15.0, 8.0, 3.0, 10.0))
- {
- if(gateopen == false)
- {
- MoveObject(gate,-2004.65,1346.81, 7.87, 3.5);
- gateopen = true;
- }
- return;
- }
- }
- if(gateopen == true)
- {
- MoveObject(gate, 8.0, 3.0, 10.0, 3.5);
- gateopen = false;
- }
- }
- //Login
- #include <dini>
- #if !defined floatstr
- native Float:floatstr(const string[]);
- #define SLOTS 8
- #undef MAX_PLAYERS
- new player_level[SLOTS] = {-1, ...}; // Saves the player's level - the default
- // one is -1 for not connected, 0 for not logged in and others for logged in
- // All elements are set to -1 at start
- new player_names[SLOTS][MAX_PLAYER_NAME]; // Saves the player's names
- #define USERFILE "users.txt"
- #define dcmd(%1,%2,%3) if ((strcmp(%3, "/%1", true, %2+1) == 0)&&(((%3[%2+1]==0)&&(dcmd_%1(playerid,"")))||((%3[%2+1]==32)&&(dcmd_%1(playerid,%3[%2+2]))))) return 1
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Test By:Desi");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Test By:Desi");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- SetTimer("GateCheck", 800, true);
- gate = CreateObject(986, -2012.55, 1346.81, 7.87, 0.00, 0.00, 180.00);
- SetGameModeText("Test");
- //Classes
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- //Vehicles
- AddStaticVehicle(429,2040.5247,1359.2783,10.3516,177.1306,13,13);
- AddStaticVehicle(421,2110.4102,1398.3672,10.7552,359.5964,13,13);
- AddStaticVehicle(411,2074.9624,1479.2120,10.3990,359.6861,64,64);
- AddStaticVehicle(477,2075.6038,1666.9750,10.4252,359.7507,94,94);
- AddStaticVehicle(541,2119.5845,1938.5969,10.2967,181.9064,22,22);
- AddStaticVehicle(541,1843.7881,1216.0122,10.4556,270.8793,60,1);
- AddStaticVehicle(402,1944.1003,1344.7717,8.9411,0.8168,30,30);
- AddStaticVehicle(402,1679.2278,1316.6287,10.6520,180.4150,90,90);
- AddStaticVehicle(415,1685.4872,1751.9667,10.5990,268.1183,25,1);
- AddStaticVehicle(411,2034.5016,1912.5874,11.9048,0.2909,123,1);
- AddStaticVehicle(411,2172.1682,1988.8643,10.5474,89.9151,116,1);
- AddStaticVehicle(429,2245.5759,2042.4166,10.5000,270.7350,14,14);
- AddStaticVehicle(477,2361.1538,1993.9761,10.4260,178.3929,101,1);
- AddStaticVehicle(550,2221.9946,1998.7787,9.6815,92.6188,53,53);
- AddStaticVehicle(558,2243.3833,1952.4221,14.9761,359.4796,116,1);
- AddStaticVehicle(587,2276.7085,1938.7263,31.5046,359.2321,40,1);
- AddStaticVehicle(587,2602.7769,1853.0667,10.5468,91.4813,43,1);
- AddStaticVehicle(603,2610.7600,1694.2588,10.6585,89.3303,69,1);
- AddStaticVehicle(587,2635.2419,1075.7726,10.5472,89.9571,53,1);
- AddStaticVehicle(437,2577.2354,1038.8063,10.4777,181.7069,35,1);
- AddStaticVehicle(535,2039.1257,1545.0879,10.3481,359.6690,123,1);
- AddStaticVehicle(535,2009.8782,2411.7524,10.5828,178.9618,66,1);
- AddStaticVehicle(429,2010.0841,2489.5510,10.5003,268.7720,1,2);
- AddStaticVehicle(415,2076.4033,2468.7947,10.5923,359.9186,36,1);
- AddStaticVehicle(487,2093.2754,2414.9421,74.7556,89.0247,26,57);
- AddStaticVehicle(506,2352.9026,2577.9768,10.5201,0.4091,7,7);
- AddStaticVehicle(506,2166.6963,2741.0413,10.5245,89.7816,52,52);
- AddStaticVehicle(411,1960.9989,2754.9072,10.5473,200.4316,112,1);
- AddStaticVehicle(429,1919.5863,2760.7595,10.5079,100.0753,2,1);
- AddStaticVehicle(415,1673.8038,2693.8044,10.5912,359.7903,40,1);
- AddStaticVehicle(402,1591.0482,2746.3982,10.6519,172.5125,30,30);
- AddStaticVehicle(603,1580.4537,2838.2886,10.6614,181.4573,75,77);
- AddStaticVehicle(550,1555.2734,2750.5261,10.6388,91.7773,62,62);
- AddStaticVehicle(535,1455.9305,2878.5288,10.5837,181.0987,118,1);
- AddStaticVehicle(477,1537.8425,2578.0525,10.5662,0.0650,121,1);
- AddStaticVehicle(451,1433.1594,2607.3762,10.3781,88.0013,16,16);
- AddStaticVehicle(603,2223.5898,1288.1464,10.5104,182.0297,18,1);
- AddStaticVehicle(558,2451.6707,1207.1179,10.4510,179.8960,24,1);
- AddStaticVehicle(550,2461.7253,1357.9705,10.6389,180.2927,62,62);
- AddStaticVehicle(558,2461.8162,1629.2268,10.4496,181.4625,117,1);
- AddStaticVehicle(477,2395.7554,1658.9591,10.5740,359.7374,0,1);
- AddStaticVehicle(404,1553.3696,1020.2884,10.5532,270.6825,119,50);
- AddStaticVehicle(400,1380.8304,1159.1782,10.9128,355.7117,123,1);
- AddStaticVehicle(418,1383.4630,1035.0420,10.9131,91.2515,117,227);
- AddStaticVehicle(404,1445.4526,974.2831,10.5534,1.6213,109,100);
- AddStaticVehicle(400,1704.2365,940.1490,10.9127,91.9048,113,1);
- AddStaticVehicle(404,1658.5463,1028.5432,10.5533,359.8419,101,101);
- AddStaticVehicle(581,1677.6628,1040.1930,10.4136,178.7038,58,1);
- AddStaticVehicle(581,1383.6959,1042.2114,10.4121,85.7269,66,1);
- AddStaticVehicle(581,1064.2332,1215.4158,10.4157,177.2942,72,1);
- AddStaticVehicle(581,1111.4536,1788.3893,10.4158,92.4627,72,1);
- AddStaticVehicle(522,953.2818,1806.1392,8.2188,235.0706,3,8);
- AddStaticVehicle(522,995.5328,1886.6055,10.5359,90.1048,3,8);
- AddStaticVehicle(521,993.7083,2267.4133,11.0315,1.5610,75,13);
- AddStaticVehicle(535,1439.5662,1999.9822,10.5843,0.4194,66,1);
- AddStaticVehicle(522,1430.2354,1999.0144,10.3896,352.0951,6,25);
- AddStaticVehicle(522,2156.3540,2188.6572,10.2414,22.6504,6,25);
- AddStaticVehicle(598,2277.6846,2477.1096,10.5652,180.1090,0,1);
- AddStaticVehicle(598,2268.9888,2443.1697,10.5662,181.8062,0,1);
- AddStaticVehicle(598,2256.2891,2458.5110,10.5680,358.7335,0,1);
- AddStaticVehicle(598,2251.6921,2477.0205,10.5671,179.5244,0,1);
- AddStaticVehicle(523,2294.7305,2441.2651,10.3860,9.3764,0,0);
- AddStaticVehicle(523,2290.7268,2441.3323,10.3944,16.4594,0,0);
- AddStaticVehicle(523,2295.5503,2455.9656,2.8444,272.6913,0,0);
- AddStaticVehicle(522,2476.7900,2532.2222,21.4416,0.5081,8,82);
- AddStaticVehicle(522,2580.5320,2267.9595,10.3917,271.2372,8,82);
- AddStaticVehicle(522,2814.4331,2364.6641,10.3907,89.6752,36,105);
- AddStaticVehicle(535,2827.4143,2345.6953,10.5768,270.0668,97,1);
- AddStaticVehicle(521,1670.1089,1297.8322,10.3864,359.4936,87,118);
- AddStaticVehicle(487,1614.7153,1548.7513,11.2749,347.1516,58,8);
- AddStaticVehicle(487,1647.7902,1538.9934,11.2433,51.8071,0,8);
- AddStaticVehicle(487,1608.3851,1630.7268,11.2840,174.5517,58,8);
- AddStaticVehicle(476,1283.0006,1324.8849,9.5332,275.0468,7,6);
- AddStaticVehicle(476,1283.5107,1361.3171,9.5382,271.1684,1,6);
- AddStaticVehicle(476,1283.6847,1386.5137,11.5300,272.1003,89,91);
- AddStaticVehicle(476,1288.0499,1403.6605,11.5295,243.5028,119,117);
- AddStaticVehicle(415,1319.1038,1279.1791,10.5931,0.9661,62,1);
- AddStaticVehicle(521,1710.5763,1805.9275,10.3911,176.5028,92,3);
- AddStaticVehicle(521,2805.1650,2027.0028,10.3920,357.5978,92,3);
- AddStaticVehicle(535,2822.3628,2240.3594,10.5812,89.7540,123,1);
- AddStaticVehicle(521,2876.8013,2326.8418,10.3914,267.8946,115,118);
- AddStaticVehicle(429,2842.0554,2637.0105,10.5000,182.2949,1,3);
- AddStaticVehicle(549,2494.4214,2813.9348,10.5172,316.9462,72,39);
- AddStaticVehicle(549,2327.6484,2787.7327,10.5174,179.5639,75,39);
- AddStaticVehicle(549,2142.6970,2806.6758,10.5176,89.8970,79,39);
- AddStaticVehicle(521,2139.7012,2799.2114,10.3917,229.6327,25,118);
- AddStaticVehicle(521,2104.9446,2658.1331,10.3834,82.2700,36,0);
- AddStaticVehicle(521,1914.2322,2148.2590,10.3906,267.7297,36,0);
- AddStaticVehicle(549,1904.7527,2157.4312,10.5175,183.7728,83,36);
- AddStaticVehicle(549,1532.6139,2258.0173,10.5176,359.1516,84,36);
- AddStaticVehicle(521,1534.3204,2202.8970,10.3644,4.9108,118,118);
- AddStaticVehicle(549,1613.1553,2200.2664,10.5176,89.6204,89,35);
- AddStaticVehicle(400,1552.1292,2341.7854,10.9126,274.0815,101,1);
- AddStaticVehicle(404,1637.6285,2329.8774,10.5538,89.6408,101,101);
- AddStaticVehicle(400,1357.4165,2259.7158,10.9126,269.5567,62,1);
- AddStaticVehicle(411,1281.7458,2571.6719,10.5472,270.6128,106,1);
- AddStaticVehicle(522,1305.5295,2528.3076,10.3955,88.7249,3,8);
- AddStaticVehicle(521,993.9020,2159.4194,10.3905,88.8805,74,74);
- AddStaticVehicle(415,1512.7134,787.6931,10.5921,359.5796,75,1);
- AddStaticVehicle(522,2299.5872,1469.7910,10.3815,258.4984,3,8);
- AddStaticVehicle(522,2133.6428,1012.8537,10.3789,87.1290,3,8);
- AddStaticVehicle(411,-2016.0382,1319.4247,7.1875,82.2873,0,1);
- AddStaticVehicle(411,-2046.2378,1315.2559,7.1875,82.2873,0,1);
- AddStaticVehicle(443,-2069.9714,1322.3192,7.0469,82.2873,0,1);
- //Base
- CreateObject(10817, -2357.16, 1393.88, -8.28, 0.00, 0.00, 0.00);
- CreateObject(10816, -2152.10, 1458.33, 4.32, 0.00, 0.00, 0.00);
- CreateObject(11367, -2090.09, 1376.06, -17.42, 0.00, 0.00, 90.00);
- CreateObject(11367, -1857.11, 1336.37, -17.41, 0.00, 0.00, 225.00);
- CreateObject(4570, -1970.20, 1482.73, -46.03, 0.00, 0.00, 0.00);
- CreateObject(11367, -2153.40, 1524.03, -17.52, 0.00, 0.00, 0.00);
- CreateObject(10305, -1970.75, 1613.67, -14.62, 0.00, 0.00, 0.00);
- CreateObject(10305, -2232.05, 1616.22, -14.62, 0.00, 0.00, 180.00);
- CreateObject(10305, -2139.65, 1706.08, -14.60, 0.00, 0.00, 90.00);
- CreateObject(11367, -1996.14, 1541.53, -17.52, 0.00, 0.00, 180.00);
- CreateObject(11367, -2082.26, 1515.34, -17.53, 0.00, 0.00, 0.00);
- CreateObject(11367, -2045.20, 1541.53, -17.54, 0.00, 0.00, 180.00);
- CreateObject(6976, -2279.19, 1542.12, 8.96, 0.00, 0.00, 180.00);
- CreateObject(3095, -2299.36, 1544.95, 17.20, 0.00, 0.00, 0.00);
- CreateObject(10764, -2004.23, 1477.46, 2.00, 0.00, 0.00, 315.00);
- CreateObject(10764, -2007.23, 1477.46, 2.00, 0.00, 0.00, 315.00);
- CreateObject(10764, -2010.23, 1477.46, 2.00, 0.00, 0.00, 315.00);
- CreateObject(10764, -2380.88, 1477.54, 2.00, 0.00, 0.00, 135.00);
- CreateObject(10764, -2377.88, 1477.54, 2.00, 0.00, 0.00, 135.00);
- CreateObject(10764, -2374.88, 1477.54, 2.00, 0.00, 0.00, 135.00);
- CreateObject(8210, -1844.58, 1415.00, 6.44, 0.00, 0.00, 90.00);
- CreateObject(987, -1855.20, 1383.06, 6.00, 0.00, 0.00, 23.03);
- CreateObject(8210, -1882.37, 1363.64, 6.44, 0.00, 0.00, 38.44);
- CreateObject(987, -1860.72, 1380.69, 6.00, 0.00, 0.00, 23.03);
- CreateObject(987, -2016.59, 1334.78, 6.00, 0.00, 0.00, 90.00);
- CreateObject(8210, -2044.32, 1335.04, 6.44, 0.00, 0.00, 0.00);
- CreateObject(987, -2008.54, 1346.81, 6.00, 0.00, 0.00, 0.00);
- CreateObject(10183, -1991.81, 1389.83, 6.21, 0.00, 0.00, 45.00);
- CreateObject(10183, -1951.58, 1389.70, 6.21, 0.00, 0.00, 45.00);
- CreateObject(10183, -1911.32, 1389.61, 6.21, 0.00, 0.00, 45.00);
- CreateObject(10183, -1879.15, 1371.62, 6.25, 0.00, 0.00, 264.00);
- CreateObject(10183, -1855.96, 1405.40, 6.25, 0.00, 0.00, 315.00);
- CreateObject(8210, -2097.05, 1346.77, 6.44, 0.00, 0.00, 335.00);
- CreateObject(8210, -2149.93, 1358.50, 6.44, 0.00, 0.00, 0.00);
- CreateObject(8210, -2205.50, 1358.50, 6.44, 0.00, 0.00, 0.00);
- CreateObject(8210, -2239.40, 1358.51, 6.44, 0.00, 0.00, 0.00);
- CreateObject(8210, -2289.76, 1374.37, 6.44, 0.00, 0.00, 325.00);
- CreateObject(8210, -2339.66, 1396.41, 6.44, 0.00, 0.00, 347.38);
- CreateObject(8210, -2394.55, 1402.48, 6.44, 0.00, 0.00, 0.00);
- CreateObject(8210, -2450.10, 1402.48, 6.44, 0.00, 0.00, 0.00);
- CreateObject(8210, -2505.66, 1402.48, 6.44, 0.00, 0.00, 0.00);
- CreateObject(8210, -2559.70, 1402.49, 6.44, 0.00, 0.00, 0.00);
- CreateObject(987, -2573.44, 1421.02, 5.39, 0.00, 0.00, 225.00);
- CreateObject(987, -2581.79, 1412.65, 5.39, 0.00, 0.00, 242.98);
- CreateObject(3113, -1905.18, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -1916.40, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -1927.67, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -1938.90, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -1950.10, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -1961.00, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -1972.00, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -1983.00, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -1994.00, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -2005.00, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(1215, -1916.30, 1394.07, 13.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1922.70, 1394.07, 13.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1922.70, 1394.07, 12.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1922.70, 1394.07, 11.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1922.70, 1394.07, 10.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1922.70, 1394.07, 9.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1922.70, 1394.07, 8.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1922.70, 1394.07, 7.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1916.30, 1394.07, 12.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1916.30, 1394.07, 11.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1916.30, 1394.07, 10.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1916.30, 1394.07, 9.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1916.30, 1394.07, 8.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1916.30, 1394.07, 7.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1901.45, 1394.07, 13.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1901.45, 1394.07, 12.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1901.45, 1394.07, 11.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1901.45, 1394.07, 10.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1901.45, 1394.07, 9.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1901.45, 1394.07, 8.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1901.45, 1394.07, 7.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -1901.45, 1394.07, 6.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.00, 1394.07, 13.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.00, 1394.07, 12.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.00, 1394.07, 11.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.00, 1394.07, 10.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.00, 1394.07, 9.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.00, 1394.07, 8.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.00, 1394.07, 7.28, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.00, 1394.07, 6.28, 0.00, 0.00, 0.00);
- CreateObject(3113, -2009.00, 1383.00, 13.75, 0.00, 285.00, 0.00);
- CreateObject(5821, -1929.21, 1395.88, 10.40, 0.00, 0.00, 270.00);
- CreateObject(3851, -1933.68, 1374.39, 16.38, 0.00, 0.00, 0.00);
- CreateObject(3113, -2009.00, 1360.40, 13.75, 0.00, 285.00, 0.00);
- CreateObject(1215, -2016.35, 1360.40, 12.73, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.35, 1360.40, 11.73, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.35, 1360.40, 10.73, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.35, 1360.40, 9.73, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.35, 1360.40, 8.73, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.35, 1360.40, 7.73, 0.00, 0.00, 0.00);
- CreateObject(1215, -2016.35, 1360.40, 6.73, 0.00, 0.00, 0.00);
- CreateObject(6976, -1969.54, 1374.66, 15.94, 0.00, 0.00, 0.00);
- CreateObject(6976, -2007.00, 1354.08, 15.94, 0.00, 0.00, 90.00);
- CreateObject(3660, -1910.98, 1393.60, 16.68, 0.00, 0.00, 0.00);
- CreateObject(3660, -1902.43, 1382.51, 16.68, 0.00, 0.00, 90.00);
- CreateObject(3660, -1921.70, 1393.06, 16.68, 0.00, 0.00, 180.00);
- CreateObject(3851, -1933.68, 1385.70, 16.38, 0.00, 0.00, 0.00);
- CreateObject(3278, -1933.66, 1392.82, 18.13, 0.00, 90.00, 90.00);
- CreateObject(2797, -1954.24, 1343.84, 29.30, 0.00, 0.00, 0.00);
- CreateObject(2797, -1954.24, 1345.65, 9.91, 0.00, 0.00, 0.00);
- CreateObject(1523, -1933.66, 1391.31, 14.38, 0.00, 0.00, 90.00);
- CreateObject(1523, -1933.72, 1394.35, 14.38, 0.00, 0.00, 270.00);
- CreateObject(3851, -1939.32, 1394.31, 16.38, 0.00, 0.00, 90.00);
- CreateObject(3851, -1939.32, 1394.31, 20.38, 0.00, 0.00, 90.00);
- CreateObject(3851, -1933.68, 1388.70, 20.38, 0.00, 0.00, 0.00);
- CreateObject(3851, -1933.68, 1377.39, 20.38, 0.00, 0.00, 0.00);
- CreateObject(3113, -1937.36, 1383.00, 21.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -1948.63, 1383.00, 21.75, 0.00, 285.00, 0.00);
- CreateObject(3113, -1971.02, 1383.01, 21.75, 0.00, 285.00, 180.00);
- CreateObject(6976, -2017.83, 1339.49, 5.57, 0.00, 0.00, 90.00);
- CreateObject(3851, -1950.63, 1394.31, 20.38, 0.00, 0.00, 90.00);
- CreateObject(3851, -1950.63, 1394.31, 16.38, 0.00, 0.00, 90.00);
- CreateObject(3851, -1961.94, 1394.31, 20.38, 0.00, 0.00, 90.00);
- CreateObject(3851, -1961.94, 1394.31, 16.38, 0.00, 0.00, 90.00);
- CreateObject(3851, -1974.68, 1377.39, 20.38, 0.00, 0.00, 0.00);
- CreateObject(3851, -1974.68, 1388.70, 20.38, 0.00, 0.00, 0.00);
- CreateObject(3851, -1974.68, 1374.39, 16.38, 0.00, 0.00, 0.00);
- CreateObject(3851, -1974.68, 1385.70, 16.38, 0.00, 0.00, 0.00);
- CreateObject(3278, -1974.67, 1392.82, 18.13, 0.00, 90.00, 90.00);
- CreateObject(3851, -1969.01, 1394.30, 20.38, 0.00, 0.00, 90.00);
- CreateObject(3851, -1969.01, 1394.30, 16.38, 0.00, 0.00, 90.00);
- CreateObject(1523, -1974.64, 1391.31, 14.38, 0.00, 0.00, 90.00);
- CreateObject(1523, -1974.70, 1394.35, 14.38, 0.00, 0.00, 270.00);
- CreateObject(3851, -1959.81, 1392.32, 22.38, 0.00, 90.00, 90.00);
- CreateObject(3851, -1959.81, 1388.32, 22.38, 0.00, 90.00, 90.00);
- CreateObject(3851, -1959.81, 1384.32, 22.38, 0.00, 90.00, 90.00);
- CreateObject(3851, -1959.81, 1380.32, 22.38, 0.00, 90.00, 90.00);
- CreateObject(3851, -1959.81, 1377.57, 22.37, 0.00, 90.00, 90.00);
- CreateObject(3851, -1959.10, 1375.58, 24.25, 0.00, 0.00, 90.00);
- CreateObject(1523, -1953.44, 1373.00, 24.73, 0.00, 0.00, 90.00);
- CreateObject(3851, -1959.10, 1375.59, 25.25, 0.00, 0.00, 90.00);
- CreateObject(3851, -1959.10, 1373.10, 25.25, 0.00, 0.00, 90.00);
- CreateObject(1523, -1953.50, 1375.70, 24.73, 0.00, 0.00, 270.00);
- CreateObject(3278, -1964.75, 1374.35, 23.89, 0.00, 0.00, 90.00);
- CreateObject(3278, -1964.74, 1374.35, 25.76, 0.00, 0.00, 90.00);
- CreateObject(3278, -1963.26, 1374.35, 27.24, 90.00, 0.00, 90.00);
- CreateObject(3278, -1960.26, 1374.35, 27.24, 90.00, 0.00, 90.00);
- CreateObject(3278, -1957.26, 1374.35, 27.24, 90.00, 0.00, 90.00);
- CreateObject(3278, -1954.26, 1374.35, 27.24, 90.00, 0.00, 90.00);
- CreateObject(983, -2295.29, 1546.22, 18.43, 0.00, 0.00, 0.00);
- CreateObject(983, -2298.49, 1549.42, 18.43, 0.00, 0.00, 90.00);
- CreateObject(983, -2298.49, 1541.19, 18.43, 0.00, 0.00, 90.00);
- CreateObject(983, -2015.48, 1352.41, 15.08, 0.00, 0.00, 0.00);
- CreateObject(984, -2009.09, 1349.20, 15.02, 0.00, 0.00, 90.00);
- CreateObject(3660, -1991.01, 1393.60, 16.68, 0.00, 0.00, 0.00);
- CreateObject(983, -1977.95, 1394.23, 15.07, 0.00, 0.00, 90.00);
- CreateObject(3660, -2006.33, 1393.06, 16.68, 0.00, 0.00, 180.00);
- CreateObject(3660, -2015.42, 1382.51, 16.68, 0.00, 0.00, 90.00);
- CreateObject(3660, -2014.88, 1368.36, 16.68, 0.00, 0.00, 270.00);
- CreateObject(18850, -1989.80, 1360.40, 12.08, 0.00, 0.00, 90.00);
- CreateObject(18850, -1915.30, 1360.40, 12.08, 0.00, 0.00, 90.00);
- CreateObject(18850, -1939.00, 1360.40, 12.08, 0.00, 0.00, 90.00);
- CreateObject(18850, -1980.50, 1360.40, 12.05, 0.00, 0.00, 90.00);
- CreateObject(3934, -1965.00, 1360.06, 24.32, 0.00, 0.00, 90.00);
- CreateObject(3278, -1953.44, 1374.10, 23.49, 0.00, 90.00, 90.00);
- CreateObject(14399, -1936.69, 1384.60, 14.40, 0.00, 0.00, 90.00);
- CreateObject(1541, -1938.00, 1380.00, 15.96, 0.00, 0.00, 270.00);
- CreateObject(2350, -1939.59, 1377.99, 14.78, 0.00, 0.00, 90.00);
- CreateObject(2350, -1939.59, 1376.99, 14.78, 0.00, 0.00, 90.00);
- CreateObject(2350, -1939.59, 1375.99, 14.78, 0.00, 0.00, 90.00);
- CreateObject(2350, -1939.59, 1374.99, 14.78, 0.00, 0.00, 90.00);
- CreateObject(2773, -1949.98, 1383.97, 14.91, 0.00, 0.00, 0.00);
- CreateObject(2190, -1959.45, 1382.06, 15.22, 0.00, 0.00, 0.00);
- CreateObject(1281, -1905.32, 1390.22, 15.20, 0.00, 0.00, 45.00);
- CreateObject(1281, -2012.15, 1390.20, 15.20, 0.00, 0.00, 135.00);
- CreateObject(1715, -1959.26, 1374.26, 14.37, 0.00, 0.00, 225.00);
- CreateObject(3851, -1965.39, 1372.83, 16.38, 0.00, 0.00, 0.00);
- CreateObject(3851, -1958.30, 1378.46, 16.38, 0.00, 0.00, 90.00);
- CreateObject(3851, -1951.25, 1372.83, 16.38, 0.00, 0.00, 0.00);
- CreateObject(3851, -1956.88, 1376.46, 18.39, 0.00, 90.00, 90.00);
- CreateObject(3851, -1959.72, 1376.46, 18.38, 0.00, 90.00, 90.00);
- CreateObject(2208, -1962.63, 1383.00, 14.39, 0.00, 0.00, 120.00);
- CreateObject(2208, -1961.41, 1374.40, 14.39, 0.00, 0.00, 45.00);
- CreateObject(3851, -1958.30, 1372.81, 16.38, 0.00, 0.00, 0.00);
- CreateObject(3851, -1959.72, 1372.46, 18.38, 0.00, 90.00, 90.00);
- CreateObject(2208, -1954.80, 1374.40, 14.39, 0.00, 0.00, 135.00);
- CreateObject(1715, -1956.80, 1374.26, 14.37, 0.00, 0.00, 135.00);
- CreateObject(3851, -1956.88, 1372.46, 18.39, 0.00, 90.00, 90.00);
- CreateObject(16782, -1952.90, 1373.20, 16.78, 0.00, 0.00, 90.00);
- CreateObject(16782, -1963.80, 1373.20, 16.78, 0.00, 0.00, 90.00);
- CreateObject(2190, -1959.40, 1376.56, 15.24, 0.00, 0.00, 0.00);
- CreateObject(2190, -1956.29, 1376.28, 15.24, 0.00, 0.00, 315.00);
- CreateObject(1703, -1951.80, 1376.77, 14.36, 0.00, 0.00, 270.00);
- CreateObject(1703, -1964.80, 1374.75, 14.36, 0.00, 0.00, 90.00);
- CreateObject(14804, -1961.77, 1377.95, 15.37, 0.00, 0.00, 30.00);
- CreateObject(14804, -1954.69, 1377.95, 15.37, 0.00, 0.00, 30.00);
- CreateObject(2202, -1965.96, 1378.31, 14.37, 0.00, 0.00, 270.00);
- CreateObject(14813, -1944.56, 1392.02, 14.87, 0.00, 0.00, 270.00);
- CreateObject(2790, -1947.00, 1373.02, 17.88, 0.00, 0.00, 180.00);
- CreateObject(2789, -1940.00, 1373.02, 17.88, 0.00, 0.00, 180.00);
- CreateObject(19175, -1960.60, 1373.10, 17.00, 0.00, 0.00, 180.00);
- CreateObject(19174, -1956.30, 1373.10, 17.00, 0.00, 0.00, 180.00);
- CreateObject(4570, -2072.13, 1418.83, -47.90, 0.00, 350.00, 90.00);
- CreateObject(4570, -2055.42, 1418.83, -47.90, 0.00, 350.00, 90.00);
- CreateObject(2208, -1949.42, 1376.27, 14.39, 0.00, 0.00, 90.00);
- CreateObject(2208, -1949.42, 1379.00, 14.38, 0.00, 0.00, 90.00);
- CreateObject(2208, -1952.06, 1381.61, 14.39, 0.00, 0.00, 0.00);
- CreateObject(2208, -1954.82, 1381.61, 14.38, 0.00, 0.00, 0.00);
- CreateObject(2208, -1957.57, 1381.61, 14.39, 0.00, 0.00, 0.00);
- CreateObject(2208, -1960.32, 1381.61, 14.38, 0.00, 0.00, 0.00);
- CreateObject(2208, -1960.34, 1381.69, 14.38, 0.00, 0.00, 150.00);
- CreateObject(2208, -1963.98, 1385.32, 14.38, 0.00, 0.00, 90.00);
- CreateObject(1825, -1942.64, 1383.01, 14.37, 0.00, 0.00, 0.00);
- CreateObject(1825, -1942.64, 1378.48, 14.37, 0.00, 0.00, 0.00);
- CreateObject(1825, -1946.24, 1380.71, 14.37, 0.00, 0.00, 0.00);
- CreateObject(1825, -1946.34, 1376.17, 14.37, 0.00, 0.00, 0.00);
- CreateObject(2773, -1951.98, 1383.97, 14.91, 0.00, 0.00, 0.00);
- CreateObject(2773, -1953.98, 1383.97, 14.91, 0.00, 0.00, 0.00);
- CreateObject(2773, -1955.98, 1383.97, 14.91, 0.00, 0.00, 0.00);
- CreateObject(2773, -1957.98, 1383.97, 14.91, 0.00, 0.00, 0.00);
- CreateObject(2773, -1959.98, 1383.97, 14.91, 0.00, 0.00, 0.00);
- CreateObject(2190, -1957.45, 1382.06, 15.22, 0.00, 0.00, 0.00);
- CreateObject(2190, -1955.45, 1382.06, 15.22, 0.00, 0.00, 0.00);
- CreateObject(2190, -1953.45, 1382.06, 15.22, 0.00, 0.00, 0.00);
- CreateObject(2190, -1951.45, 1382.06, 15.22, 0.00, 0.00, 0.00);
- CreateObject(2208, -1964.01, 1387.99, 14.39, 0.00, 0.00, 120.00);
- CreateObject(2208, -1965.37, 1390.28, 14.38, 0.00, 0.00, 150.00);
- CreateObject(2208, -1970.30, 1391.56, 14.38, 0.00, 0.00, 0.00);
- return 1;
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- new Tick[MAX_PLAYERS];
- public OnPlayerUpdate(playerid)
- {
- Tick[playerid]++;
- if(Tick[playerid] != 3) return 1;
- Tick[playerid] = 0;
- new Keys,up,down;
- GetPlayerKeys(playerid,Keys,up,down);
- new Float:x,Float:y,Float:z;
- if(Keys &= 1024)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- GetPlayerVelocity(playerid,x,y,z);
- SetPlayerVelocity(playerid,x*1.2,y*1.2,z*1.2);
- }
- }
- else if(Keys &= 4)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);
- SetVehicleVelocity(GetPlayerVehicleID(playerid),x*1.2,y*1.2,z*1.2);
- }
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (PRESSED(KEY_HANDBRAKE)) // Change KEY_HANDBRAKE to your choice of PlayerKeys
- {
- new Float:x, Float:y, Float:z;
- GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
- SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.3);
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new string[64], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"%s has joined the server. Welcome!",pName);
- SendClientMessageToAll(0x8FBC8BFF,string);
- return 1;
- }
- if(player_level[playerid] == -1) { // This check is done, because if a game mode changes, OnPlayerConnect is called for everyone connected and would reset all levels.
- player_level[playerid] = 0; // 0 is set -> player is connected, but not logged in.
- GetPlayerName(playerid,player_names[playerid],MAX_PLAYER_NAME); // Getting the playername and saving it
- public OnPlayerDisconnect(playerid, reason)
- {
- new
- string[64],
- name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- switch(reason)
- {
- case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
- case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
- case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
- }
- SendClientMessageToAll(0xCD5C5CFF,string);
- return 1;
- }
- player_level[playerid] = -1; // the -1 is set -> user isn't logged in anymore
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendDeathMessage(killerid, playerid, reason);
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- dcmd(login,5,cmdtext);
- // dcmd('''command-name''' (without /), '''length of the command''', '''cmdtext''');
- return 0; // This shows SERVER: Unkown Command if there is no command in this script for this, like /login
- }
- dcmd_login(playerid, params[]) {
- if(player_level[playerid] != 0) { // User is logged in
- SendClientMessage(playerid, 0xFFFFFFFF, "You are already logged in.");
- return 1; // We dont need to execute the rest of the function, do we?
- }
- else if(strlen(params) == 0) { // There is no password specified, only /login
- SendClientMessage(playerid, 0xFFFFFFFF, "Please use /login [password]");
- return 1;
- }
- else if(adler32_hash(params) != dini_Int(USERFILE,player_names[playerid])) {
- // There's a password '''hash''' generated and compared to the one from the config file
- SendClientMessage(playerid, 0xFFFFFFFF, "Password mismatch.");
- return 1;
- }
- player_level[playerid] = 1; // Logged in successfully
- SendClientMessage(playerid, 0xFFFFFFFF, "You are now logged in. Have a nice day.");
- return 1;
- }
- adler32_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement