01.07.2016, 08:33
Basically im 100% noob in pawno so can some one help me
Can you see a GM above ? Ok so how to add this below cmd to that above GM?
Код:
/* JJJJJJJJJJJ tttt J:::::::::J ttt:::t J:::::::::J t:::::t JJ:::::::JJ t:::::t J:::::J ooooooooooo ttttttt:::::ttttttt aaaaaaaaaaaaa nnnn nnnnnnnn J:::::J oo:::::::::::oo t:::::::::::::::::t a::::::::::::a n:::nn::::::::nn J:::::Jo:::::::::::::::ot:::::::::::::::::t aaaaaaaaa:::::an::::::::::::::nn J:::::jo:::::ooooo:::::otttttt:::::::tttttt a::::ann:::::::::::::::n J:::::Jo::::o o::::o t:::::t aaaaaaa:::::a n:::::nnnn:::::n JJJJJJJ J:::::Jo::::o o::::o t:::::t aa::::::::::::a n::::n n::::n J:::::J J:::::Jo::::o o::::o t:::::t a::::aaaa::::::a n::::n n::::n J::::::J J::::::Jo::::o o::::o t:::::t tttttta::::a a:::::a n::::n n::::n J:::::::JJJ:::::::Jo:::::ooooo:::::o t::::::tttt:::::ta::::a a:::::a n::::n n::::n JJ:::::::::::::JJ o:::::::::::::::o tt::::::::::::::ta:::::aaaa::::::a n::::n n::::n JJ:::::::::JJ oo:::::::::::oo tt:::::::::::tt a::::::::::aa:::a n::::n n::::n JJJJJJJJJ ooooooooooo ttttttttttt aaaaaaaaaa aaaa nnnnnn nnnnnn Made for SAMP Community. Credits go to all New scripters who want to learn to script :) Credits also go for my clan,and my friends :) */ #include <a_samp> #include <Dini> #include <sscanf2> #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #define COLOR_GREY 0xAFAFAFAA #define COLOR_PURPLE2 0x880088FF #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 LIGHTBLUE 0x0000FFFF #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 YELLOW 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 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 new KillStreak[MAX_PLAYERS]; new Text:Textdraw0; enum gPInfo { Logged, Regged, Level, IsSpecing, Float:X, Float:Y, Float:Z, Float:Ang } new PInfo[MAX_PLAYERS][gPInfo]; main() { print("\n----------------------------------"); print("Basic DM Gamemode by jotan. ---- Loaded ----"); print("----------------------------------\n"); } public OnGameModeInit() { UsePlayerPedAnims(); SetGameModeText("..::DeathMatch::.. v1.0"); AddPlayerClass(0,821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); AddPlayerClass(105, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(106, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(107, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(195, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(114, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(115, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(116, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(28, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(284, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(285, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(102, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(103, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(104, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(13, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(108, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(109, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(11, 821.5563,-1928.0509,12.8672,0,0,0,0,0,0,0); AddPlayerClass(247, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); AddPlayerClass(248, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(254, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(7, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(23, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(17, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); AddPlayerClass(18, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); AddPlayerClass(19, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); AddPlayerClass(219, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); /* V.E.H.I.C.L.E.S */ AddStaticVehicle(411,-2026.2393,125.4055,28.8080,3.0806,75,1); //Infernus in SF AddStaticVehicle(411,2035.304809, 1345.926879, 10.820312,3.152563,0,0); //Infernus on spawn AddStaticVehicle(411,2023.2673,1334.9882,10.1170,271.4494,112,1); // Vehicle AddStaticVehicle(411,2021.5295,1350.9430,9.9074,270.4263,112,1); // Vehicle AddStaticVehicle(411,2033.7583,1375.9498,10.5474,359.9688,112,1); // Vehicle AddStaticVehicle(411,2033.7646,1385.9880,10.5396,359.9889,112,1); // Vehicle AddStaticVehicle(411,2033.7628,1396.0648,10.5474,0.0833,112,1); // Vehicle AddStaticVehicle(411,2033.7479,1405.8835,10.5454,0.0820,112,1); // Vehicle AddStaticVehicle(411,2033.7369,1415.6888,10.5415,0.0917,112,1); // Vehicle AddStaticVehicle(411,2033.7191,1426.2484,10.5474,0.0856,112,1); // Vehicle AddStaticVehicle(411,2033.7070,1435.4868,10.5474,0.0856,112,1); // Vehicle AddStaticVehicle(411,2034.4675,1326.4275,10.5474,0.5493,112,1); // Vehicle AddStaticVehicle(411,2034.5530,1317.4403,10.5474,0.5493,112,1); // Vehicle AddStaticVehicle(411,2034.6183,1310.6328,10.5474,0.5492,112,1); // Vehicle AddStaticVehicle(411,2034.6771,1304.4564,10.5474,0.5492,112,1); // Vehicle AddStaticVehicle(411,2034.8020,1291.4568,10.5474,0.5491,112,1); // Vehicle // LS Infernus 1 AddStaticVehicleEx(567,2489.88500977,-1683.14257812,13.31280708,92.00000000,86,1,15); //Savanna AddStaticVehicleEx(567,2509.79516602,-1687.19824219,13.31280708,49.99951172,86,1,15); //Savanna AddStaticVehicleEx(492,2509.07470703,-1668.79443359,13.28494930,0.00000000,86,105,15); //Greenwood AddStaticVehicleEx(536,2501.96826172,-1656.56408691,13.36101341,62.00000000,86,6,15); //Blade AddStaticVehicleEx(600,2473.42016602,-1691.56213379,13.35622406,0.00000000,86,1,15); //Picador AddStaticVehicleEx(492,2469.53662109,-1671.91943359,13.28494930,12.00000000,86,105,15); //Greenwood AddStaticVehicleEx(419,2482.09057617,-1691.08569336,13.27268410,0.00000000,86,1,15); //Esperanto AddStaticVehicleEx(567,2495.91430664,-1750.33410645,13.44696808,0.00000000,-1,-1,15); //Savanna AddStaticVehicleEx(491,2480.93652344,-1749.15087891,13.44687462,0.00000000,-1,-1,15); //Virgo AddStaticVehicleEx(491,2430.83447266,-1736.74572754,13.44687462,90.00000000,-1,-1,15); //Virgo AddStaticVehicleEx(415,1224.88562012,-1285.46350098,13.38766479,90.00000000,-1,-1,15); //Cheetah AddStaticVehicleEx(509,1926.16210938,-1414.75781250,13.17010975,0.00000000,1,1,15); //Bike AddStaticVehicleEx(509,1921.66210938,-1414.83691406,13.17010975,0.00000000,1,1,15); //Bike AddStaticVehicleEx(509,1916.66210938,-1414.92480469,13.17010975,0.00000000,1,1,15); //Bike AddStaticVehicleEx(481,1924.09594727,-1414.62463379,13.17908859,0.00000000,1,1,15); //BMX AddStaticVehicleEx(481,1919.34594727,-1414.70812988,13.17908859,0.00000000,1,46,15); //BMX AddStaticVehicleEx(521,1914.55603027,-1414.93115234,13.23069000,0.00000000,1,1,15); //FCR-900 AddStaticVehicleEx(521,1947.58923340,-1377.18383789,18.23850250,0.00000000,1,1,15); //FCR-900 AddStaticVehicleEx(461,1956.02685547,-1446.50341797,13.17624474,0.00000000,1,1,15); //PCJ-600 AddStaticVehicleEx(461,1953.27636719,-1446.51635742,13.17624474,0.00000000,1,1,15); //PCJ-600 AddStaticVehicleEx(461,1962.52636719,-1446.47119141,13.17624474,0.00000000,1,1,15); //PCJ-600 AddStaticVehicleEx(522,1881.38317871,-1371.14880371,13.23036003,0.00000000,1,1,15); //NRG-500 AddStaticVehicleEx(517,2002.28942871,-1141.19128418,25.37363625,90.00000000,115,1,15); //Majestic AddStaticVehicleEx(517,2007.10546875,-1130.53552246,25.23521423,90.00000000,115,75,15); //Majestic AddStaticVehicleEx(517,1993.52868652,-1119.14147949,26.70940018,270.00000000,115,75,15); //Majestic AddStaticVehicleEx(566,2012.80114746,-1140.65612793,24.87160110,90.00000000,115,1,15); //Tahoma AddStaticVehicleEx(566,1997.51269531,-1133.13378906,25.29831696,90.00000000,115,8,15); //Tahoma AddStaticVehicleEx(566,1984.13281250,-1140.82128906,25.61098671,90.00000000,115,8,15); //Tahoma AddStaticVehicleEx(550,2434.83715820,-1230.23181152,25.07364464,0.00000000,3,1,15); //Sunrise AddStaticVehicleEx(550,2425.34643555,-1244.85083008,23.92320251,272.00000000,3,1,15); //Sunrise AddStaticVehicleEx(550,2436.62768555,-1242.73388672,23.92320251,175.99951172,3,1,15); //Sunrise AddStaticVehicleEx(549,2430.85351562,-1230.45996094,24.89331818,0.00000000,3,3,15); //Tampa AddStaticVehicleEx(549,2432.08789062,-1243.80761719,24.01326561,0.00000000,3,3,15); //Tampa AddStaticVehicleEx(554,2426.87158203,-1229.74279785,25.16480637,0.00000000,3,1,15); //Yosemite AddStaticVehicleEx(463,2358.77539062,-1371.53063965,23.63937187,96.00000000,113,1,15); //Freeway AddStaticVehicleEx(463,2358.77758789,-1369.28027344,23.63937187,95.99853516,113,1,15); //Freeway AddStaticVehicleEx(463,2358.78002930,-1366.03027344,23.63937187,95.99853516,113,1,15); //Freeway AddStaticVehicleEx(463,2358.78417969,-1361.03027344,23.63937187,95.99853516,113,1,15); //Freeway AddStaticVehicleEx(463,2358.78759766,-1357.53027344,23.63937187,95.99853516,113,1,15); //Freeway AddStaticVehicleEx(586,2358.68579102,-1362.55847168,23.61767387,100.00000000,113,1,15); //Wayfarer AddStaticVehicleEx(586,2358.68334961,-1364.55761719,23.61767387,99.99755859,113,1,15); //Wayfarer AddStaticVehicleEx(586,2358.68872070,-1359.30761719,23.61767387,99.99755859,113,1,15); //Wayfarer AddStaticVehicleEx(586,2358.68164062,-1367.58740234,23.61767387,99.99755859,113,1,15); //Wayfarer AddStaticVehicleEx(596,1535.86791992,-1678.04516602,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1535.79150391,-1670.29492188,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1555.41284180,-1605.86669922,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1559.88159180,-1605.70605469,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(427,1550.49182129,-1606.86059570,13.63081264,0.00000000,1,1,15); //Enforcer AddStaticVehicleEx(601,1605.98901367,-1608.82995605,13.31302166,0.00000000,1,1,15); //S.W.A.T. Van AddStaticVehicleEx(596,1551.98327637,-1623.47937012,13.20281219,270.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1574.35595703,-1605.83398438,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(427,1564.93029785,-1606.73583984,13.63081264,0.00000000,1,1,15); //Enforcer AddStaticVehicleEx(427,1569.93505859,-1606.68212891,13.63081264,0.00000000,1,1,15); //Enforcer AddStaticVehicleEx(596,1546.05224609,-1605.53271484,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1600.06665039,-1684.12170410,5.71062469,272.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1600.14001465,-1687.62854004,5.71062469,271.99951172,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1600.44030762,-1704.70959473,5.71062469,271.99951172,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1588.82775879,-1714.36169434,5.71062469,267.99951172,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1579.57971191,-1714.09130859,5.71062469,269.99499512,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1530.90039062,-1688.29125977,5.71062469,269.99450684,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1545.45898438,-1685.09204102,5.71062469,269.99450684,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1545.29223633,-1681.06323242,5.71062469,269.99450684,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(523,1573.71093750,-1710.58374023,5.55100250,0.00000000,1,1,15); //HPV1000 AddStaticVehicleEx(523,1569.64514160,-1710.77697754,5.55100250,0.00000000,1,1,15); //HPV1000 AddStaticVehicleEx(523,1565.11010742,-1710.85131836,5.55100250,0.00000000,1,1,15); //HPV1000 AddStaticVehicleEx(523,1561.86254883,-1710.98706055,5.55100250,0.00000000,1,1,15); //HPV1000 AddStaticVehicleEx(523,1601.53344727,-1696.16479492,5.55100250,262.00000000,1,1,15); //HPV1000 AddStaticVehicleEx(497,1564.78649902,-1701.35498047,28.65980911,92.00000000,1,1,15); //Police Maverick AddStaticVehicleEx(497,1564.59204102,-1652.28588867,28.65980911,91.99951172,1,1,15); //Police Maverick AddStaticVehicleEx(549,2413.35961914,-1228.04467773,24.30470848,0.00000000,3,3,15); //Tampa AddStaticVehicleEx(549,2409.86279297,-1228.21142578,24.30470848,0.00000000,3,3,15); //Tampa AddStaticVehicleEx(575,2351.26953125,-1158.29272461,26.96267700,92.00000000,6,6,15); //Broadway AddStaticVehicleEx(575,2343.09423828,-1149.84753418,26.76510429,91.99951172,6,6,15); //Broadway AddStaticVehicleEx(576,2357.97924805,-1157.93945312,27.19346809,90.00000000,6,1,15); //Tornado AddStaticVehicleEx(576,2329.81884766,-1158.50146484,26.54687500,90.00000000,6,1,15); //Tornado AddStaticVehicleEx(474,2354.26098633,-1149.57165527,26.94264221,92.00000000,6,1,15); //Hermes AddStaticVehicleEx(474,2366.39868164,-1166.23828125,27.32229233,3.99951172,6,1,15); //Hermes AddStaticVehicleEx(474,2343.96679688,-1158.54479980,26.95337868,91.99902344,6,1,15); //Hermes AddStaticVehicleEx(474,1887.92163086,-2039.63354492,13.29060745,0.00000000,100,1,15); //Hermes AddStaticVehicleEx(474,1888.10363770,-2023.54724121,13.29060745,0.00000000,100,1,15); //Hermes AddStaticVehicleEx(467,1887.84594727,-2032.10522461,13.26060772,0.00000000,100,100,15); //Oceanic AddStaticVehicleEx(467,1878.08129883,-2031.54565430,13.26060772,0.00000000,100,100,15); //Oceanic AddStaticVehicleEx(467,1877.83190918,-2022.77783203,13.26060772,0.00000000,100,100,15); //Oceanic AddStaticVehicleEx(467,1876.82019043,-2044.81677246,13.26060772,338.00000000,100,100,15); //Oceanic AddStaticVehicleEx(474,1878.33276367,-2038.56103516,13.29060745,0.00000000,100,1,15); //Hermes AddStaticVehicleEx(474,1893.34741211,-2047.49707031,13.29060745,78.00000000,100,1,15); //Hermes AddStaticVehicleEx(409,1132.45141602,-2036.83398438,68.93281555,0.00000000,-1,1,15); //Stretch AddStaticVehicleEx(451,1245.52465820,-2041.59301758,59.60423279,0.00000000,-1,-1,15); //Turismo AddStaticVehicleEx(415,1249.57409668,-2041.74035645,59.57167816,0.00000000,-1,-1,15); //Cheetah AddStaticVehicleEx(411,1270.65002441,-2042.59582520,58.91690445,0.00000000,-1,-1,15); //Infernus AddStaticVehicleEx(506,1278.15856934,-2043.27697754,58.81083298,0.00000000,-1,-1,15); //Super GT AddStaticVehicleEx(541,1274.55969238,-2043.50183105,58.76793289,0.00000000,-1,-1,15); //Bullet AddStaticVehicleEx(402,1254.30322266,-2042.63366699,59.51884460,0.00000000,-1,-1,15); //Buffalo AddStaticVehicleEx(487,1957.83557129,-984.24023438,53.79674911,204.00000000,-1,-1,15); //Maverick AddStaticVehicleEx(417,1576.10192871,-1016.11730957,31.24693108,104.00000000,-1,-1,15); //Leviathan AddStaticVehicleEx(487,2661.25097656,-1548.14697266,31.63764954,90.00000000,-1,-1,15); //Maverick AddStaticVehicleEx(413,2622.27050781,-1485.41137695,16.89968872,0.00000000,-1,-1,15); //Pony AddStaticVehicleEx(499,2617.63574219,-1485.23205566,16.68308449,0.00000000,-1,-1,15); //Benson AddStaticVehicleEx(487,2521.45629883,-1528.66943359,24.86550522,179.99993896,-1,-1,15); //Maverick AddStaticVehicleEx(548,1678.43713379,-1509.37707520,20.50335884,92.00000000,-1,-1,15); //Cargobob AddStaticVehicleEx(563,1765.94799805,-2287.23632812,27.68177223,0.00000000,-1,-1,15); //Raindance AddStaticVehicleEx(511,2033.09765625,-2493.73266602,15.05501556,90.00000000,-1,-1,15); //Beagle AddStaticVehicleEx(511,2042.98583984,-2593.27099609,15.05501556,90.00000000,-1,-1,15); //Beagle AddStaticVehicleEx(519,1978.77844238,-2632.68676758,14.54694748,0.00000000,-1,-1,15); //Shamal AddStaticVehicleEx(519,1938.17236328,-2633.36206055,14.54694748,0.00000000,-1,-1,15); //Shamal AddStaticVehicleEx(519,2028.04772949,-2632.56933594,14.54694748,0.00000000,-1,-1,15); //Shamal AddStaticVehicleEx(519,1750.86853027,-2457.01025391,14.55475998,179.99993896,-1,-1,15); //Shamal AddStaticVehicleEx(519,1793.84997559,-2455.57568359,14.55475998,179.99450684,-1,-1,15); //Shamal AddStaticVehicleEx(519,1693.06958008,-2457.59326172,14.55475998,179.99450684,-1,-1,15); //Shamal AddStaticVehicleEx(553,1438.70739746,-2446.87475586,15.78968716,179.99993896,-1,-1,15); //Nevada AddStaticVehicleEx(553,1479.21142578,-2448.95092773,15.78968716,179.99450684,-1,-1,15); //Nevada AddStaticVehicleEx(577,1469.91613770,-2492.79956055,12.55468750,270.00000000,-1,-1,15); //AT-400 AddStaticVehicleEx(592,1496.31860352,-2629.93823242,12.54687500,270.00000000,-1,-1,15); //Andromada AddStaticVehicleEx(592,1576.26428223,-2596.20141602,12.54687500,270.00000000,-1,-1,15); //Andromada Textdraw0 = TextDrawCreate(371.000000, 428.000000, "www.changeme.com"); TextDrawBackgroundColor(Textdraw0, 255); TextDrawFont(Textdraw0, 0); TextDrawLetterSize(Textdraw0, 0.759999, 1.800000); TextDrawColor(Textdraw0, -65281); TextDrawSetOutline(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid,821.5563,-1928.0509,12.8672); SetPlayerCameraPos(playerid, 826.1841,-1927.9393,12.8672); SetPlayerCameraLookAt(playerid, 821.5563,-1928.0509,12.8672); return 1; } public OnPlayerConnect(playerid) { TextDrawShowForPlayer(playerid,Textdraw0); KillStreak[playerid] = 0; new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "%s has joined the server", pname); SendClientMessageToAll(0x008000FF, string); SendClientMessage(playerid,COLOR_RED,"---------------------------------------------"); SendClientMessage(playerid,COLOR_RED,"*********************************************"); SendClientMessage(playerid,COLOR_LIMEGREEN,"Welcome to DM SERVER"); SendClientMessage(playerid,COLOR_LIMEGREEN,"To get started use /help and read /rules"); SendClientMessage(playerid,COLOR_RED,"---------------------------------------------"); SendClientMessage(playerid,COLOR_RED,"**********************************************"); PInfo[playerid][Logged] = 0; PInfo[playerid][Regged] = 0; PInfo[playerid][Level] = 0; new n[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid,n,sizeof(n)); format(file,sizeof(file),"MyAdmin/Users/%s.txt",n); if(dini_Exists(file)) // Works. { SendClientMessage(playerid,LIGHTBLUE,"You are registered, Please /login!"); PInfo[playerid][Regged] = 1; PInfo[playerid][Logged] = 0; TogglePlayerControllable(playerid,0); return 1; } if(!dini_Exists(file)) // Works. { SendClientMessage(playerid,LIGHTBLUE,"You are not registered, Please /register!"); PInfo[playerid][Regged] = 0; PInfo[playerid][Logged] = 0; TogglePlayerControllable(playerid,0); return 1; } return 1; } public OnPlayerDisconnect(playerid, reason) { KillStreak[playerid] = 0; new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); switch(reason) { case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", pname); case 1: format(string, sizeof(string), "%s has left the server.)", pname); case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pname); } SendClientMessageToAll(0x008000FF, string); new n[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid,n,sizeof(n)); format(file,sizeof(file),"MyAdmin/Users/%s.txt",n); PInfo[playerid][Logged] = 0; // if(dini_Exists(file)) { dini_IntSet(file,"Logged",0); return 1; // Same here. } return 1; } public OnPlayerSpawn(playerid) { if(PInfo[playerid][IsSpecing] == 1) // If the player is still spectating { PInfo[playerid][IsSpecing] = 0; // Player is no longer spectating SetPlayerPos(playerid, PInfo[playerid][X], PInfo[playerid][Y], PInfo[playerid][Z]); // Setting the player to the old x y z SetPlayerFacingAngle(playerid, PInfo[playerid][Ang]); // Setting the player to the correct facing angle... ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 28, 200); } GivePlayerWeapon(playerid, 26, 200); return 1; } public OnPlayerDeath(playerid, killerid, reason) { if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID ) { if(GetPlayerWantedLevel(killerid) < 6) { SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1); } KillStreak[killerid] ++; GivePlayerMoney(killerid, 500); } SetPlayerWantedLevel(playerid, 0); KillStreak[playerid] = 0; SetPlayerScore(killerid,GetPlayerScore(killerid)+1); new str[ 256 ], KillerName[MAX_PLAYER_NAME]; //here, you're defining a string and the killername GetPlayerName(killerid, KillerName, sizeof(KillerName)); //receive the information of the killer's name switch(KillStreak[killerid]) { case 2: format(str, sizeof(str), "[KILLINGSPREE] ~g~%s has performed a ~y~double kill!", KillerName); case 3: format(str, sizeof(str), "[KILLINGSPREE] ~y~Triple Kill for ~b~%s!", KillerName); case 4: format(str, sizeof(str), "[KILLINGSPREE] ~p~Fourth Kill for ~r~%s!", KillerName); case 5: format(str, sizeof(str), "[KILLINGSPREE] ~r~%s is dominating with ~p~five kills!", KillerName); case 6: format(str, sizeof(str), "[KILLINGSPREE] ~w~%s is epic !! Imagine that !! ~y~six kills!", KillerName); case 7: format(str, sizeof(str), "[KILLINGSPREE] ~r~Epic luck for %s with ~w~seven kills!", KillerName); case 8: format(str, sizeof(str), "[KILLINGSPREE] ~p~%s is Amazing Killer with ~y~eight kills!", KillerName); case 9: format(str, sizeof(str), "[KILLINGSPREE] ~g~%s is Profesional !! ~b~nine kills!", KillerName); case 10: format(str, sizeof(str), "[KILLINGSPREE] ~b~%s is annihilating ! ~g~ten kills!", KillerName); } GameTextForAll(str,4000,4); new string[128]; GivePlayerMoney(killerid, 10000); format(string, sizeof(string), "You have received 10 000.You have %d $.", GetPlayerMoney(killerid)); SendClientMessage(killerid, COLOR_RED, string); } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(login,5,cmdtext); dcmd(setlevel, 8, cmdtext); dcmd(ban, 3, cmdtext); dcmd(freeze, 6, cmdtext); dcmd(unfreeze, 8, cmdtext); dcmd(kick, 4, cmdtext); dcmd(sgod, 4, cmdtext); dcmd(god, 3, cmdtext); dcmd(explode, 7,cmdtext); dcmd(acmds,5,cmdtext); dcmd(akill,5,cmdtext); dcmd(jetpack,7,cmdtext); dcmd(disarm,6,cmdtext); dcmd(eject,5,cmdtext); dcmd(repair,6,cmdtext); dcmd(spec,4,cmdtext); dcmd(specoff,7,cmdtext); dcmd(pm,2,cmdtext); dcmd(cargod,6,cmdtext); dcmd(kill,4,cmdtext); dcmd(aheal,5,cmdtext); dcmd(givecash,8,cmdtext); dcmd(gc,2,cmdtext); dcmd(admins,6,cmdtext); dcmd(goto,4,cmdtext); dcmd(get,3,cmdtext); dcmd(setcash,7,cmdtext); dcmd(setname,7,cmdtext); new cmd[256], idx; cmd = strtok(cmdtext, idx); dcmd(register,8,cmdtext); if (strcmp("/help", cmdtext, true, 4) == 0) { SendClientMessage(playerid,COLOR_RED,"This is an DeathMatch gamemode."); SendClientMessage(playerid,COLOR_RED,"Your goal is to kill other players and get score and money"); SendClientMessage(playerid,COLOR_GREEN,"Register at our website : changeme"); SendClientMessage(playerid,COLOR_BLUE,"To see list of commands use /cmds "); return 1; } if (strcmp("/kill", cmdtext, true, 4) == 0) { SetPlayerHealth(playerid, 0); return 1; } if (strcmp("/heal", cmdtext, true, 7) == 0) { if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_RED, "ERROR : You dont have enough money!"); { GivePlayerMoney(playerid, -1000); SetPlayerHealth(playerid,100); } return 1; } if (strcmp("/cmds", cmdtext, true, 4) == 0) { SendClientMessage(playerid,COLOR_RED,"---------------------Commands----------------------"); SendClientMessage(playerid,COLOR_RED,"Current commands are:"); SendClientMessage(playerid,COLOR_GREEN," /kill /help /heal"); SendClientMessage(playerid,COLOR_BLUE,"/sf / lv /ls "); return 1; } if (strcmp("/sf", cmdtext, true, 2) == 0) { SetPlayerPos(playerid,-2039.7689,135.6302,28.8359); SetPlayerVirtualWorld(playerid, 0); SendClientMessage(playerid, 0x00FFFFAA, "You have been teleported to San Fierro."); return 1; } if (strcmp("/ls", cmdtext, true, 2) == 0) { SetPlayerPos(playerid,2490.6665,-1669.7076,13.3359); SetPlayerVirtualWorld(playerid, 0); SendClientMessage(playerid, 0x00FFFFAA, "You have been teleported to Los Santos."); return 1; } if (strcmp("/lv", cmdtext, true, 2) == 0) { SetPlayerPos(playerid,1907.0464,960.0598,10.8203); SetPlayerVirtualWorld(playerid, 0); SendClientMessage(playerid, 0x00FFFFAA, "You have been teleported to Las Venturas."); return 1; } if (strcmp("/RDM", cmdtext, true, 3) == 0) { SetPlayerPos(playerid,-1285.1356,458.6940,7.1875); SetPlayerVirtualWorld(playerid, 1337); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 28, 99999); GivePlayerWeapon(playerid, 26, 99999); SendClientMessage(playerid, 0x00FFFFAA, "Welcome to Runnies DeathMatch zone.To quit use /cancel."); return 1; } if (strcmp("/WDM", cmdtext, true, 3) == 0) { SetPlayerPos(playerid,-1285.1356,458.6940,7.1875); SetPlayerVirtualWorld(playerid, 1338); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 24, 99999); GivePlayerWeapon(playerid, 27, 99999); GivePlayerWeapon(playerid, 29, 99999); GivePlayerWeapon(playerid, 31, 99999); SendClientMessage(playerid, 0x00FFFFAA, "Welcome to Walkies DeathMatch zone.To quit use /cancel."); return 1; } if (strcmp("/cancel", cmdtext, true, 5) == 0) { SetPlayerVirtualWorld(playerid, 0); SetPlayerHealth(playerid, 0); return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { 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) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } dcmd_setlevel(playerid,params[]) { new level,id,file[256],n[MAX_PLAYER_NAME];//creating the new variabls new tmp[256], tmp2[256], Index,str[50];// creating the new variables tmp = strtok(params,Index), tmp2 = strtok(params,Index),id = strval(tmp),level = strval(tmp2);// setting them to strtok so we can use them as parameters of our command GetPlayerName(id,n,MAX_PLAYER_NAME);//getting the players name format(file,sizeof(file),"MyAdmin/Users/%s.txt",n);//formatting the file if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not an RCON admin!");//if the player is not rcon admin if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /setlevel <ID> <Level>");// if the string is empty if(!IsPlayerConnected(id))return SendClientMessage(playerid,COLOR_RED,"You have entered an incorrect ID"); //if the id is not connected PInfo[id][Level] = level;//sets the level of the player dini_IntSet(file,"Level",level);//saves the new level to the file format(str,sizeof(str),"[AdminInfo]You have set %s's level to %d",n,level);//creates the string SendClientMessage(playerid,LIGHTBLUE,str); return 1; } dcmd_kick(playerid,params[]) { new id,n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /kick <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"%s has kicked %s",n,on); SendClientMessageToAll(LIGHTBLUE,str); Kick(id); return 1; } dcmd_disarm(playerid,params[]) { new id,n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,ORANGE,"You need to be level 2 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /disarm <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"[AdminInfo] %s has disarmed %s.",n,on); SendClientMessageToAll(COLOR_RED,str); ResetPlayerWeapons(id); return 1; } dcmd_givecash(playerid,params[]) { new id,n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"You need to be level12 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /givecash <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"[AdminInfo] %s has gave cash to %s.",n,on); SendClientMessageToAll(COLOR_RED,str); GivePlayerMoney(playerid,1000000); return 1; } dcmd_ban(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /ban <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"[AdminInfo]%s has banned %s",n,on); SendClientMessageToAll(COLOR_RED,str); Ban(id); return 1; } dcmd_freeze(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /freeze <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"[AdminInfo] %s has freezed %s",n,on); SendClientMessageToAll(COLOR_RED,str); TogglePlayerControllable(id,0); return 1; } dcmd_specoff(playerid,params[]) { #pragma unused params if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,ORANGE,"You need to be level 2 to use this command!"); if(PInfo[playerid][IsSpecing] == 0) return SendClientMessage(playerid, ORANGE, "You are not spectating anyone!"); TogglePlayerSpectating(playerid, 0); return 1; } dcmd_spec(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,ORANGE,"You need to be level 2 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /spec <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); GetPlayerPos(playerid, PInfo[playerid][X], PInfo[playerid][Y], PInfo[playerid][Z]); GetPlayerFacingAngle(playerid, PInfo[playerid][Ang]); TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, id); new message[100]; format(message, sizeof(message), "Note: You are now spectating player %d", id); SendClientMessage(playerid, ORANGE, message); PInfo[playerid][IsSpecing] = 1; return 1; } dcmd_pm(playerid, params[]) { new target, msg[128], tmp[128], name[MAX_PLAYER_NAME]; if(sscanf(params, "us[128]", target, msg)) return SendClientMessage(playerid, -1, "Syntax: /pm ID Message"); if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1, "The selected player is not online."); GetPlayerName(playerid, name, sizeof(name)); format(tmp, sizeof(tmp), "[PM] %s says: %s", name, msg); SendClientMessage(target, -1, tmp); return 1; } dcmd_setcash(playerid, params[]) { new targetid, money; if(sscanf(params, "ui", targetid, money)) return SendClientMessage(playerid, 0xFF0000, "Usage: /setcash [PlayerID/Part of Name] [Amount]"); ResetPlayerMoney(targetid); GivePlayerMoney(targetid, money); new str[128]; format(str, sizeof(str), "You have set Player's ID %i money to %i", targetid, money); SendClientMessage(playerid, -1, str); format(str, sizeof(str), "Player ID %i has set your money to %i", playerid, money); SendClientMessage(targetid, -1, str); return 1; } dcmd_gc(playerid, params[]) { new targetid, money; if(sscanf(params, "ui", targetid, money)) return SendClientMessage(playerid, 0xFF0000, "Usage: /givemoney [PlayerID/Part of Name] [Amount]"); if(GetPlayerMoney(playerid) < money) return SendClientMessage(playerid, 0xFF0000, "You don't have enough cash!"); GivePlayerMoney(targetid, money); GivePlayerMoney(playerid, -money); new str[128]; format(str, sizeof(str), "You gave $%i to Player ID %i!", money, targetid); SendClientMessage(playerid, -1, str); format(str, sizeof(str), "Player ID %i gave you $%i!", playerid, money); SendClientMessage(targetid, -1, str); return 1; } dcmd_setname(playerid, params[]) { new targetid, name[MAX_PLAYER_NAME]; if(sscanf(params, "us[MAX_PLAYER_NAME]", targetid, name)) return SendClientMessage(playerid, 0xFF0000, "Usage: /setname [PlayerID/Part of Name] [New Name]"); SetPlayerName(targetid, name); new str[128]; format(str, sizeof(str), "You have set Player's ID %i name to %s!", targetid, name); SendClientMessage(playerid, -1, str); format(str, sizeof(str), "Admin ID %i has changed your name to %s!", playerid, name); SendClientMessage(targetid, -1, str); return 1; } dcmd_admins(playerid, params[]) { #pragma unused params new count; new str[80]; new name[MAX_PLAYER_NAME]; SendClientMessage(playerid, -1, "~~Online Administrators~~"); SendClientMessage(playerid, -1, " "); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PInfo[i][Level] >= 1) { count++; GetPlayerName(i, name, sizeof(name)); format(str, sizeof(str), "%s Level: %i", name, PInfo[i][Level]); SendClientMessage(playerid, -1, str); } } } if(count == 0) SendClientMessage(playerid, -1, "!No Administrators online!"); SendClientMessage(playerid, -1, "________________________________________"); return 1; } dcmd_eject(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[128]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /eject <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); if(!IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] The selected player is not in vehicle."); format(str,sizeof(str),"[AdminInfo] %s has ejected %s from his vehicle.",n,on); SendClientMessageToAll(COLOR_RED,str); RemovePlayerFromVehicle(id); return 1; } dcmd_unfreeze(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[128]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /freeze <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"[AdminInfo] %s has unfreezed %s",n,on); SendClientMessageToAll(COLOR_RED,str); TogglePlayerControllable(id,1); return 1; } dcmd_goto(playerid,params[]) { new id; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,ORANGE,"You need to be level 2 to use this command!"); // If the player isn't level two he/she can't use it if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /goto <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); new Float:PosX, Float:PosY, Float:PosZ; GetPlayerPos(id, PosX, PosY, PosZ); SetPlayerPos(playerid, PosX, PosY, PosZ); return 1; } dcmd_get(playerid,params[]) { new id; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"You need to be level 1 to use this command!"); // If the player isn't level two he/she can't use it if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /get <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); new Float:PosX, Float:PosY, Float:PosZ; GetPlayerPos(playerid, PosX, PosY, PosZ); SetPlayerPos(id, PosX, PosY, PosZ); return 1; } dcmd_acmds(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"You need to be Admin to use this command!"); SendClientMessage(playerid,COLOR_RED,"[AdminInfo]: Admin commands are: /god /explode /freeze /unfreeze"); SendClientMessage(playerid,COLOR_RED,"[AdminInfo]:/ban /kick /jetpack /disarm /spec /specoff"); SendClientMessage(playerid,COLOR_RED,"[AdminInfo]: /destroycar /eject /repair /aheal /setcash /repair /akill"); return 1; } dcmd_sgod(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 5) return SendClientMessage(playerid,ORANGE,"You need to be level 5 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /sgod <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); SetPlayerHealth(id,10000); return 1; } dcmd_god(playerid,params[]) { #pragma unused params if(PInfo[playerid][Level] < 5) return SendClientMessage(playerid,ORANGE,"You need to be level 5 to use this command!"); SetPlayerHealth(playerid,10000); return 1; } dcmd_jetpack(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 1 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] USAGE: /jetpack <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] Invalid ID"); SetPlayerSpecialAction(id, 2 ); return 1; } dcmd_akill(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 1 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo]Usage: /akill <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo]Invalid ID"); SetPlayerHealth(id,0); return 1; } dcmd_repair(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 1 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo]Usage: /repair <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo]Invalid ID"); GetPlayerVehicleID(playerid); RepairVehicle(playerid); return 1; } dcmd_cargod(playerid,params[]) { if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo]Usage: /cargod <ID> "); GetPlayerVehicleID(playerid); SetVehicleHealth(playerid,1000000); return 1; } dcmd_aheal(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 1 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] USAGE: /aheal <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] Invalid ID"); SetPlayerHealth(id,100); return 1; } dcmd_explode(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 1 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] USAGE: /explode <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] Invalid ID"); new Float:pX,Float:pY,Float:pZ; // I think the way dcmd works it conflicts with enum vars anyhow lets test GetPlayerPos(id, pX, pY, pZ); SetPlayerPos(id, pX, pY, pZ); CreateExplosion(Float:pX, Float:pY, Float:pZ,0,10); return 1; } dcmd_kill(playerid,params[]) { #pragma unused params SetPlayerHealth(playerid,0); SendClientMessage(playerid,COLOR_RED,"You have killed yourself."); return 1; } dcmd_register(playerid,params[]) { new file[256],n[MAX_PLAYER_NAME]; GetPlayerName(playerid,n,MAX_PLAYER_NAME); format(file,sizeof(file),"MyAdmin/Users/%s.txt",n); if(dini_Exists(file)) return SendClientMessage(playerid,YELLOW,"You are already registered!"); if(PInfo[playerid][Regged] == 1) return SendClientMessage(playerid,LIGHTBLUE,"You are already registered!"); if(PInfo[playerid][Logged] == 1) return SendClientMessage(playerid,ORANGE,"You are already registered, and logged in!"); if(strlen(params)) { if(!dini_Exists(file)) { dini_Create(file); dini_Set(file,"Password",params); dini_IntSet(file,"Regged",1); dini_IntSet(file,"Logged",0); dini_IntSet(file,"Level",0); SendClientMessage(playerid,LIGHTBLUE,"Congratulations, you have just registered, please /login"); PInfo[playerid][Regged] = 1; return 1; } } else { SendClientMessage(playerid,COLOR_RED,"USAGE: /register <Password>"); return 1; } return 1; } dcmd_login(playerid,params[]) { new file[256],n[MAX_PLAYER_NAME]; GetPlayerName(playerid,n,MAX_PLAYER_NAME); format(file,sizeof(file),"MyAdmin/Users/%s.txt",n); if(!dini_Exists(file)) return SendClientMessage(playerid,YELLOW,"You are not registered! Please /register"); if(PInfo[playerid][Logged] == 1) return SendClientMessage(playerid,LIGHTBLUE,"You are already logged in!"); if(PInfo[playerid][Regged] == 0) return SendClientMessage(playerid,ORANGE,"You are not registered! Please /register"); if(strlen(params)) { new pass[256]; pass = dini_Get(file,"Password"); if(dini_Exists(file)) { if(strcmp(params,pass,false) != 0) { SendClientMessage(playerid,COLOR_RED,"Wrong Password!"); } else { dini_IntSet(file,"Logged",1); PInfo[playerid][Logged] = 1; PInfo[playerid][Level] = dini_Int(file,"Level"); SendClientMessage(playerid,YELLOW,"You have now logged in!"); TogglePlayerControllable(playerid,1); return 1; } } } else { SendClientMessage(playerid,COLOR_RED,"USAGE: /login <Password>"); return 1; } return 1; } strtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; } RAW Paste Data /* JJJJJJJJJJJ tttt J:::::::::J ttt:::t J:::::::::J t:::::t JJ:::::::JJ t:::::t J:::::J ooooooooooo ttttttt:::::ttttttt aaaaaaaaaaaaa nnnn nnnnnnnn J:::::J oo:::::::::::oo t:::::::::::::::::t a::::::::::::a n:::nn::::::::nn J:::::Jo:::::::::::::::ot:::::::::::::::::t aaaaaaaaa:::::an::::::::::::::nn J:::::jo:::::ooooo:::::otttttt:::::::tttttt a::::ann:::::::::::::::n J:::::Jo::::o o::::o t:::::t aaaaaaa:::::a n:::::nnnn:::::n JJJJJJJ J:::::Jo::::o o::::o t:::::t aa::::::::::::a n::::n n::::n J:::::J J:::::Jo::::o o::::o t:::::t a::::aaaa::::::a n::::n n::::n J::::::J J::::::Jo::::o o::::o t:::::t tttttta::::a a:::::a n::::n n::::n J:::::::JJJ:::::::Jo:::::ooooo:::::o t::::::tttt:::::ta::::a a:::::a n::::n n::::n JJ:::::::::::::JJ o:::::::::::::::o tt::::::::::::::ta:::::aaaa::::::a n::::n n::::n JJ:::::::::JJ oo:::::::::::oo tt:::::::::::tt a::::::::::aa:::a n::::n n::::n JJJJJJJJJ ooooooooooo ttttttttttt aaaaaaaaaa aaaa nnnnnn nnnnnn Made for SAMP Community. Credits go to all New scripters who want to learn to script :) Credits also go for my clan,and my friends :) */ #include <a_samp> #include <Dini> #include <sscanf2> #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #define COLOR_GREY 0xAFAFAFAA #define COLOR_PURPLE2 0x880088FF #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 LIGHTBLUE 0x0000FFFF #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 YELLOW 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 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 new KillStreak[MAX_PLAYERS]; new Text:Textdraw0; enum gPInfo { Logged, Regged, Level, IsSpecing, Float:X, Float:Y, Float:Z, Float:Ang } new PInfo[MAX_PLAYERS][gPInfo]; main() { print("\n----------------------------------"); print("Basic DM Gamemode by jotan. ---- Loaded ----"); print("----------------------------------\n"); } public OnGameModeInit() { UsePlayerPedAnims(); SetGameModeText("..::DeathMatch::.. v1.0"); AddPlayerClass(0,821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); AddPlayerClass(105, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(106, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(107, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(195, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(114, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(115, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(116, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(28, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(284, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(285, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(102, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(103, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(104, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(13, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(108, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(109, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(11, 821.5563,-1928.0509,12.8672,0,0,0,0,0,0,0); AddPlayerClass(247, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); AddPlayerClass(248, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(254, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(7, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(23, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0, 0,0); AddPlayerClass(17, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); AddPlayerClass(18, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); AddPlayerClass(19, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); AddPlayerClass(219, 821.5563,-1928.0509,12.8672, 0, 0, 0, 0, 0,0,0); /* V.E.H.I.C.L.E.S */ AddStaticVehicle(411,-2026.2393,125.4055,28.8080,3.0806,75,1); //Infernus in SF AddStaticVehicle(411,2035.304809, 1345.926879, 10.820312,3.152563,0,0); //Infernus on spawn AddStaticVehicle(411,2023.2673,1334.9882,10.1170,271.4494,112,1); // Vehicle AddStaticVehicle(411,2021.5295,1350.9430,9.9074,270.4263,112,1); // Vehicle AddStaticVehicle(411,2033.7583,1375.9498,10.5474,359.9688,112,1); // Vehicle AddStaticVehicle(411,2033.7646,1385.9880,10.5396,359.9889,112,1); // Vehicle AddStaticVehicle(411,2033.7628,1396.0648,10.5474,0.0833,112,1); // Vehicle AddStaticVehicle(411,2033.7479,1405.8835,10.5454,0.0820,112,1); // Vehicle AddStaticVehicle(411,2033.7369,1415.6888,10.5415,0.0917,112,1); // Vehicle AddStaticVehicle(411,2033.7191,1426.2484,10.5474,0.0856,112,1); // Vehicle AddStaticVehicle(411,2033.7070,1435.4868,10.5474,0.0856,112,1); // Vehicle AddStaticVehicle(411,2034.4675,1326.4275,10.5474,0.5493,112,1); // Vehicle AddStaticVehicle(411,2034.5530,1317.4403,10.5474,0.5493,112,1); // Vehicle AddStaticVehicle(411,2034.6183,1310.6328,10.5474,0.5492,112,1); // Vehicle AddStaticVehicle(411,2034.6771,1304.4564,10.5474,0.5492,112,1); // Vehicle AddStaticVehicle(411,2034.8020,1291.4568,10.5474,0.5491,112,1); // Vehicle // LS Infernus 1 AddStaticVehicleEx(567,2489.88500977,-1683.14257812,13.31280708,92.00000000,86,1,15); //Savanna AddStaticVehicleEx(567,2509.79516602,-1687.19824219,13.31280708,49.99951172,86,1,15); //Savanna AddStaticVehicleEx(492,2509.07470703,-1668.79443359,13.28494930,0.00000000,86,105,15); //Greenwood AddStaticVehicleEx(536,2501.96826172,-1656.56408691,13.36101341,62.00000000,86,6,15); //Blade AddStaticVehicleEx(600,2473.42016602,-1691.56213379,13.35622406,0.00000000,86,1,15); //Picador AddStaticVehicleEx(492,2469.53662109,-1671.91943359,13.28494930,12.00000000,86,105,15); //Greenwood AddStaticVehicleEx(419,2482.09057617,-1691.08569336,13.27268410,0.00000000,86,1,15); //Esperanto AddStaticVehicleEx(567,2495.91430664,-1750.33410645,13.44696808,0.00000000,-1,-1,15); //Savanna AddStaticVehicleEx(491,2480.93652344,-1749.15087891,13.44687462,0.00000000,-1,-1,15); //Virgo AddStaticVehicleEx(491,2430.83447266,-1736.74572754,13.44687462,90.00000000,-1,-1,15); //Virgo AddStaticVehicleEx(415,1224.88562012,-1285.46350098,13.38766479,90.00000000,-1,-1,15); //Cheetah AddStaticVehicleEx(509,1926.16210938,-1414.75781250,13.17010975,0.00000000,1,1,15); //Bike AddStaticVehicleEx(509,1921.66210938,-1414.83691406,13.17010975,0.00000000,1,1,15); //Bike AddStaticVehicleEx(509,1916.66210938,-1414.92480469,13.17010975,0.00000000,1,1,15); //Bike AddStaticVehicleEx(481,1924.09594727,-1414.62463379,13.17908859,0.00000000,1,1,15); //BMX AddStaticVehicleEx(481,1919.34594727,-1414.70812988,13.17908859,0.00000000,1,46,15); //BMX AddStaticVehicleEx(521,1914.55603027,-1414.93115234,13.23069000,0.00000000,1,1,15); //FCR-900 AddStaticVehicleEx(521,1947.58923340,-1377.18383789,18.23850250,0.00000000,1,1,15); //FCR-900 AddStaticVehicleEx(461,1956.02685547,-1446.50341797,13.17624474,0.00000000,1,1,15); //PCJ-600 AddStaticVehicleEx(461,1953.27636719,-1446.51635742,13.17624474,0.00000000,1,1,15); //PCJ-600 AddStaticVehicleEx(461,1962.52636719,-1446.47119141,13.17624474,0.00000000,1,1,15); //PCJ-600 AddStaticVehicleEx(522,1881.38317871,-1371.14880371,13.23036003,0.00000000,1,1,15); //NRG-500 AddStaticVehicleEx(517,2002.28942871,-1141.19128418,25.37363625,90.00000000,115,1,15); //Majestic AddStaticVehicleEx(517,2007.10546875,-1130.53552246,25.23521423,90.00000000,115,75,15); //Majestic AddStaticVehicleEx(517,1993.52868652,-1119.14147949,26.70940018,270.00000000,115,75,15); //Majestic AddStaticVehicleEx(566,2012.80114746,-1140.65612793,24.87160110,90.00000000,115,1,15); //Tahoma AddStaticVehicleEx(566,1997.51269531,-1133.13378906,25.29831696,90.00000000,115,8,15); //Tahoma AddStaticVehicleEx(566,1984.13281250,-1140.82128906,25.61098671,90.00000000,115,8,15); //Tahoma AddStaticVehicleEx(550,2434.83715820,-1230.23181152,25.07364464,0.00000000,3,1,15); //Sunrise AddStaticVehicleEx(550,2425.34643555,-1244.85083008,23.92320251,272.00000000,3,1,15); //Sunrise AddStaticVehicleEx(550,2436.62768555,-1242.73388672,23.92320251,175.99951172,3,1,15); //Sunrise AddStaticVehicleEx(549,2430.85351562,-1230.45996094,24.89331818,0.00000000,3,3,15); //Tampa AddStaticVehicleEx(549,2432.08789062,-1243.80761719,24.01326561,0.00000000,3,3,15); //Tampa AddStaticVehicleEx(554,2426.87158203,-1229.74279785,25.16480637,0.00000000,3,1,15); //Yosemite AddStaticVehicleEx(463,2358.77539062,-1371.53063965,23.63937187,96.00000000,113,1,15); //Freeway AddStaticVehicleEx(463,2358.77758789,-1369.28027344,23.63937187,95.99853516,113,1,15); //Freeway AddStaticVehicleEx(463,2358.78002930,-1366.03027344,23.63937187,95.99853516,113,1,15); //Freeway AddStaticVehicleEx(463,2358.78417969,-1361.03027344,23.63937187,95.99853516,113,1,15); //Freeway AddStaticVehicleEx(463,2358.78759766,-1357.53027344,23.63937187,95.99853516,113,1,15); //Freeway AddStaticVehicleEx(586,2358.68579102,-1362.55847168,23.61767387,100.00000000,113,1,15); //Wayfarer AddStaticVehicleEx(586,2358.68334961,-1364.55761719,23.61767387,99.99755859,113,1,15); //Wayfarer AddStaticVehicleEx(586,2358.68872070,-1359.30761719,23.61767387,99.99755859,113,1,15); //Wayfarer AddStaticVehicleEx(586,2358.68164062,-1367.58740234,23.61767387,99.99755859,113,1,15); //Wayfarer AddStaticVehicleEx(596,1535.86791992,-1678.04516602,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1535.79150391,-1670.29492188,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1555.41284180,-1605.86669922,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1559.88159180,-1605.70605469,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(427,1550.49182129,-1606.86059570,13.63081264,0.00000000,1,1,15); //Enforcer AddStaticVehicleEx(601,1605.98901367,-1608.82995605,13.31302166,0.00000000,1,1,15); //S.W.A.T. Van AddStaticVehicleEx(596,1551.98327637,-1623.47937012,13.20281219,270.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1574.35595703,-1605.83398438,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(427,1564.93029785,-1606.73583984,13.63081264,0.00000000,1,1,15); //Enforcer AddStaticVehicleEx(427,1569.93505859,-1606.68212891,13.63081264,0.00000000,1,1,15); //Enforcer AddStaticVehicleEx(596,1546.05224609,-1605.53271484,13.20281219,0.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1600.06665039,-1684.12170410,5.71062469,272.00000000,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1600.14001465,-1687.62854004,5.71062469,271.99951172,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1600.44030762,-1704.70959473,5.71062469,271.99951172,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1588.82775879,-1714.36169434,5.71062469,267.99951172,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1579.57971191,-1714.09130859,5.71062469,269.99499512,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1530.90039062,-1688.29125977,5.71062469,269.99450684,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1545.45898438,-1685.09204102,5.71062469,269.99450684,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(596,1545.29223633,-1681.06323242,5.71062469,269.99450684,1,1,15); //Police Car (LSPD) AddStaticVehicleEx(523,1573.71093750,-1710.58374023,5.55100250,0.00000000,1,1,15); //HPV1000 AddStaticVehicleEx(523,1569.64514160,-1710.77697754,5.55100250,0.00000000,1,1,15); //HPV1000 AddStaticVehicleEx(523,1565.11010742,-1710.85131836,5.55100250,0.00000000,1,1,15); //HPV1000 AddStaticVehicleEx(523,1561.86254883,-1710.98706055,5.55100250,0.00000000,1,1,15); //HPV1000 AddStaticVehicleEx(523,1601.53344727,-1696.16479492,5.55100250,262.00000000,1,1,15); //HPV1000 AddStaticVehicleEx(497,1564.78649902,-1701.35498047,28.65980911,92.00000000,1,1,15); //Police Maverick AddStaticVehicleEx(497,1564.59204102,-1652.28588867,28.65980911,91.99951172,1,1,15); //Police Maverick AddStaticVehicleEx(549,2413.35961914,-1228.04467773,24.30470848,0.00000000,3,3,15); //Tampa AddStaticVehicleEx(549,2409.86279297,-1228.21142578,24.30470848,0.00000000,3,3,15); //Tampa AddStaticVehicleEx(575,2351.26953125,-1158.29272461,26.96267700,92.00000000,6,6,15); //Broadway AddStaticVehicleEx(575,2343.09423828,-1149.84753418,26.76510429,91.99951172,6,6,15); //Broadway AddStaticVehicleEx(576,2357.97924805,-1157.93945312,27.19346809,90.00000000,6,1,15); //Tornado AddStaticVehicleEx(576,2329.81884766,-1158.50146484,26.54687500,90.00000000,6,1,15); //Tornado AddStaticVehicleEx(474,2354.26098633,-1149.57165527,26.94264221,92.00000000,6,1,15); //Hermes AddStaticVehicleEx(474,2366.39868164,-1166.23828125,27.32229233,3.99951172,6,1,15); //Hermes AddStaticVehicleEx(474,2343.96679688,-1158.54479980,26.95337868,91.99902344,6,1,15); //Hermes AddStaticVehicleEx(474,1887.92163086,-2039.63354492,13.29060745,0.00000000,100,1,15); //Hermes AddStaticVehicleEx(474,1888.10363770,-2023.54724121,13.29060745,0.00000000,100,1,15); //Hermes AddStaticVehicleEx(467,1887.84594727,-2032.10522461,13.26060772,0.00000000,100,100,15); //Oceanic AddStaticVehicleEx(467,1878.08129883,-2031.54565430,13.26060772,0.00000000,100,100,15); //Oceanic AddStaticVehicleEx(467,1877.83190918,-2022.77783203,13.26060772,0.00000000,100,100,15); //Oceanic AddStaticVehicleEx(467,1876.82019043,-2044.81677246,13.26060772,338.00000000,100,100,15); //Oceanic AddStaticVehicleEx(474,1878.33276367,-2038.56103516,13.29060745,0.00000000,100,1,15); //Hermes AddStaticVehicleEx(474,1893.34741211,-2047.49707031,13.29060745,78.00000000,100,1,15); //Hermes AddStaticVehicleEx(409,1132.45141602,-2036.83398438,68.93281555,0.00000000,-1,1,15); //Stretch AddStaticVehicleEx(451,1245.52465820,-2041.59301758,59.60423279,0.00000000,-1,-1,15); //Turismo AddStaticVehicleEx(415,1249.57409668,-2041.74035645,59.57167816,0.00000000,-1,-1,15); //Cheetah AddStaticVehicleEx(411,1270.65002441,-2042.59582520,58.91690445,0.00000000,-1,-1,15); //Infernus AddStaticVehicleEx(506,1278.15856934,-2043.27697754,58.81083298,0.00000000,-1,-1,15); //Super GT AddStaticVehicleEx(541,1274.55969238,-2043.50183105,58.76793289,0.00000000,-1,-1,15); //Bullet AddStaticVehicleEx(402,1254.30322266,-2042.63366699,59.51884460,0.00000000,-1,-1,15); //Buffalo AddStaticVehicleEx(487,1957.83557129,-984.24023438,53.79674911,204.00000000,-1,-1,15); //Maverick AddStaticVehicleEx(417,1576.10192871,-1016.11730957,31.24693108,104.00000000,-1,-1,15); //Leviathan AddStaticVehicleEx(487,2661.25097656,-1548.14697266,31.63764954,90.00000000,-1,-1,15); //Maverick AddStaticVehicleEx(413,2622.27050781,-1485.41137695,16.89968872,0.00000000,-1,-1,15); //Pony AddStaticVehicleEx(499,2617.63574219,-1485.23205566,16.68308449,0.00000000,-1,-1,15); //Benson AddStaticVehicleEx(487,2521.45629883,-1528.66943359,24.86550522,179.99993896,-1,-1,15); //Maverick AddStaticVehicleEx(548,1678.43713379,-1509.37707520,20.50335884,92.00000000,-1,-1,15); //Cargobob AddStaticVehicleEx(563,1765.94799805,-2287.23632812,27.68177223,0.00000000,-1,-1,15); //Raindance AddStaticVehicleEx(511,2033.09765625,-2493.73266602,15.05501556,90.00000000,-1,-1,15); //Beagle AddStaticVehicleEx(511,2042.98583984,-2593.27099609,15.05501556,90.00000000,-1,-1,15); //Beagle AddStaticVehicleEx(519,1978.77844238,-2632.68676758,14.54694748,0.00000000,-1,-1,15); //Shamal AddStaticVehicleEx(519,1938.17236328,-2633.36206055,14.54694748,0.00000000,-1,-1,15); //Shamal AddStaticVehicleEx(519,2028.04772949,-2632.56933594,14.54694748,0.00000000,-1,-1,15); //Shamal AddStaticVehicleEx(519,1750.86853027,-2457.01025391,14.55475998,179.99993896,-1,-1,15); //Shamal AddStaticVehicleEx(519,1793.84997559,-2455.57568359,14.55475998,179.99450684,-1,-1,15); //Shamal AddStaticVehicleEx(519,1693.06958008,-2457.59326172,14.55475998,179.99450684,-1,-1,15); //Shamal AddStaticVehicleEx(553,1438.70739746,-2446.87475586,15.78968716,179.99993896,-1,-1,15); //Nevada AddStaticVehicleEx(553,1479.21142578,-2448.95092773,15.78968716,179.99450684,-1,-1,15); //Nevada AddStaticVehicleEx(577,1469.91613770,-2492.79956055,12.55468750,270.00000000,-1,-1,15); //AT-400 AddStaticVehicleEx(592,1496.31860352,-2629.93823242,12.54687500,270.00000000,-1,-1,15); //Andromada AddStaticVehicleEx(592,1576.26428223,-2596.20141602,12.54687500,270.00000000,-1,-1,15); //Andromada Textdraw0 = TextDrawCreate(371.000000, 428.000000, "www.changeme.com"); TextDrawBackgroundColor(Textdraw0, 255); TextDrawFont(Textdraw0, 0); TextDrawLetterSize(Textdraw0, 0.759999, 1.800000); TextDrawColor(Textdraw0, -65281); TextDrawSetOutline(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid,821.5563,-1928.0509,12.8672); SetPlayerCameraPos(playerid, 826.1841,-1927.9393,12.8672); SetPlayerCameraLookAt(playerid, 821.5563,-1928.0509,12.8672); return 1; } public OnPlayerConnect(playerid) { TextDrawShowForPlayer(playerid,Textdraw0); KillStreak[playerid] = 0; new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "%s has joined the server", pname); SendClientMessageToAll(0x008000FF, string); SendClientMessage(playerid,COLOR_RED,"---------------------------------------------"); SendClientMessage(playerid,COLOR_RED,"*********************************************"); SendClientMessage(playerid,COLOR_LIMEGREEN,"Welcome to DM SERVER"); SendClientMessage(playerid,COLOR_LIMEGREEN,"To get started use /help and read /rules"); SendClientMessage(playerid,COLOR_RED,"---------------------------------------------"); SendClientMessage(playerid,COLOR_RED,"**********************************************"); PInfo[playerid][Logged] = 0; PInfo[playerid][Regged] = 0; PInfo[playerid][Level] = 0; new n[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid,n,sizeof(n)); format(file,sizeof(file),"MyAdmin/Users/%s.txt",n); if(dini_Exists(file)) // Works. { SendClientMessage(playerid,LIGHTBLUE,"You are registered, Please /login!"); PInfo[playerid][Regged] = 1; PInfo[playerid][Logged] = 0; TogglePlayerControllable(playerid,0); return 1; } if(!dini_Exists(file)) // Works. { SendClientMessage(playerid,LIGHTBLUE,"You are not registered, Please /register!"); PInfo[playerid][Regged] = 0; PInfo[playerid][Logged] = 0; TogglePlayerControllable(playerid,0); return 1; } return 1; } public OnPlayerDisconnect(playerid, reason) { KillStreak[playerid] = 0; new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); switch(reason) { case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection)", pname); case 1: format(string, sizeof(string), "%s has left the server.)", pname); case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pname); } SendClientMessageToAll(0x008000FF, string); new n[MAX_PLAYER_NAME], file[256]; GetPlayerName(playerid,n,sizeof(n)); format(file,sizeof(file),"MyAdmin/Users/%s.txt",n); PInfo[playerid][Logged] = 0; // if(dini_Exists(file)) { dini_IntSet(file,"Logged",0); return 1; // Same here. } return 1; } public OnPlayerSpawn(playerid) { if(PInfo[playerid][IsSpecing] == 1) // If the player is still spectating { PInfo[playerid][IsSpecing] = 0; // Player is no longer spectating SetPlayerPos(playerid, PInfo[playerid][X], PInfo[playerid][Y], PInfo[playerid][Z]); // Setting the player to the old x y z SetPlayerFacingAngle(playerid, PInfo[playerid][Ang]); // Setting the player to the correct facing angle... ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 28, 200); } GivePlayerWeapon(playerid, 26, 200); return 1; } public OnPlayerDeath(playerid, killerid, reason) { if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID ) { if(GetPlayerWantedLevel(killerid) < 6) { SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1); } KillStreak[killerid] ++; GivePlayerMoney(killerid, 500); } SetPlayerWantedLevel(playerid, 0); KillStreak[playerid] = 0; SetPlayerScore(killerid,GetPlayerScore(killerid)+1); new str[ 256 ], KillerName[MAX_PLAYER_NAME]; //here, you're defining a string and the killername GetPlayerName(killerid, KillerName, sizeof(KillerName)); //receive the information of the killer's name switch(KillStreak[killerid]) { case 2: format(str, sizeof(str), "[KILLINGSPREE] ~g~%s has performed a ~y~double kill!", KillerName); case 3: format(str, sizeof(str), "[KILLINGSPREE] ~y~Triple Kill for ~b~%s!", KillerName); case 4: format(str, sizeof(str), "[KILLINGSPREE] ~p~Fourth Kill for ~r~%s!", KillerName); case 5: format(str, sizeof(str), "[KILLINGSPREE] ~r~%s is dominating with ~p~five kills!", KillerName); case 6: format(str, sizeof(str), "[KILLINGSPREE] ~w~%s is epic !! Imagine that !! ~y~six kills!", KillerName); case 7: format(str, sizeof(str), "[KILLINGSPREE] ~r~Epic luck for %s with ~w~seven kills!", KillerName); case 8: format(str, sizeof(str), "[KILLINGSPREE] ~p~%s is Amazing Killer with ~y~eight kills!", KillerName); case 9: format(str, sizeof(str), "[KILLINGSPREE] ~g~%s is Profesional !! ~b~nine kills!", KillerName); case 10: format(str, sizeof(str), "[KILLINGSPREE] ~b~%s is annihilating ! ~g~ten kills!", KillerName); } GameTextForAll(str,4000,4); new string[128]; GivePlayerMoney(killerid, 10000); format(string, sizeof(string), "You have received 10 000.You have %d $.", GetPlayerMoney(killerid)); SendClientMessage(killerid, COLOR_RED, string); } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(login,5,cmdtext); dcmd(setlevel, 8, cmdtext); dcmd(ban, 3, cmdtext); dcmd(freeze, 6, cmdtext); dcmd(unfreeze, 8, cmdtext); dcmd(kick, 4, cmdtext); dcmd(sgod, 4, cmdtext); dcmd(god, 3, cmdtext); dcmd(explode, 7,cmdtext); dcmd(acmds,5,cmdtext); dcmd(akill,5,cmdtext); dcmd(jetpack,7,cmdtext); dcmd(disarm,6,cmdtext); dcmd(eject,5,cmdtext); dcmd(repair,6,cmdtext); dcmd(spec,4,cmdtext); dcmd(specoff,7,cmdtext); dcmd(pm,2,cmdtext); dcmd(cargod,6,cmdtext); dcmd(kill,4,cmdtext); dcmd(aheal,5,cmdtext); dcmd(givecash,8,cmdtext); dcmd(gc,2,cmdtext); dcmd(admins,6,cmdtext); dcmd(goto,4,cmdtext); dcmd(get,3,cmdtext); dcmd(setcash,7,cmdtext); dcmd(setname,7,cmdtext); new cmd[256], idx; cmd = strtok(cmdtext, idx); dcmd(register,8,cmdtext); if (strcmp("/help", cmdtext, true, 4) == 0) { SendClientMessage(playerid,COLOR_RED,"This is an DeathMatch gamemode."); SendClientMessage(playerid,COLOR_RED,"Your goal is to kill other players and get score and money"); SendClientMessage(playerid,COLOR_GREEN,"Register at our website : changeme"); SendClientMessage(playerid,COLOR_BLUE,"To see list of commands use /cmds "); return 1; } if (strcmp("/kill", cmdtext, true, 4) == 0) { SetPlayerHealth(playerid, 0); return 1; } if (strcmp("/heal", cmdtext, true, 7) == 0) { if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_RED, "ERROR : You dont have enough money!"); { GivePlayerMoney(playerid, -1000); SetPlayerHealth(playerid,100); } return 1; } if (strcmp("/cmds", cmdtext, true, 4) == 0) { SendClientMessage(playerid,COLOR_RED,"---------------------Commands----------------------"); SendClientMessage(playerid,COLOR_RED,"Current commands are:"); SendClientMessage(playerid,COLOR_GREEN," /kill /help /heal"); SendClientMessage(playerid,COLOR_BLUE,"/sf / lv /ls "); return 1; } if (strcmp("/sf", cmdtext, true, 2) == 0) { SetPlayerPos(playerid,-2039.7689,135.6302,28.8359); SetPlayerVirtualWorld(playerid, 0); SendClientMessage(playerid, 0x00FFFFAA, "You have been teleported to San Fierro."); return 1; } if (strcmp("/ls", cmdtext, true, 2) == 0) { SetPlayerPos(playerid,2490.6665,-1669.7076,13.3359); SetPlayerVirtualWorld(playerid, 0); SendClientMessage(playerid, 0x00FFFFAA, "You have been teleported to Los Santos."); return 1; } if (strcmp("/lv", cmdtext, true, 2) == 0) { SetPlayerPos(playerid,1907.0464,960.0598,10.8203); SetPlayerVirtualWorld(playerid, 0); SendClientMessage(playerid, 0x00FFFFAA, "You have been teleported to Las Venturas."); return 1; } if (strcmp("/RDM", cmdtext, true, 3) == 0) { SetPlayerPos(playerid,-1285.1356,458.6940,7.1875); SetPlayerVirtualWorld(playerid, 1337); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 28, 99999); GivePlayerWeapon(playerid, 26, 99999); SendClientMessage(playerid, 0x00FFFFAA, "Welcome to Runnies DeathMatch zone.To quit use /cancel."); return 1; } if (strcmp("/WDM", cmdtext, true, 3) == 0) { SetPlayerPos(playerid,-1285.1356,458.6940,7.1875); SetPlayerVirtualWorld(playerid, 1338); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 24, 99999); GivePlayerWeapon(playerid, 27, 99999); GivePlayerWeapon(playerid, 29, 99999); GivePlayerWeapon(playerid, 31, 99999); SendClientMessage(playerid, 0x00FFFFAA, "Welcome to Walkies DeathMatch zone.To quit use /cancel."); return 1; } if (strcmp("/cancel", cmdtext, true, 5) == 0) { SetPlayerVirtualWorld(playerid, 0); SetPlayerHealth(playerid, 0); return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { 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) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } dcmd_setlevel(playerid,params[]) { new level,id,file[256],n[MAX_PLAYER_NAME];//creating the new variabls new tmp[256], tmp2[256], Index,str[50];// creating the new variables tmp = strtok(params,Index), tmp2 = strtok(params,Index),id = strval(tmp),level = strval(tmp2);// setting them to strtok so we can use them as parameters of our command GetPlayerName(id,n,MAX_PLAYER_NAME);//getting the players name format(file,sizeof(file),"MyAdmin/Users/%s.txt",n);//formatting the file if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not an RCON admin!");//if the player is not rcon admin if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /setlevel <ID> <Level>");// if the string is empty if(!IsPlayerConnected(id))return SendClientMessage(playerid,COLOR_RED,"You have entered an incorrect ID"); //if the id is not connected PInfo[id][Level] = level;//sets the level of the player dini_IntSet(file,"Level",level);//saves the new level to the file format(str,sizeof(str),"[AdminInfo]You have set %s's level to %d",n,level);//creates the string SendClientMessage(playerid,LIGHTBLUE,str); return 1; } dcmd_kick(playerid,params[]) { new id,n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /kick <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"%s has kicked %s",n,on); SendClientMessageToAll(LIGHTBLUE,str); Kick(id); return 1; } dcmd_disarm(playerid,params[]) { new id,n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,ORANGE,"You need to be level 2 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /disarm <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"[AdminInfo] %s has disarmed %s.",n,on); SendClientMessageToAll(COLOR_RED,str); ResetPlayerWeapons(id); return 1; } dcmd_givecash(playerid,params[]) { new id,n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"You need to be level12 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /givecash <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"[AdminInfo] %s has gave cash to %s.",n,on); SendClientMessageToAll(COLOR_RED,str); GivePlayerMoney(playerid,1000000); return 1; } dcmd_ban(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /ban <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"[AdminInfo]%s has banned %s",n,on); SendClientMessageToAll(COLOR_RED,str); Ban(id); return 1; } dcmd_freeze(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[49]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /freeze <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"[AdminInfo] %s has freezed %s",n,on); SendClientMessageToAll(COLOR_RED,str); TogglePlayerControllable(id,0); return 1; } dcmd_specoff(playerid,params[]) { #pragma unused params if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,ORANGE,"You need to be level 2 to use this command!"); if(PInfo[playerid][IsSpecing] == 0) return SendClientMessage(playerid, ORANGE, "You are not spectating anyone!"); TogglePlayerSpectating(playerid, 0); return 1; } dcmd_spec(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,ORANGE,"You need to be level 2 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /spec <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); GetPlayerPos(playerid, PInfo[playerid][X], PInfo[playerid][Y], PInfo[playerid][Z]); GetPlayerFacingAngle(playerid, PInfo[playerid][Ang]); TogglePlayerSpectating(playerid, 1); PlayerSpectatePlayer(playerid, id); new message[100]; format(message, sizeof(message), "Note: You are now spectating player %d", id); SendClientMessage(playerid, ORANGE, message); PInfo[playerid][IsSpecing] = 1; return 1; } dcmd_pm(playerid, params[]) { new target, msg[128], tmp[128], name[MAX_PLAYER_NAME]; if(sscanf(params, "us[128]", target, msg)) return SendClientMessage(playerid, -1, "Syntax: /pm ID Message"); if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1, "The selected player is not online."); GetPlayerName(playerid, name, sizeof(name)); format(tmp, sizeof(tmp), "[PM] %s says: %s", name, msg); SendClientMessage(target, -1, tmp); return 1; } dcmd_setcash(playerid, params[]) { new targetid, money; if(sscanf(params, "ui", targetid, money)) return SendClientMessage(playerid, 0xFF0000, "Usage: /setcash [PlayerID/Part of Name] [Amount]"); ResetPlayerMoney(targetid); GivePlayerMoney(targetid, money); new str[128]; format(str, sizeof(str), "You have set Player's ID %i money to %i", targetid, money); SendClientMessage(playerid, -1, str); format(str, sizeof(str), "Player ID %i has set your money to %i", playerid, money); SendClientMessage(targetid, -1, str); return 1; } dcmd_gc(playerid, params[]) { new targetid, money; if(sscanf(params, "ui", targetid, money)) return SendClientMessage(playerid, 0xFF0000, "Usage: /givemoney [PlayerID/Part of Name] [Amount]"); if(GetPlayerMoney(playerid) < money) return SendClientMessage(playerid, 0xFF0000, "You don't have enough cash!"); GivePlayerMoney(targetid, money); GivePlayerMoney(playerid, -money); new str[128]; format(str, sizeof(str), "You gave $%i to Player ID %i!", money, targetid); SendClientMessage(playerid, -1, str); format(str, sizeof(str), "Player ID %i gave you $%i!", playerid, money); SendClientMessage(targetid, -1, str); return 1; } dcmd_setname(playerid, params[]) { new targetid, name[MAX_PLAYER_NAME]; if(sscanf(params, "us[MAX_PLAYER_NAME]", targetid, name)) return SendClientMessage(playerid, 0xFF0000, "Usage: /setname [PlayerID/Part of Name] [New Name]"); SetPlayerName(targetid, name); new str[128]; format(str, sizeof(str), "You have set Player's ID %i name to %s!", targetid, name); SendClientMessage(playerid, -1, str); format(str, sizeof(str), "Admin ID %i has changed your name to %s!", playerid, name); SendClientMessage(targetid, -1, str); return 1; } dcmd_admins(playerid, params[]) { #pragma unused params new count; new str[80]; new name[MAX_PLAYER_NAME]; SendClientMessage(playerid, -1, "~~Online Administrators~~"); SendClientMessage(playerid, -1, " "); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PInfo[i][Level] >= 1) { count++; GetPlayerName(i, name, sizeof(name)); format(str, sizeof(str), "%s Level: %i", name, PInfo[i][Level]); SendClientMessage(playerid, -1, str); } } } if(count == 0) SendClientMessage(playerid, -1, "!No Administrators online!"); SendClientMessage(playerid, -1, "________________________________________"); return 1; } dcmd_eject(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[128]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /eject <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); if(!IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] The selected player is not in vehicle."); format(str,sizeof(str),"[AdminInfo] %s has ejected %s from his vehicle.",n,on); SendClientMessageToAll(COLOR_RED,str); RemovePlayerFromVehicle(id); return 1; } dcmd_unfreeze(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index, str[128]; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /freeze <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); format(str,sizeof(str),"[AdminInfo] %s has unfreezed %s",n,on); SendClientMessageToAll(COLOR_RED,str); TogglePlayerControllable(id,1); return 1; } dcmd_goto(playerid,params[]) { new id; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,ORANGE,"You need to be level 2 to use this command!"); // If the player isn't level two he/she can't use it if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /goto <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); new Float:PosX, Float:PosY, Float:PosZ; GetPlayerPos(id, PosX, PosY, PosZ); SetPlayerPos(playerid, PosX, PosY, PosZ); return 1; } dcmd_get(playerid,params[]) { new id; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"You need to be level 1 to use this command!"); // If the player isn't level two he/she can't use it if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /get <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); new Float:PosX, Float:PosY, Float:PosZ; GetPlayerPos(playerid, PosX, PosY, PosZ); SetPlayerPos(id, PosX, PosY, PosZ); return 1; } dcmd_acmds(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256], Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"You need to be Admin to use this command!"); SendClientMessage(playerid,COLOR_RED,"[AdminInfo]: Admin commands are: /god /explode /freeze /unfreeze"); SendClientMessage(playerid,COLOR_RED,"[AdminInfo]:/ban /kick /jetpack /disarm /spec /specoff"); SendClientMessage(playerid,COLOR_RED,"[AdminInfo]: /destroycar /eject /repair /aheal /setcash /repair /akill"); return 1; } dcmd_sgod(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 5) return SendClientMessage(playerid,ORANGE,"You need to be level 5 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /sgod <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid ID"); SetPlayerHealth(id,10000); return 1; } dcmd_god(playerid,params[]) { #pragma unused params if(PInfo[playerid][Level] < 5) return SendClientMessage(playerid,ORANGE,"You need to be level 5 to use this command!"); SetPlayerHealth(playerid,10000); return 1; } dcmd_jetpack(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 1 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] USAGE: /jetpack <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] Invalid ID"); SetPlayerSpecialAction(id, 2 ); return 1; } dcmd_akill(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 1 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo]Usage: /akill <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo]Invalid ID"); SetPlayerHealth(id,0); return 1; } dcmd_repair(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 1 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo]Usage: /repair <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo]Invalid ID"); GetPlayerVehicleID(playerid); RepairVehicle(playerid); return 1; } dcmd_cargod(playerid,params[]) { if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 3 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo]Usage: /cargod <ID> "); GetPlayerVehicleID(playerid); SetVehicleHealth(playerid,1000000); return 1; } dcmd_aheal(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 1 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] USAGE: /aheal <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] Invalid ID"); SetPlayerHealth(id,100); return 1; } dcmd_explode(playerid,params[]) { new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME]; new tmp[256],Index; tmp = strtok(params,Index), id = strval(tmp); GetPlayerName(id,on,sizeof(on)); GetPlayerName(playerid,n,sizeof(n)); if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"[AdminInfo] You need to be level 1 to use this command!"); if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] USAGE: /explode <ID> "); if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"[AdminInfo] Invalid ID"); new Float:pX,Float:pY,Float:pZ; // I think the way dcmd works it conflicts with enum vars anyhow lets test GetPlayerPos(id, pX, pY, pZ); SetPlayerPos(id, pX, pY, pZ); CreateExplosion(Float:pX, Float:pY, Float:pZ,0,10); return 1; } dcmd_kill(playerid,params[]) { #pragma unused params SetPlayerHealth(playerid,0); SendClientMessage(playerid,COLOR_RED,"You have killed yourself."); return 1; } dcmd_register(playerid,params[]) { new file[256],n[MAX_PLAYER_NAME]; GetPlayerName(playerid,n,MAX_PLAYER_NAME); format(file,sizeof(file),"MyAdmin/Users/%s.txt",n); if(dini_Exists(file)) return SendClientMessage(playerid,YELLOW,"You are already registered!"); if(PInfo[playerid][Regged] == 1) return SendClientMessage(playerid,LIGHTBLUE,"You are already registered!"); if(PInfo[playerid][Logged] == 1) return SendClientMessage(playerid,ORANGE,"You are already registered, and logged in!"); if(strlen(params)) { if(!dini_Exists(file)) { dini_Create(file); dini_Set(file,"Password",params); dini_IntSet(file,"Regged",1); dini_IntSet(file,"Logged",0); dini_IntSet(file,"Level",0); SendClientMessage(playerid,LIGHTBLUE,"Congratulations, you have just registered, please /login"); PInfo[playerid][Regged] = 1; return 1; } } else { SendClientMessage(playerid,COLOR_RED,"USAGE: /register <Password>"); return 1; } return 1; } dcmd_login(playerid,params[]) { new file[256],n[MAX_PLAYER_NAME]; GetPlayerName(playerid,n,MAX_PLAYER_NAME); format(file,sizeof(file),"MyAdmin/Users/%s.txt",n); if(!dini_Exists(file)) return SendClientMessage(playerid,YELLOW,"You are not registered! Please /register"); if(PInfo[playerid][Logged] == 1) return SendClientMessage(playerid,LIGHTBLUE,"You are already logged in!"); if(PInfo[playerid][Regged] == 0) return SendClientMessage(playerid,ORANGE,"You are not registered! Please /register"); if(strlen(params)) { new pass[256]; pass = dini_Get(file,"Password"); if(dini_Exists(file)) { if(strcmp(params,pass,false) != 0) { SendClientMessage(playerid,COLOR_RED,"Wrong Password!"); } else { dini_IntSet(file,"Logged",1); PInfo[playerid][Logged] = 1; PInfo[playerid][Level] = dini_Int(file,"Level"); SendClientMessage(playerid,YELLOW,"You have now logged in!"); TogglePlayerControllable(playerid,1); return 1; } } } else { SendClientMessage(playerid,COLOR_RED,"USAGE: /login <Password>"); return 1; } return 1; } strtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; } create new paste / dealsnew! / api / trends / syntax languages / faq / tools / privacy / cookies / contact / dmca / advertise on pastebin / scraping / go Dedicated Server Hosting by Steadfast
Can you see a GM above ? Ok so how to add this below cmd to that above GM?
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/shoot", cmdtext, true, 10) == 0) { SetPlayerPos(playerid, 1457.7526,-1062.9589,213.3828); SendClientMessage(playerid, COLOR_RED , "Ready To Shoot!"); GivePlayerWeapon(playerid, 31, 9999); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); return 1; } } return 0; }