Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <YSI\y_ini>
- #include <zcmd>
- #include <streamer>
- #include <sscanf2>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Nirzor's Admin System V1.6 ");
- print("--------------------------------------\n");
- SetTimer("SendRandomMsgToAll", 60 * 1000, 1);
- print("\n-- Laser Pointer by Skiaffo --\n");
- {
- new p = GetMaxPlayers();
- for (new i=0; i < p; i++) {
- SetPVarInt(i, "laser", 0);
- SetPVarInt(i, "color", 18643);
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- new p = GetMaxPlayers();
- for (new i=0; i < p; i++)
- {
- SetPVarInt(i, "laser", 0);
- RemovePlayerAttachedObject(i, 0);
- }
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Modern War BattleLion V3.2");
- print("----------------------------------\n");
- }
- //==============================Admin System==================================//
- //Command Use
- #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- //Login Register System
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SUCCESS_1 3
- #define DIALOG_SUCCESS_2 4
- //Save Path
- #define PATH "/NAdmin/Users/%s.ini"
- #define reportPATH "/NAdmin/Config/ReportLog.txt"
- #define BanLog "/NAdmin/Config/BanLog.txt"//directory for reports, in the folder "scriptfiles"
- //Colors
- #define COL_WHITE "{FFFFFF}"
- #define COL_RED "{F81414}"
- #define COL_GREEN "{00FF22}"
- #define COL_LIGHTBLUE "{00CED1}"
- //COLORS 2
- #define COLOR_GREEN 0x008000FF
- #define COLOR_BLUE 0x0000FFFF
- #define COLOR_BRIGHTRED 0xFF000AAA
- #define COLOR_AQUA 0x00FFFFAA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_BEIGE 0xFFF8DCAA
- #define COLOR_BLACK 0x000000AA
- #define COLOR_LIGHTERBLUE 0x00BFFFAA
- #define COLOR_BLUELIGHT 0x1E90FFAA
- #define COLOR_BLUEMEDIUM 0x0000CDAA
- #define COLOR_BLUEDARK 0x00008BAA
- #define COLOR_PINK 0xFF1493AA
- #define COLOR_PINKDARK 0xFF00FFAA
- #define COLOR_GREENLIGHT 0x00FF00AA
- #define COLOR_GREENDARK 0x006400AA
- #define COLOR_MAROON 0x800000AA
- #define COLOR_OKER 0x808000AA
- #define COLOR_ORANGE 0xFF4500AA
- #define COLOR_ORANGELIGHT 0xFF8C00AA
- #define COLOR_PURPLE 0x800080AA
- #define COLOR_VIOLETDARK 0x9400D3AA
- #define COLOR_INDIGO 0xAB0082AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_SAND 0xFFDEADAA
- #define COLOR_SILVER 0xC0C0C0AA
- #define COLOR_TEAL 0x008080AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_GOLD 0xFFD700AA
- #define COLOR_BROWN 0x8B4513AA
- #define COLOR_BROWNLIGHT 0xA0522DAA
- #define COLOR_GRAY 0xA9A9A9AA
- #define COLOR_GRAYDARK 0x696969AA
- #define COLOR_INVISIBLE 0xFFFFFF00
- #define COLOR_INDIA 0x80000096
- #define COLOR_PAKISTAN 0x40808096
- #define COLOR_NEPAL 0x8000FF96
- #define COLOR_BRAZIL 0xB7B70096
- #define COLOR_CHINA 0x80808096
- #define COLOR_GREECE 0x00000096
- #define COLOR_SINGAPORE 0x00FFFF96
- #define COLOR_IRAQ 0x8080C096
- //Admin Command Variables
- #define MAX_WARNINGS 3
- //============================================================================//
- //COLORS
- #define COLOR_GREEN 0x008000FF
- #define COLOR_BLUE 0x0000FFFF
- #define COLOR_BRIGHTRED 0xFF000AAA
- #define COLOR_AQUA 0x00FFFFAA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_BEIGE 0xFFF8DCAA
- #define COLOR_BLACK 0x000000AA
- #define COLOR_LIGHTERBLUE 0x00BFFFAA
- #define COLOR_BLUELIGHT 0x1E90FFAA
- #define COLOR_BLUEMEDIUM 0x0000CDAA
- #define COLOR_BLUEDARK 0x00008BAA
- #define COLOR_PINK 0xFF1493AA
- #define COLOR_PINKDARK 0xFF00FFAA
- #define COLOR_GREENLIGHT 0x00FF00AA
- #define COLOR_GREENDARK 0x006400AA
- #define COLOR_MAROON 0x800000AA
- #define COLOR_OKER 0x808000AA
- #define COLOR_ORANGE 0xFF4500AA
- #define COLOR_ORANGELIGHT 0xFF8C00AA
- #define COLOR_PURPLE 0x800080AA
- #define COLOR_VIOLETDARK 0x9400D3AA
- #define COLOR_INDIGO 0xAB0082AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_SAND 0xFFDEADAA
- #define COLOR_SILVER 0xC0C0C0AA
- #define COLOR_TEAL 0x008080AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_GOLD 0xFFD700AA
- #define COLOR_BROWN 0x8B4513AA
- #define COLOR_BROWNLIGHT 0xA0522DAA
- #define COLOR_GRAY 0xA9A9A9AA
- #define COLOR_GRAYDARK 0x696969AA
- #define COLOR_INVISIBLE 0xFFFFFF00
- #define COLOR_INDIA 0x80000096
- #define COLOR_PAKISTAN 0x40808096
- #define COLOR_NEPAL 0x8000FF96
- #define COLOR_BRAZIL 0xB7B70096
- #define COLOR_CHINA 0x80808096
- #define COLOR_GREECE 0x00000096
- #define COLOR_SINGAPORE 0x00FFFF96
- #define COLOR_IRAQ 0x8080C096
- //Teams
- #define TEAM_AMERICA 0
- #define TEAM_UK 1
- #define TEAM_BANGLADESH 2
- #define TEAM_RUSSIA 3
- #define TEAM_INDIA 4
- #define TEAM_PAKISTAN 5
- #define TEAM_NEPAL 6
- #define TEAM_BRAZIL 7
- #define TEAM_CHINA 8
- #define TEAM_GREECE 9
- #define TEAM_SINGAPORE 10
- #define TEAM_IRAQ 11
- //Team Defines
- #define AMERICASPAWN "1522.6503,-806.6635,72.1700"
- #define UKSPAWN "1279.3276,-778.4965,95.9663"
- #define BANGLADESHSPAWN "1279.3276,-778.4965,95.9663"
- #define RUSSIASPAWN "2163.7188,-1798.8535,13.3708"
- #define INDIASPAWN "237.5466,-170.9398,1.4297"
- #define PAKISTANSPAWN "1292.7701,268.1389,19.4111"
- #define NEPALSPAWN "2339.0981,28.5481,26.3359"
- #define BRAZILSPAWN "-2018.8489,156.2464,28.1653"
- #define CHINASPAWN "-1820.0067,612.9324,35.0156"
- #define GREECESPAWN "-2621.5823,1409.0161,7.1016"
- #define SINGAPORESPAWN "2307.1194,1056.3799,10.8203"
- #define IRAQSPAWN "2177.3914,1678.0061,10.8203"
- #define AMERICACOLOR "COLOR_BLUE"
- #define UKCOLOR "COLOR_RED"
- #define BANGLADESHCOLOR "COLOR_GREEN"
- #define RUSSIACOLOR "COLOR_ORANGE"
- #define INDIACOLOR "COLOR_INDIA"
- #define PAKISTANCOLOR "COLOR_PAKISTAN"
- #define NEPALCOLOR "COLOR_NEPAL"
- #define BRAZILCOLOR "COLOR_BRAZIL"
- #define CHINACOLOR "COLOR_CHINA"
- #define GREECECOLOR "COLOR_GREECE"
- #define SINGAPORECOLOR "COLOR_SINGAPORE"
- #define IRAQCOLOR "COLOR_IRAQ"
- //Shop Defines
- #define SHOP_DIALOG 0//Change 0 to suit other dialog id's in your script/s.
- //Contest System
- #define CONTESTTIME 4 //Amounts of minutes till a new contest is started, regardless of the current contest is won or not.
- #define MINIMUM_VALUE 2000000 //The minimum value that the contest number may be.
- #define MAXIMUM_VALUE 8000000 //The maximum value that the contest number may be.
- #define CONTEST_PRIZE 5000 // The prize in dollars that the player will win, if he types the answer first.
- //Class System
- #define PRIVATE 1
- #define SNIPER 2
- #define ENGINEER 3
- #define MEDIC 4
- #define PILOT 5
- #define SPY 6
- #endif
- //GangZone Defines
- new America;
- new UK;
- new Bangladesh;
- new Russia;
- new India;
- new Pakistan;
- new Nepal;
- new Brazil;
- new China;
- new Greece;
- new Singapore;
- new Iraq;
- //Weapon Shop Defines
- new WS;
- //Defines
- new gTeam[MAX_PLAYERS];
- //Kill Streak
- new Streaks[MAX_PLAYERS];
- //Death Cams
- forward EndDeathCam(playerid);
- new Died[MAX_PLAYERS], KilledBy[MAX_PLAYERS];
- //Contest Arrays Or System
- forward NewContest(); //This'll be called when a new contest begins.
- forward OnPlayerWinContest(playerid); //This is for when a player wins the contest.
- new ContestAnswer = -1; //Minus 1 (-1). We're using this to show that there's no contest running.
- //Score Timer
- new GiveScoreTimer[MAX_PLAYERS];
- forward GivePlayerScore(playerid);
- //Classes
- new gPlayerClass[MAX_PLAYERS];// for defining classes
- new PickedClass[MAX_PLAYERS];// this variable can be used in many functions
- //Health Armour Texdraws
- new Text:Health[MAX_PLAYERS];
- new Text:Armour[MAX_PLAYERS];
- //Capture zone definations
- #define UnityStation 0
- #define CluckinBell 1
- #define Gym 2
- #define HOTEL 3
- //Country Thingy
- #define COLOR_JOIN 0x99FF9900
- //News
- new Params[4][8];
- new FileData[7][128];
- new timer[MAX_PLAYERS][30];
- new iCP[MAX_PLAYERS];
- new tCP[30];
- new CP[30];
- new Pick[30];
- new Zone[30];
- new UnderAttack[30];
- //Fuel System
- new fuel[MAX_VEHICLES];
- forward timer_fuel_lower();
- forward timer_refuel(playerid);
- new isrefuelling[MAX_PLAYERS] = 0;
- new Text:td_fuel[MAX_PLAYERS];
- //Speedo Meter System
- new Text:SPEEDOS[MAX_PLAYERS];
- forward Speedometer(playerid);
- //Vehicle Healtho Meter
- new Text:HEALTH[MAX_PLAYERS];
- //Anti Money Hack
- new OldMoney[MAX_PLAYERS];
- new NewMoney[MAX_PLAYERS];
- //Derby System
- new InDerby[MAX_PLAYERS]; // at the top
- new Float:derbyspawns[][] = // at the top
- {
- {/*x, y, z, facingAnlge*/},
- {/*x, y, z, facingAnlge*/},
- {/*x, y, z, facingAnlge*/},
- {/*x, y, z, facingAnlge*/},
- {/*x, y, z, facingAnlge*/}
- };
- //Random Weather System
- new Weather;
- //Hitman System
- new hit[MAX_PLAYERS];
- new isHitman[MAX_PLAYERS];
- //================================Admin-System================================//
- //Server Messages
- forward SendRandomMsgToAll();
- //Vip System
- new vip[MAX_PLAYERS];
- //Admin System
- new AdminLevel[MAX_PLAYERS];
- new Warns[MAX_PLAYERS];
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- pDeaths,
- pScore
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInfo[playerid][pPass]);
- INI_Int("Cash",PlayerInfo[playerid][pCash]);
- INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
- INI_Int("Kills",PlayerInfo[playerid][pKills]);
- INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
- INI_Int("Donor",vip[playerid]);
- INI_Int("Score",PlayerInfo[playerid][pScore]);
- return 1;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- //Helmet System
- #define SLOT 10 //By default uses slot 1, change it if you need slot 1 for other thing.
- //============================================================================//
- public OnGameModeInit()
- {
- //Misc
- SetGameModeText(" Modern War Battalation V2.3");
- UsePlayerPedAnims();
- DisableInteriorEnterExits();
- //Pickups===================================================================
- Pick[UnityStation] = CreatePickup(1314, 1, 1768.8698,-1951.0712,14.1096, -1);
- Pick[CluckinBell] = CreatePickup(1314, 1, 2402.4421,-1890.2247,13.3828, -1);
- Pick[Gym] = CreatePickup(1314, 1, 2233.3723,-1725.5320,13.5469, -1);
- Pick[HOTEL] = CreatePickup(1314, 1, 2173.5867,-1803.2716,13.3689, -1);
- //Checkpoints===============================================================
- CP[UnityStation] = CreateDynamicCP(1768.8698,-1951.0712,14.1096, 2, -1, -1, -1, 100.0);
- CP[CluckinBell] = CreateDynamicCP(2402.4421,-1890.2247,13.3828, 2, -1, -1, -1, 100.0);
- CP[Gym] = CreateDynamicCP(2233.3723,-1725.5320,13.5469, 2, -1, -1, -1, 100.0);
- CP[HOTEL] = CreateDynamicCP(2173.5867,-1803.2716,13.3689, 2, -1, -1, -1, 100.0);
- //================GANG ZONES OF CHECKPOINTS=================================
- Zone[UnityStation] = GangZoneCreate(1709.924682, -2004.422729, 1821.924682, -1900.422729);
- Zone[CluckinBell] = GangZoneCreate(2362.442138, -1938.224731, 2458.442138, -1842.224731);
- Zone[Gym] = GangZoneCreate(2169.372314, -1773.531982, 2281.372314, -1685.531982);
- Zone[HOTEL] = GangZoneCreate(2109.586669, -1859.271606, 2205.586669, -1787.271606);
- //=============================Classes========================================//
- // America
- AddPlayerClass(286,1522.6503,-806.6635,72.1700,97.8118,29,500,33,500,24,320);
- // United Kingdom
- AddPlayerClass(269,1279.3276,-778.4965,95.9663,83.8298,29,500,34,280,23,450);
- // Bangladesh
- AddPlayerClass(105,2496.2695,-1683.7316,13.3639,5.8997,28,500,31,530,27,230);
- // Russia
- AddPlayerClass(285,2163.7188,-1798.8535,13.3708,270.2612,32,500,30,530,25,300);
- // India
- AddPlayerClass(135,237.3730,-170.2988,1.4297,87.4982,30,530,24,230,25,300);
- // Pakistan
- AddPlayerClass(127,1293.0664,268.3823,19.4113,241.4769,24,230,29,530,32,500);
- // Nepal
- AddPlayerClass(128,2339.0981,28.5481,26.3359,269.3545,27,230,31,350,21,300);
- // Brazil
- AddPlayerClass(124,-2018.8489,156.2464,28.1653,266.3123,30,1030,29,530,27,230);
- // China
- AddPlayerClass(123,-1820.0067,612.9324,35.0156,181.2069,24,230,27,230,29,530);
- // Greece
- AddPlayerClass(122,-2621.5823,1409.0161,7.1016,197.0545,30,530,29,530,25,300);
- // Singapore
- AddPlayerClass(299,2307.1194,1056.3799,10.8203,269.5391,32,530,29,530,30,530);
- // Iraq
- AddPlayerClass(287,2177.3914,1678.0061,10.8203,88.6406,31,530,29,530,24,230);
- //============================Anti-Money-Hack=================================//
- SetTimer("CheckMoney",2000,true);//name of public,time,loop = true/yes !
- //============================================================================//
- //GangZones
- America = GangZoneCreate(1459.443, -900.2091, 1569.725, -785.7246);
- UK = GangZoneCreate(1231.272, -904.1568, 1356.766, -769.9336);
- Bangladesh = GangZoneCreate(2318.883, -1741.078, 2528.039, -1658.175);
- Russia = GangZoneCreate(2071.699, -1906.883, 2208.601, -1776.608);
- India = GangZoneCreate(93.423, -256.9133, 373.692, -35.03363);
- Pakistan = GangZoneCreate(1144.432, 128.4566, 1436.379, 373.692);
- Nepal = GangZoneCreate(2160.407, -93.423, 2557.455, 128.4566);
- Brazil = GangZoneCreate(-2143.608, 85.16138, -1992.963, 329.7492);
- China = GangZoneCreate(-1900.259, 629.5665, -1703.262, 755.8053);
- Greece = GangZoneCreate(-2680.521, 1331.77, -2510.563, 1481.679);
- Singapore = GangZoneCreate(2161.745, 993.614, 2329.653, 1183.149);
- Iraq = GangZoneCreate(2060.219, 1546.747, 2294.51, 1747.887);
- //Weapons-Shops
- WS = GangZoneCreate(2455.785, -1966.099, 2531.842, -1910.831);
- //Contest System
- SetTimer("NewContest",(1000*60*CONTESTTIME),1); // Sets the timer in minutes. Timers are in millseconds, and 1000 milliseconds is equal to a second. That multiplies with 60, making it one minute. That once again multiplies with the 'CONTESTTIME' you've defined, making it in the amount of minutes you want.
- //Fuel System
- for(new i=0;i<MAX_VEHICLES;i++)
- {
- fuel[i] = 100;
- }
- SetTimer("timer_fuel_lower",4200,true); //sets the timer to drop the fuel
- //Speedo Meter System
- SetTimer("Speedometer", 100, true);
- //Random Weather System
- SetTimer("RandomWeather",60000,true);//This sets the timer that will be repeated for 1 minute (1000 ms = 1 second) hence 1000 x 60 = 60000 (1 minute)
- //CARS
- AddStaticVehicle(599,1528.8624,-821.0977,70.6679,267.0792,0,1); // Country P.C
- AddStaticVehicle(598,1509.1919,-821.0330,69.4461,354.0035,0,1); // L.V P.C
- AddStaticVehicle(597,1507.7972,-799.9228,73.2553,2.2875,0,1); // SF P.C
- AddStaticVehicle(596,1529.4911,-795.9178,72.8769,270.2912,0,1); // LS P.C
- AddStaticVehicle(490,1521.2183,-787.4810,76.4304,15.3791,0,0); // FBI Rancher
- AddStaticVehicle(497,1544.2968,-801.2972,77.9650,87.4504,0,1); // FBI Heli
- AddStaticVehicle(488,1539.2729,-814.2987,77.1885,89.9949,2,29); // FBI Heli2
- AddStaticVehicle(487,1291.6603,-788.3265,96.6337,180.7966,26,57); // Killer Heli
- AddStaticVehicle(489,1247.7705,-782.0987,90.7541,4.5601,120,123); // Killer Rancher
- AddStaticVehicle(480,1230.9784,-766.2958,91.7082,249.5746,46,46); // killer speedo
- AddStaticVehicle(477,1265.2360,-743.2024,94.4696,205.6282,121,1); // Killer V.I.P Car
- AddStaticVehicle(469,1305.8496,-756.1826,93.2322,235.0564,1,3); // killer Sparrow
- AddStaticVehicle(405,970.2335,-1098.7864,23.7525,173.2869,91,1); // sentino
- AddStaticVehicle(445,1336.0602,-873.9500,39.3082,274.1470,39,39); // BluePrints
- AddStaticVehicle(429,1514.9767,-711.4958,89.8046,182.8026,14,14); // speedo
- AddStaticVehicle(451,1378.6559,-1029.1587,26.3195,356.8382,36,36); // Nighty
- AddStaticVehicle(421,1529.7847,-819.9590,70.7682,90.7298,30,1); // washington
- AddStaticVehicle(407,890.3480,-1133.4698,24.0577,93.6723,3,1); // firetruck
- AddStaticVehicle(409,734.8076,-1167.5024,20.7932,313.5387,1,1); // lamogin
- AddStaticVehicle(411,662.3279,-1205.4426,18.1015,307.8907,116,1); // dualcar
- AddStaticVehicle(415,761.5759,-1024.1169,23.7590,175.8848,40,1); // cheetah
- AddStaticVehicle(416,851.6962,-989.5425,33.5246,12.4435,1,3); // ambulance
- AddStaticVehicle(417,821.8243,-1065.3203,28.2951,112.8004,0,0); // chopper
- AddStaticVehicle(418,819.1041,-977.2542,36.6637,111.0176,119,119); // oldcar
- AddStaticVehicle(421,741.4971,-897.7982,43.5036,59.9498,25,1); // V.I.Pcar
- AddStaticVehicle(420,706.2866,-818.3467,40.6664,18.0807,6,1); // taxi
- AddStaticVehicle(422,666.8964,-712.5101,16.3754,37.9785,111,31); // bobcat
- AddStaticVehicle(423,766.8959,-1164.0530,22.6072,118.3297,1,5); // ice cream truck
- AddStaticVehicle(425,939.6213,-1071.7644,31.8177,174.1248,43,0); // hunter
- AddStaticVehicle(426,932.2893,-1112.6602,23.9004,0.3122,7,7); // dullcar
- AddStaticVehicle(427,1030.9536,-1123.1677,24.0182,354.3994,0,1); // SwatVan
- AddStaticVehicle(429,1067.7219,-1134.1156,23.5078,271.9777,1,2); // speedy
- AddStaticVehicle(431,1070.0547,-1173.8448,23.3543,13.0680,47,74); // Bus
- AddStaticVehicle(432,1207.1306,-1068.3936,29.2519,180.5274,43,0); // rhino
- AddStaticVehicle(433,1220.9745,-1068.6124,29.6594,177.6321,43,0); // ArmyVan
- AddStaticVehicle(445,1208.6891,-1171.0100,22.7234,179.2157,39,39); // MasterCar
- AddStaticVehicle(447,1261.7057,-1259.2803,13.1898,266.5711,75,2); // Sparrow
- AddStaticVehicle(451,1273.6678,-1340.5182,13.0568,94.5183,46,46); // RockCar
- AddStaticVehicle(458,1273.5133,-1337.7694,13.2263,91.6875,113,1); // tweety
- AddStaticVehicle(459,1266.8473,-1318.5082,13.5481,3.5726,57,57); // van
- AddStaticVehicle(461,1266.8015,-1326.9030,13.0841,99.4259,61,1); // NRG 500
- AddStaticVehicle(463,1266.8225,-1322.8099,13.0424,86.5982,19,19); // herohonda
- AddStaticVehicle(468,1267.0865,-1324.6133,13.1688,86.5616,3,3); // mountainbike
- AddStaticVehicle(599,2178.8323,-1715.2128,13.7068,356.5450,0,1); // Copcar
- AddStaticVehicle(599,2193.6631,-1681.2214,14.2307,348.9936,0,1); // Copcar2
- AddStaticVehicle(602,2276.7937,-1654.7990,15.0076,93.4971,18,1); // GroveCar
- AddStaticVehicle(602,2253.2866,-1664.4680,15.2743,78.4512,69,1); // GroveCar2
- AddStaticVehicle(405,2140.3613,-1619.6730,13.3457,66.4270,75,1); // Sentino
- AddStaticVehicle(407,2047.2688,-1619.5239,13.7821,82.5100,3,1); // firetruck
- AddStaticVehicle(409,2033.0614,-1573.4264,11.1318,354.6015,1,1); // lamogin2
- AddStaticVehicle(521,2483.8755,-1687.1543,13.0779,261.1510,25,118); // BikeFast
- AddStaticVehicle(521,2481.4216,-1686.9470,13.0708,264.7426,118,118); // BikeFast2
- AddStaticVehicle(492,2493.7644,-1681.1852,13.1199,1.9725,28,56); // Grove
- AddStaticVehicle(492,2490.4185,-1681.1168,13.1179,0.0601,28,56); // Grove2
- AddStaticVehicle(487,2505.0510,-1694.7588,18.1349,355.3961,26,3); // HeliGrove
- AddStaticVehicle(487,2491.8323,-1702.0133,22.9708,358.3286,12,39); // HeliGrove2
- AddStaticVehicle(477,2481.0339,-1654.8944,13.1452,90.6455,22,1); // Spirit
- AddStaticVehicle(477,2473.9197,-1654.8267,13.1517,88.7218,75,1); // Spirit2
- AddStaticVehicle(494,2477.0754,-1668.1478,13.2245,10.5209,36,13); // Racer
- AddStaticVehicle(497,2180.3210,-1809.2959,13.5566,269.5506,0,1); // P.Heli
- AddStaticVehicle(488,2175.4768,-1792.4857,13.5378,267.2351,2,26); // P.Heli2
- AddStaticVehicle(490,2158.4021,-1807.6359,13.5063,270.3770,0,0); // FBI
- AddStaticVehicle(523,2165.8101,-1789.9746,13.0909,270.5490,0,0); // P.Bike
- AddStaticVehicle(596,2158.3364,-1801.8176,13.0952,272.1483,0,1); // P.Car SAPD
- AddStaticVehicle(597,2158.1790,-1796.3328,13.1306,268.6962,0,1); // P.Car Sapd2
- AddStaticVehicle(598,2158.5903,-1791.9436,13.1827,270.4935,0,1); // LV.P.Car
- AddStaticVehicle(405,2370.4001,-1927.4319,13.2578,359.1312,24,1); // Sentinel
- AddStaticVehicle(405,2373.8362,-1927.5114,13.2578,358.5366,36,1); // Sentinel1
- AddStaticVehicle(405,2376.8213,-1927.7029,13.2578,359.5027,40,1); // Sentinel2
- AddStaticVehicle(405,2380.2839,-1927.6141,13.2578,359.5026,75,1); // Sentinel3
- AddStaticVehicle(405,2383.6296,-1927.6335,13.2578,359.2918,91,1); // Sentinel4
- AddStaticVehicle(405,2387.1689,-1927.2787,13.2578,0.1460,123,1); // Sentinel5
- AddStaticVehicle(400,2390.6025,-1927.0752,13.4752,357.1971,123,1); // LS
- AddStaticVehicle(400,2394.0081,-1927.1451,13.4751,359.4248,113,1); // LS2
- AddStaticVehicle(400,2397.3535,-1927.0126,13.4752,2.0455,101,1); // LS3
- AddStaticVehicle(400,2400.6892,-1926.7704,13.4752,359.1162,75,1); // LS4
- AddStaticVehicle(402,2419.9651,-1955.6052,13.3773,359.8566,13,13); // Buffalo
- AddStaticVehicle(402,2407.5186,-1957.0090,13.3841,360.0000,22,22); // Buffalo2
- AddStaticVehicle(402,2430.8071,-1937.9637,13.2784,271.2347,30,30); // Buffalo3
- AddStaticVehicle(402,2433.2817,-1927.6732,13.2713,274.1914,39,39); // Buffalo4
- AddStaticVehicle(404,2445.4968,-1928.1254,13.1542,269.2004,119,50); // Perrenial
- AddStaticVehicle(404,2464.3362,-1937.5818,13.1367,267.9217,123,92); // Perrenial2
- AddStaticVehicle(404,2504.4500,-1928.1725,13.1810,272.1997,109,100); // Perrenial3
- AddStaticVehicle(448,2517.6028,-2004.8918,12.8610,89.4118,3,6); // Pizzaboy
- AddStaticVehicle(448,2517.8638,-2007.0017,12.9845,86.7427,3,6); // Pizzaboy1
- AddStaticVehicle(448,2517.9661,-2008.9662,12.9913,84.1989,3,6); // Pizzaboy2
- AddStaticVehicle(448,2517.9976,-2010.4365,13.0051,83.3430,3,6); // Pizzaboy3
- AddStaticVehicle(448,2517.9939,-2012.0682,12.9975,83.6953,3,6); // Pizzaboy4
- AddStaticVehicle(448,2517.9741,-2013.9647,12.9933,85.5033,3,6); // Pizzaboy5
- AddStaticVehicle(509,2485.0137,-2000.0145,13.0593,88.2636,74,1); // Cycle
- AddStaticVehicle(522,2481.3342,-2004.2852,13.1099,84.5174,3,8); // NRG-500
- AddStaticVehicle(522,2481.9580,-2015.2667,13.1226,89.7322,6,25); // NRG-500 1
- AddStaticVehicle(522,2468.7644,-2014.7111,13.0792,94.0564,7,79); // NRG-500 2
- AddStaticVehicle(522,2470.1545,-2003.8513,13.1196,89.0034,8,82); // NRG-500 3
- AddStaticVehicle(522,2456.8511,-2014.7726,13.1199,90.7971,36,105); // NRG-500 4
- AddStaticVehicle(522,2457.8611,-2004.4446,13.1199,92.9314,39,106); // NRG-500 5
- AddStaticVehicle(522,2443.2114,-2004.1488,13.1197,89.9688,51,118); // NRG-500 6
- AddStaticVehicle(522,2443.7319,-2014.8362,13.1220,90.0031,3,3); // NRG-500 7
- AddStaticVehicle(422,2458.8357,-2105.1792,13.5420,0.0000,97,25); // BOBCAT1
- AddStaticVehicle(422,2465.3381,-2105.4600,13.5364,360.0000,101,25); // BOBCAT2
- AddStaticVehicle(422,2478.3684,-2104.7700,13.5379,1.0801,111,31); // BOBCAT3
- AddStaticVehicle(422,2484.3621,-2105.2646,13.5394,0.0040,113,36); // BOBCAT4
- AddStaticVehicle(422,2489.2056,-2104.8030,13.5337,0.0000,83,57); // BOBCAT5
- AddStaticVehicle(422,2506.0557,-2103.4038,13.5285,360.0000,67,59); // BOBCAT6
- AddStaticVehicle(422,2512.1121,-2103.8999,13.5358,360.0000,96,25); // BOBCAT7
- AddStaticVehicle(422,2517.6599,-2103.5920,13.5400,360.0000,97,25); // BOBCAT8
- AddStaticVehicle(444,2536.9224,-2093.5583,13.9182,89.3351,32,42); // MT1
- AddStaticVehicle(444,2536.4678,-2084.9697,13.9182,88.7809,32,53); // MT2
- AddStaticVehicle(406,2395.1260,-2105.0962,15.0721,270.0757,1,1); // Dumper1
- AddStaticVehicle(406,2394.1946,-2095.5815,15.0737,274.8132,1,1); // Dumper2
- AddStaticVehicle(406,2395.0500,-2115.4280,15.0757,268.9387,1,1); // Dumper3
- AddStaticVehicle(406,2392.6919,-2126.3411,15.0718,271.9615,1,1); // Dumper4
- AddStaticVehicle(406,2392.9185,-2136.6382,15.0718,270.5463,1,1); // Dumper5
- AddStaticVehicle(521,2509.2471,-1667.0632,12.9724,11.0754,92,3); // NRG-900
- AddStaticVehicle(521,2505.6589,-1660.8116,12.9802,41.4030,115,118); // NRG-900 1
- AddStaticVehicle(521,2498.1289,-1655.3743,12.9651,76.0863,25,118); // NRG-900 2
- AddStaticVehicle(521,2486.1775,-1654.3292,12.8948,92.3528,36,0); // NRG-900 3
- AddStaticVehicle(521,2475.3152,-1654.1266,12.8954,87.1759,118,118); // NRG-900 4
- AddStaticVehicle(521,2505.5935,-1678.5895,12.9527,316.0556,74,74); // NRG-900 5
- AddStaticVehicle(521,2496.3474,-1683.1573,12.9252,279.3728,75,13); // NRG-900 6
- AddStaticVehicle(521,2484.2302,-1683.6978,12.8961,265.6072,87,118); // NRG-900 7
- AddStaticVehicle(521,2474.4753,-1679.9934,12.9083,236.2824,92,3); // NRG-900 8
- AddStaticVehicle(521,2468.8037,-1669.0658,12.8691,184.2906,115,118); // NRG-900 9
- AddStaticVehicle(492,2461.6118,-1665.2599,13.1708,183.4386,77,26); // GW
- AddStaticVehicle(492,2461.5256,-1652.3140,13.1602,357.4301,81,27); // GW1
- AddStaticVehicle(421,2445.7036,-1664.5223,13.2654,90.8796,25,1); // WT
- AddStaticVehicle(421,2446.2683,-1653.6228,13.2060,90.9431,30,1); // WT1
- AddStaticVehicle(421,2429.0562,-1653.3406,13.3419,89.4645,36,1); // WT2
- AddStaticVehicle(421,2429.3357,-1664.0343,13.3380,88.4793,40,1); // WT3
- AddStaticVehicle(421,2414.0544,-1653.2745,13.3577,91.4085,75,1); // WT4
- AddStaticVehicle(421,2411.1958,-1663.6863,13.3417,88.6849,4,1); // WT5
- AddStaticVehicle(420,2372.2236,-1640.4269,13.2747,358.3339,6,1); // Taxi
- AddStaticVehicle(407,2444.8303,-1645.8955,25.6430,269.2437,3,1); // FireTruck
- AddStaticVehicle(407,2454.0178,-1647.4781,14.0133,43.9573,3,1); // FireTruck2
- AddStaticVehicle(447,2477.7483,-1763.7936,18.5774,274.0621,75,2); // SeaSparrow
- AddStaticVehicle(447,2465.5173,-1763.3555,18.5585,272.2142,75,2); // SeaSparrow2
- AddStaticVehicle(425,2492.3306,-1766.4137,20.5254,269.6210,43,0); // Hunter
- AddStaticVehicle(425,2512.2288,-1767.7311,20.5605,269.6121,43,0); // Hunter2
- AddStaticVehicle(425,2513.6492,-1752.4415,20.6226,0.0000,43,0); // Hunter3
- AddStaticVehicle(520,2426.5317,-1766.9298,18.9512,356.8943,0,0); // Hydra
- AddStaticVehicle(520,2437.4985,-1767.5750,19.4807,358.5970,0,0); // Hydra2
- AddStaticVehicle(424,2676.4814,-1672.0153,9.1768,176.9865,3,6); // BF
- AddStaticVehicle(424,2681.7852,-1672.7461,9.2069,176.8081,6,16); // BF2
- AddStaticVehicle(424,2686.5356,-1672.6938,9.2233,177.4976,15,30); // BF3
- AddStaticVehicle(424,2692.0281,-1672.9834,9.2473,178.1629,24,53); // BF4
- AddStaticVehicle(424,2696.7258,-1673.2333,9.2677,178.5054,35,61); // BF5
- AddStaticVehicle(401,2657.0762,-1711.8643,9.0931,269.9479,52,52); // Bravura
- AddStaticVehicle(413,2658.1755,-1706.9219,9.4093,267.8658,88,1); // Pony
- AddStaticVehicle(421,2657.7122,-1701.8419,9.2009,268.0281,95,1); // WT10
- AddStaticVehicle(445,2658.5186,-1697.1689,9.1951,271.8260,35,35); // Admiral
- AddStaticVehicle(445,2658.3105,-1692.3694,9.1940,271.1955,37,37); // Admiral2
- AddStaticVehicle(522,2692.3093,-1664.4069,11.4409,89.5328,7,79); // NRG-500 10
- AddStaticVehicle(522,2690.3562,-1652.1083,11.3583,88.0348,8,82); // NRG-500 11
- AddStaticVehicle(522,2678.6768,-1651.8588,10.7310,88.1463,36,105); // NRG-500 12
- AddStaticVehicle(522,2678.6804,-1662.9026,10.7342,84.5715,39,106); // NRG-500 13
- AddStaticVehicle(521,2660.4871,-1651.5186,10.4315,93.2513,118,118); // NRG 900
- AddStaticVehicle(521,2660.5427,-1663.0659,10.4599,89.0782,74,74); // NRG 900 1
- AddStaticVehicle(447,2485.5491,-1885.9351,25.5618,268.5951,42,71); // //S
- AddStaticVehicle(488,2494.3628,-1885.9160,25.7329,270.3375,66,53); // //C
- AddStaticVehicle(520,2485.8020,-1893.8844,26.4872,277.0552,57,58); // Hunter
- AddStaticVehicle(425,2483.0298,-1907.2203,26.0381,278.0718,1,107); // Hunter1
- AddStaticVehicle(520,2811.0222,-1677.8855,10.8551,86.0867,73,41); // Hydra2
- AddStaticVehicle(447,2794.7148,-1681.0612,9.8953,86.6106,9,42); // SeaSparrow1
- AddStaticVehicle(488,2794.5808,-1691.5535,10.0492,96.4928,56,103); // Chopper
- AddStaticVehicle(487,2801.3821,-1700.9493,10.0868,82.8507,36,45); // Maverick
- AddStaticVehicle(487,2494.0107,-1703.9204,23.5025,359.3053,36,45); // Maverick2
- AddStaticVehicle(447,757.2067,1862.3777,5.1951,48.5704,75,2); // SP
- AddStaticVehicle(447,756.4552,1871.6578,5.2923,64.4906,75,2); // SP2
- AddStaticVehicle(520,761.3859,1904.0696,6.2402,86.5126,0,0); // Hydra
- AddStaticVehicle(520,761.5409,1894.2866,5.9655,66.9976,0,0); // Hydra1
- AddStaticVehicle(487,793.0231,1889.1609,5.0738,179.5898,54,29); // Maverick-1
- AddStaticVehicle(488,793.6294,1874.9811,4.8725,176.6673,2,29); // NewsChopper
- AddStaticVehicle(402,759.7046,1882.5380,5.1319,87.7412,13,13); // Buffalo-1
- AddStaticVehicle(541,759.1927,1886.7064,4.9911,90.4208,58,8); // Bullet-1
- AddStaticVehicle(521,737.5945,1908.9637,5.0893,183.0786,75,13); // FCR-900
- AddStaticVehicle(521,742.0523,1908.9243,5.0870,180.2185,87,118); // FCR-500-1
- AddStaticVehicle(535,745.6403,1907.1202,5.2409,177.0702,28,1); // Slamvan
- AddStaticVehicle(425,721.7145,1859.7112,6.2813,357.5498,43,0); // Hunter
- AddStaticVehicle(425,723.1152,1901.1169,6.2206,177.0106,43,0); // Hunter2
- AddStaticVehicle(424,694.3813,1822.6816,5.0921,346.5910,2,2); // BF-1
- AddStaticVehicle(424,667.2339,1827.5709,4.9421,351.5940,3,2); // BF-2
- AddStaticVehicle(424,668.4466,1849.7996,4.9293,170.9620,3,6); // BF-3
- AddStaticVehicle(424,698.8973,1844.9548,5.4583,161.6242,6,16); // BF-4
- AddStaticVehicle(541,690.7847,1823.4761,4.9371,349.5574,60,1); // Bullet--1
- AddStaticVehicle(541,671.7170,1827.0016,4.8700,349.5899,68,8); // Bullet--2
- AddStaticVehicle(541,673.7540,1848.8488,4.9643,168.0274,2,1); // Bullet--3
- AddStaticVehicle(506,686.7601,1823.9786,5.0111,349.7748,6,6); // SuperGT-1
- AddStaticVehicle(506,675.1675,1826.8567,4.9555,350.5174,7,7); // SuperGT-2
- AddStaticVehicle(506,678.5184,1847.5010,5.1541,170.5924,52,52); // SuperGT-3
- AddStaticVehicle(463,749.7583,1906.2742,5.1302,168.5053,7,7); // Freeway-1
- AddStaticVehicle(463,761.1920,1877.8574,4.7169,89.2934,11,11); // Freeway-2
- AddStaticVehicle(476,706.2888,1881.8915,6.3079,191.5072,7,6); // Rustler-1
- AddStaticVehicle(476,689.9760,1888.5908,6.3046,197.9025,1,6); // Rustler-2
- AddStaticVehicle(445,681.3220,1947.8711,5.4140,179.9152,35,35); // Admiral-1
- AddStaticVehicle(445,726.7429,1947.7194,5.4140,178.3360,37,37); // Admiral-2
- AddStaticVehicle(424,686.6348,1947.2738,5.3191,179.6827,2,2); // BR---1
- AddStaticVehicle(424,721.6857,1946.9626,5.3206,179.9684,3,2); // BR---2
- AddStaticVehicle(429,716.6511,1946.8947,5.2187,179.8561,13,13); // Banshee
- AddStaticVehicle(429,691.5121,1946.9531,5.2198,178.8748,14,14); // Banshee-1
- AddStaticVehicle(426,696.2285,1946.4182,5.2837,179.1421,42,42); // Admiral-1
- AddStaticVehicle(426,711.6342,1946.7130,5.2826,183.2086,53,53); // Admiral-2
- AddStaticVehicle(409,701.6464,1946.4203,5.3391,181.1694,1,1); // Stretch
- AddStaticVehicle(409,706.3060,1946.4156,5.3390,179.3315,1,1); // Stretch1
- //=============================Health And Armour Texdraws=====================//
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- Health[i] = TextDrawCreate(566.000000, 67.000000, "100%");
- TextDrawBackgroundColor(Health[i], 255);
- TextDrawFont(Health[i], 1);
- TextDrawLetterSize(Health[i], 0.219999, 0.899999);
- TextDrawColor(Health[i], -1);
- TextDrawSetOutline(Health[i], 1);
- TextDrawSetProportional(Health[i], 1);
- Armour[i] = TextDrawCreate(566.000000, 44.000000, "100%");
- TextDrawBackgroundColor(Armour[i], 255);
- TextDrawFont(Armour[i], 1);
- TextDrawLetterSize(Armour[i], 0.219999, 0.899999);
- TextDrawColor(Armour[i], -1);
- TextDrawSetOutline(Armour[i], 1);
- TextDrawSetProportional(Armour[i], 1);
- }
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- switch(classid)
- {
- case 0:
- {
- gTeam[playerid] = TEAM_AMERICA;
- GameTextForPlayer(playerid, "~b~America", 5000, 5);
- SetPlayerPos(playerid, 1522.6503,-806.6635,72.1700);
- SetPlayerFacingAngle(playerid, 4018);
- SetPlayerCameraPos(playerid, 1514.0861,-806.9355,72.0768);
- SetPlayerCameraLookAt(playerid, 1522.6503,-806.6635,72.1700);
- }
- case 1:
- {
- gTeam[playerid] = TEAM_UK;
- GameTextForPlayer(playerid, "~g~UK", 5000, 5);
- SetPlayerPos(playerid, 1279.3276,-778.4965,95.9663);
- SetPlayerFacingAngle(playerid,8298);
- SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665);
- SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663);
- }
- case 2:
- {
- gTeam[playerid] = TEAM_BANGLADESH;
- GameTextForPlayer(playerid, "~y~Bangladesh", 5000, 5);
- SetPlayerPos(playerid,1279.3276,-778.4965,95.9663);
- SetPlayerFacingAngle(playerid,8298);
- SetPlayerCameraPos(playerid,1266.1062,-778.3137,95.9665);
- SetPlayerCameraLookAt(playerid,1279.3276,-778.4965,95.9663);
- }
- case 3:
- {
- gTeam[playerid] = TEAM_RUSSIA;
- GameTextForPlayer(playerid, "~w~RUSSIA", 5000, 5);
- SetPlayerPos(playerid,2163.7188,-1798.8535,13.3708);
- SetPlayerFacingAngle(playerid,2612);
- SetPlayerCameraPos(playerid,2175.6838,-1799.4097,13.3651);
- SetPlayerCameraLookAt(playerid,2163.7188,-1798.8535,13.3708);
- }
- case 4:
- {
- gTeam[playerid] = TEAM_INDIA;
- GameTextForPlayer(playerid, "~w~INDIA", 5000, 5);
- SetPlayerPos(playerid,237.5466,-170.9398,1.4297);
- SetPlayerFacingAngle(playerid,5581);
- SetPlayerCameraPos(playerid,227.5716,-170.0129,1.5781);
- SetPlayerCameraLookAt(playerid,237.5466,-170.9398,1.4297);
- }
- case 5:
- {
- gTeam[playerid] = TEAM_PAKISTAN;
- GameTextForPlayer(playerid, "~w~PAKISTAN", 5000, 5);
- SetPlayerPos(playerid,1292.7701,268.1389,19.4111);
- SetPlayerFacingAngle(playerid,4303);
- SetPlayerCameraPos(playerid,1301.0077,264.1090,19.4055);
- SetPlayerCameraLookAt(playerid,1292.7701,268.1389,19.4111);
- }
- case 6:
- {
- gTeam[playerid] = TEAM_NEPAL;
- GameTextForPlayer(playerid, "~w~NEPAL", 5000, 5);
- SetPlayerPos(playerid,2339.0981,28.5481,26.3359);
- SetPlayerFacingAngle(playerid,3545);
- SetPlayerCameraPos(playerid,2348.6902,28.8436,26.3359);
- SetPlayerCameraLookAt(playerid,2339.0981,28.5481,26.3359);
- }
- case 7:
- {
- gTeam[playerid] = TEAM_NEPAL;
- GameTextForPlayer(playerid, "~w~Brazil", 5000, 5);
- SetPlayerPos(playerid,-2018.8489,156.2464,28.1653);
- SetPlayerFacingAngle(playerid,3123);
- SetPlayerCameraPos(playerid,-2012.0396,156.3659,27.6875);
- SetPlayerCameraLookAt(playerid,-2018.8489,156.2464,28.1653);
- }
- case 8:
- {
- gTeam[playerid] = TEAM_CHINA;
- GameTextForPlayer(playerid, "~w~China", 5000, 5);
- SetPlayerPos(playerid,-1820.0067,612.9324,35.0156);
- SetPlayerFacingAngle(playerid,2069);
- SetPlayerCameraPos(playerid,-1819.7141,605.0435,35.0156);
- SetPlayerCameraLookAt(playerid,-1820.0067,612.9324,35.0156);
- }
- case 9:
- {
- gTeam[playerid] = TEAM_GREECE;
- GameTextForPlayer(playerid, "~w~Greece", 5000, 5);
- SetPlayerPos(playerid,-2621.5823,1409.0161,7.1016);
- SetPlayerFacingAngle(playerid,0545);
- SetPlayerCameraPos(playerid,-2618.0957,1398.3645,7.1016);
- SetPlayerCameraLookAt(playerid,-2621.5823,1409.0161,7.1016);
- }
- case 10:
- {
- gTeam[playerid] = TEAM_SINGAPORE;
- GameTextForPlayer(playerid, "~w~Singapore", 5000, 5);
- SetPlayerPos(playerid,2307.1194,1056.3799,10.8203);
- SetPlayerFacingAngle(playerid,5391);
- SetPlayerCameraPos(playerid,2320.0010,1056.2606,10.8203);
- SetPlayerCameraLookAt(playerid,2307.1194,1056.3799,10.8203);
- }
- case 11:
- {
- gTeam[playerid] = TEAM_IRAQ;
- GameTextForPlayer(playerid, "~w~Iraq", 5000, 5);
- SetPlayerPos(playerid,2177.3914,1678.0061,10.8203);
- SetPlayerFacingAngle(playerid,5391);
- SetPlayerCameraPos(playerid,2320.0010,1056.2606,10.8203);
- SetPlayerCameraLookAt(playerid,2307.1194,1056.3799,10.8203);
- }
- }
- {
- SetPlayerToTeamColour(playerid); // calls the custom function
- }
- return 1;
- }
- SetPlayerToTeamColour(playerid)
- {
- if(gTeam[playerid] == TEAM_AMERICA)
- {
- SetPlayerColor(playerid,COLOR_BLUE);
- }
- else if(gTeam[playerid] == TEAM_UK)
- {
- SetPlayerColor(playerid,COLOR_RED);
- }
- else if(gTeam[playerid] == TEAM_BANGLADESH)
- {
- SetPlayerColor(playerid,COLOR_GREEN);
- }
- else if(gTeam[playerid] == TEAM_RUSSIA)
- {
- SetPlayerColor(playerid,COLOR_ORANGE);
- }
- else if(gTeam[playerid] == TEAM_INDIA)
- {
- SetPlayerColor(playerid,COLOR_INDIA);
- }
- else if(gTeam[playerid] == TEAM_PAKISTAN)
- {
- SetPlayerColor(playerid,COLOR_PAKISTAN);
- }
- else if(gTeam[playerid] == TEAM_NEPAL)
- {
- SetPlayerColor(playerid,COLOR_NEPAL);
- }
- else if(gTeam[playerid] == TEAM_BRAZIL)
- {
- SetPlayerColor(playerid,COLOR_BRAZIL);
- }
- else if(gTeam[playerid] == TEAM_CHINA)
- {
- SetPlayerColor(playerid,COLOR_CHINA);
- }
- else if(gTeam[playerid] == TEAM_GREECE)
- {
- SetPlayerColor(playerid,COLOR_GREECE);
- }
- else if(gTeam[playerid] == TEAM_SINGAPORE)
- {
- SetPlayerColor(playerid,COLOR_SINGAPORE);
- }
- else if(gTeam[playerid] == TEAM_IRAQ)
- {
- SetPlayerColor(playerid,COLOR_IRAQ);
- }
- }
- public OnPlayerConnect(playerid)
- {
- //GangZones
- GangZoneShowForPlayer(playerid, Zone[UnityStation], 0xFFFFFF88);
- GangZoneShowForPlayer(playerid, Zone[HOTEL],0xFFFFFF88);
- GangZoneShowForPlayer(playerid, Zone[CluckinBell], 0xFFFFFF88);
- GangZoneShowForPlayer(playerid, Zone[Gym], 0xFFFFFF88);
- SendClientMessage(playerid, COLOR_GREEN,"If You Did Not Register Please Type /register [password] To Create Your Account And Log In");
- SendClientMessage(playerid, COLOR_RED,"Welcome To Modern War V2.3 Enjoy Your Stay And Play!");
- Streaks[playerid] = 0;
- SendClientMessage(playerid,COLOR_JOIN, "Loading Data Please Wait ...");
- new Country[256];
- GetPlayerCountry(playerid,Country);
- new mess[256],IP[256];
- GetPlayerIp(playerid,IP,sizeof(IP));
- format(mess,sizeof(mess),"|-| Server |-| Player {FFFFFF} %s {4165FF} Has Joined The Server {D64343} [ Country: %s | IP: %s | Ping: %i ]",GetPName(playerid),Country,IP,GetPlayerPing(playerid));
- printf(mess);
- SendClientMessageToAll(COLOR_JOIN,mess);
- //Death Cam
- Died[playerid] = -1;
- KilledBy[playerid] = -1;
- //Score Timer
- GiveScoreTimer[playerid] = SetTimerEx ("GivePlayerScore", 1000*60, true, "d", playerid);
- //Speedo Meter System
- SPEEDOS[playerid] = TextDrawCreate(10.0,200.0," ");
- TextDrawShowForPlayer(playerid,SPEEDOS[playerid]);
- //Vehicle Healtho Meter
- HEALTH[playerid] = TextDrawCreate(10.0,200.0," ");
- TextDrawShowForPlayer(playerid,HEALTH[playerid]);
- //==========================Admin System============================
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Please Type Your Desired Password To Log In.","Login","Quit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Please Type A Password To Register An Account.","Register","Quit");
- }
- //=================================================================
- //============================Anti-Money-Hack=================================//
- NewMoney[playerid] = GetPlayerMoney(playerid);
- //============================================================================//
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- Streaks[playerid] = 0;
- SendClientMessage(playerid, COLOR_RED,"You Are Disconnect For Your Are Leaving Or Lost Connection Or Kicked/Banned");
- //Death Cam
- Died[playerid] = 0;
- KilledBy[playerid] = 0;
- //Score Timer
- KillTimer(GiveScoreTimer[playerid]);
- //===============================Admin System=================
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_WriteInt(File,"Donor",vip[playerid]);
- INI_WriteInt(File,"Score",GetPlayerScore(playerid));
- INI_Close(File);
- //============================================================
- new Country[256];
- GetPlayerCountry(playerid,Country);
- new mess[256],IP[256];
- GetPlayerIp(playerid,IP,sizeof(IP));
- format(mess,sizeof(mess),"|-| Server |-| Player {FFFFFF} %s {4165FF} has exited from the server {D64343} [ Country: %s | IP: %s | Ping: %i ]",GetPName(playerid),Country,IP,GetPlayerPing(playerid));
- printf(mess);
- SendClientMessageToAll(COLOR_JOIN,mess);
- //Hitman System
- isHitman[playerid] = 0;
- //Laser System
- {
- SetPVarInt(playerid, "laser", 0);
- RemovePlayerAttachedObject(playerid, 0);
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid, COLOR_BLUE,"[READ CAREFULLY] All The Weapon Shops In The Map Are Shown In A Pink Color Zone");
- //GangZones
- GangZoneShowForPlayer(playerid, America, COLOR_BLUE);
- GangZoneShowForPlayer(playerid, UK, 0xFF000096);
- GangZoneShowForPlayer(playerid, Bangladesh, 0x00FF8096);
- GangZoneShowForPlayer(playerid, Russia, 0xFF800096);
- GangZoneShowForPlayer(playerid, India, 0x80000096);
- GangZoneShowForPlayer(playerid, Pakistan, 0x40808096);
- GangZoneShowForPlayer(playerid, Nepal, 0x8000FF96);
- GangZoneShowForPlayer(playerid, Brazil, 0xB7B70096);
- GangZoneShowForPlayer(playerid, China, 0x80808096);
- GangZoneShowForPlayer(playerid, Greece, 0x00000096);
- GangZoneShowForPlayer(playerid, Singapore, 0x00FFFF96);
- GangZoneShowForPlayer(playerid, Iraq, 0x8080C096);
- //Weapon-Shops
- GangZoneShowForPlayer(playerid, WS, 0xFF00FF96);
- //Fuel System
- td_fuel[playerid] = TextDrawCreate(45,324,"Fuel: 100"); //create the textdraw at position
- TextDrawBackgroundColor(td_fuel[playerid],COLOR_GREEN); //setting an nice backgroundcolor
- TextDrawFont(td_fuel[playerid],3); //font type of textdraw
- TextDrawLetterSize(td_fuel[playerid],0.699999,1.700000); //size...
- TextDrawColor(td_fuel[playerid],0x000000ff); //color
- TextDrawSetShadow(td_fuel[playerid],3); //dropping the shadow
- return 1;
- //Class System
- ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Private Class\nSniper Class\nEngineer Class\nMedic Class\nPilot Class\nSpy Class", "Choose","");
- if(gPlayerClass[playerid] == PRIVATE)//This is for the First soldier class.
- {
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 31, 200);//m4
- GivePlayerWeapon(playerid, 25, 100);//mp5
- GivePlayerWeapon(playerid, 24, 70);//deagle
- }
- else if(gPlayerClass[playerid] == SNIPER)//This is for the Second Sniper class.
- {
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 34, 250);//sniper
- GivePlayerWeapon(playerid, 29, 250);//mp5
- GivePlayerWeapon(playerid, 4, 1);//knife
- }
- else if(gPlayerClass[playerid] == ENGINEER)//This is for the Second Engineer class.
- {
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 27, 200);//spas12
- GivePlayerWeapon(playerid, 23, 200);//silent pistol
- GivePlayerWeapon(playerid, 35, 2);//rpg
- GivePlayerWeapon(playerid, 16, 2);//grenade
- }
- else if(gPlayerClass[playerid] == MEDIC)//This is for the Second Jetrooper class.
- {
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 32, 500);//tec-9
- GivePlayerWeapon(playerid, 22, 500);//colt
- GivePlayerWeapon(playerid, 4, 1);//knife
- }
- else if(gPlayerClass[playerid] == PILOT)//This is for the Second Pilot class.
- {
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 24, 200);//deagle
- GivePlayerWeapon(playerid, 17, 4);//moltove
- GivePlayerWeapon(playerid, 25, 100);//shotgun
- }
- else if(gPlayerClass[playerid] == SPY)//This is for the Second Spy class.
- {
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 29, 200);//mp5
- GivePlayerWeapon(playerid, 23, 200);//silent pistol
- GivePlayerWeapon(playerid, 4, 1);//knife
- GivePlayerWeapon(playerid, 18, 2);//moltove
- }
- //Laser System
- if (!GetPVarInt(playerid, "color")) SetPVarInt(playerid, "color", 18643);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- //===============================Admin System===================
- PlayerInfo[killerid][pKills]++;
- PlayerInfo[playerid][pDeaths]++;
- //==============================================================
- KillTimer(timer[playerid][UnityStation]);
- KillTimer(timer[playerid][CluckinBell]);
- KillTimer(timer[playerid][Gym]);
- KillTimer(timer[playerid][HOTEL]);
- if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID ) { //check if the player is connected and it's a VALID KILL
- if(GetPlayerWantedLevel(killerid) < 6) //if the player's wantedlevel is under 6
- {
- SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1); //increase it by 1
- }
- Streaks[killerid] ++; //the sign '++' means, increase the variable for the killerid by 1
- GivePlayerMoney(killerid, 2000); //if you like, give the killer some money, else comment this line out
- }
- SetPlayerWantedLevel(playerid, 0); //the player who died will get his wanted level reset to 0
- Streaks[playerid] = 0; //and his streak will end, while giving the value '0' to this variable
- SetPlayerScore(killerid,GetPlayerScore(killerid)+2); //not really necessary, would increase the player's score by 1 point
- switch(Streaks[killerid]) //IMPORTANT: with the function "switch", you're switching / toggling through the killstreaks of a player (Streals). you need the killerid here, because the playerid is the one which is GETTING killed
- {
- case 2: // we won't start with the first kill (case 1), because it wouldn't be countable as streak
- {
- GivePlayerWeapon(killerid, 29,50);
- GivePlayerWeapon(killerid, 30,50);
- SendClientMessageToAll(COLOR_GREEN,"%d has made a double kill");
- SendClientMessage(killerid,COLOR_WHITE,"You have earned 50 MP5 ammo and 50 AK-47 ammo for double kill");
- }
- case 3:
- {
- GivePlayerWeapon(killerid, 29,100);
- GivePlayerWeapon(killerid, 30,100);
- SendClientMessageToAll(COLOR_GREEN,"%d has made a Triple Kill");
- SendClientMessage(killerid,COLOR_WHITE,"You have earned 100 MP5 ammo and 100 AK-47 ammo for triple kill");
- }
- case 4:
- {
- SendClientMessageToAll(COLOR_GREEN,"%d has made a 4 Kills in a row");
- }
- case 5:
- {
- SendClientMessageToAll(COLOR_GREEN,"%d has made a 5 Kills in a row");
- }
- case 6:
- {
- GivePlayerWeapon(killerid, 29,150);
- GivePlayerWeapon(killerid, 30,150);
- SendClientMessageToAll(COLOR_GREEN,"%d has made a 6 Kills in a row");
- SendClientMessage(killerid,COLOR_WHITE,"You have earned 150 MP5 ammo and 150 AK-47 ammo 6 kills in a row");
- Died[playerid] = 1;
- if(Died[playerid] == 1)
- {
- Died[playerid] = 0;
- if(KilledBy[playerid] != INVALID_PLAYER_ID)
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectatePlayer(playerid, killerid);
- SendClientMessage(playerid, COLOR_RED, "You Have Been Killed By A Player So Your Watching And Spectating Him And Your Now Using Our Server's Death Cam.");
- SetTimerEx("EndDeathCam", 10000, 1, "i", playerid);
- }
- else
- {
- TogglePlayerSpectating(playerid, 0);
- }
- }
- }
- //Hitman System
- if(killerid != INVALID_PLAYER_ID)
- {
- if(isHitman[killerid] == 1)
- {
- if(hit[playerid] > 0)
- {
- GivePlayerMoney(killerid, hit[playerid]);
- new result[128];
- new tname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, tname, sizeof(tname));
- format(result, sizeof(result), "HITMAN: You killed %s and collected the hit of $%i!", tname, hit[playerid]);
- SendClientMessage(playerid, -1, result);
- hit[playerid] = 0;
- }
- }
- }
- return 1;
- }
- //CAPTURE ZONES---------------------------SOME CREDITS TO JARNU-----------------
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == CP[UnityStation])
- {
- if(tCP[UnityStation] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
- if(UnderAttack[UnityStation] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
- UnderAttack[UnityStation] = 1;
- timer[playerid][UnityStation] = SetTimerEx("SetZone",30000,false,"i", playerid);
- SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
- new string[128];
- format(string, sizeof(string),"[ATTENTION]: Unity Station is Being taken Over!");
- SendClientMessageToAll(COLOR_RED,string);
- iCP[playerid] = UnityStation;
- }
- if(checkpointid == CP[CluckinBell])
- {
- if(tCP[CluckinBell] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
- if(UnderAttack[CluckinBell] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
- UnderAttack[CluckinBell] = 1;
- timer[playerid][CluckinBell] = SetTimerEx("SetZone",30000, false, "i", playerid);
- SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
- new string[128];
- format(string, sizeof(string),"[ATTENTION]: CluckinBell is Being taken Over!");
- SendClientMessageToAll(COLOR_RED,string);
- iCP[playerid] = CluckinBell;
- }
- if(checkpointid == CP[Gym])
- {
- if(tCP[Gym] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
- if(UnderAttack[Gym] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
- UnderAttack[Gym] = 1;
- timer[playerid][Gym] = SetTimerEx("SetZone",30000, false, "i", playerid);
- SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
- new string[128];
- format(string, sizeof(string),"[ATTENTION]: Gym is Being taken Over!");
- SendClientMessageToAll(COLOR_RED,string);
- iCP[playerid] = Gym;
- }
- if(checkpointid == CP[HOTEL])
- {
- if(tCP[HOTEL] == gTeam[playerid]) return SendClientMessage(playerid, COLOR_RED,"This zone is already captured by your team");
- if(UnderAttack[HOTEL] == 1) return SendClientMessage(playerid, COLOR_RED,"This zone is already being taken over!");
- UnderAttack[HOTEL] = 1;
- timer[playerid][HOTEL] = SetTimerEx("SetZone",30000, false, "i", playerid);
- SendClientMessage(playerid, COLOR_YELLOW,"You're Capturing this zone! Wait here for 30 Seconds!");
- new string[128];
- format(string, sizeof(string),"[ATTENTION]: HOTEL is Being taken Over!");
- SendClientMessageToAll(COLOR_RED,string);
- iCP[playerid] = HOTEL;
- }
- return 1;
- }
- public OnPlayerLeaveDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == CP[UnityStation])
- {
- GameTextForPlayer(playerid, "Left CP", 1000, 3);
- KillTimer(timer[playerid][UnityStation]);
- TogglePlayerDynamicCP(playerid, CP[UnityStation], 0);
- UnderAttack[UnityStation] = 0;
- iCP[playerid] = -1;
- }
- if(checkpointid == CP[CluckinBell])
- {
- GameTextForPlayer(playerid, "Left CP", 1000, 3);
- KillTimer(timer[playerid][CluckinBell]);
- TogglePlayerDynamicCP(playerid, CP[CluckinBell], 0);
- UnderAttack[CluckinBell] = 0;
- iCP[playerid] = -1;
- }
- if(checkpointid == CP[Gym])
- {
- GameTextForPlayer(playerid, "Left CP", 1000, 3);
- KillTimer(timer[playerid][Gym]);
- TogglePlayerDynamicCP(playerid, CP[Gym], 0);
- UnderAttack[Gym] = 0;
- iCP[playerid] = -1;
- }
- if(checkpointid == CP[HOTEL])
- {
- GameTextForPlayer(playerid, "Left CP", 1000, 3);
- KillTimer(timer[playerid][HOTEL]);
- TogglePlayerDynamicCP(playerid, CP[HOTEL], 0);
- UnderAttack[HOTEL] = 0;
- iCP[playerid] = -1;
- }
- return 1;
- }
- forward SetZone(playerid);
- public SetZone(playerid)
- {
- SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
- GivePlayerMoney(playerid,5000);
- SendClientMessage(playerid,COLOR_RED,"Congratulation! You have Gained 5 Scores & 5000$ Money ");
- UnderAttack[UnityStation] = 0;
- UnderAttack[CluckinBell] = 0;
- UnderAttack[Gym] = 0;
- UnderAttack[HOTEL] = 0;
- return 1;
- }
- forward SetGangZone(playerid);
- public SetGangZone(playerid)
- {
- if(gTeam[playerid] == TEAM_AMERICA && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_BLUE);
- new string[64], pName5[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName5,sizeof(pName5));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For America",pName5);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_AMERICA;
- }
- if(gTeam[playerid] == TEAM_UK && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_RED);
- new string[64], pName4[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName4,sizeof(pName4));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For UK",pName4);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_UK;
- }
- if(gTeam[playerid] == TEAM_BANGLADESH && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_GREEN);
- new string[64], pName3[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName3,sizeof(pName3));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For Bangladesh",pName3);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_BANGLADESH;
- }
- if(gTeam[playerid] == TEAM_RUSSIA && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_ORANGE);
- new string[64], pName2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName2,sizeof(pName2));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For Russisa",pName2);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_RUSSIA;
- }
- if(gTeam[playerid] == TEAM_INDIA && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_INDIA);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For INDIA ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_INDIA;
- }
- if(gTeam[playerid] == TEAM_PAKISTAN && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_PAKISTAN);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For PAKISTAN ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_PAKISTAN;
- }
- if(gTeam[playerid] == TEAM_NEPAL && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_NEPAL);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For NEPAL ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_NEPAL;
- }
- if(gTeam[playerid] == TEAM_BRAZIL && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_BRAZIL);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For BRAZIL ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_BRAZIL;
- }
- if(gTeam[playerid] == TEAM_CHINA && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_CHINA);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For CHINA ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_CHINA;
- }
- if(gTeam[playerid] == TEAM_GREECE && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_GREECE);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For GREECE ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_GREECE;
- }
- if(gTeam[playerid] == TEAM_SINGAPORE && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_SINGAPORE);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For SINGAPORE ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_SINGAPORE;
- }
- if(gTeam[playerid] == TEAM_IRAQ && iCP[playerid] == UnityStation)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_IRAQ);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Unity Station For IRAQ ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[UnityStation] = TEAM_IRAQ;
- }
- if(gTeam[playerid] == TEAM_IRAQ && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[Gym],COLOR_IRAQ);
- new string[64], pName5[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName5,sizeof(pName5));
- format(string,sizeof string,"Server News: %s has captured CluckinBell For Iraq",pName5);
- SendClientMessageToAll(0x00FFFFFF,string);
- tCP[UnityStation] = TEAM_IRAQ;
- }
- //=============================CluckinBell====================================//
- if(gTeam[playerid] == TEAM_AMERICA && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_BLUE);
- new string[64], pName5[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName5,sizeof(pName5));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For America",pName5);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_AMERICA;
- }
- if(gTeam[playerid] == TEAM_UK && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_RED);
- new string[64], pName4[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName4,sizeof(pName4));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For UK",pName4);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_UK;
- }
- if(gTeam[playerid] == TEAM_BANGLADESH && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_GREEN);
- new string[64], pName3[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName3,sizeof(pName3));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For Bangladesh",pName3);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_BANGLADESH;
- }
- if(gTeam[playerid] == TEAM_RUSSIA && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_ORANGE);
- new string[64], pName2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName2,sizeof(pName2));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For Russisa",pName2);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_RUSSIA;
- }
- if(gTeam[playerid] == TEAM_INDIA && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_INDIA);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For INDIA ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_INDIA;
- }
- if(gTeam[playerid] == TEAM_PAKISTAN && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_PAKISTAN);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For PAKISTAN ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_PAKISTAN;
- }
- if(gTeam[playerid] == TEAM_NEPAL && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_NEPAL);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For NEPAL ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_NEPAL;
- }
- if(gTeam[playerid] == TEAM_BRAZIL && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_BRAZIL);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For BRAZIL ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_BRAZIL;
- }
- if(gTeam[playerid] == TEAM_CHINA && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_CHINA);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For CHINA ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_CHINA;
- }
- if(gTeam[playerid] == TEAM_GREECE && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_GREECE);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For GREECE ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_GREECE;
- }
- if(gTeam[playerid] == TEAM_SINGAPORE && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_SINGAPORE);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For SINGAPORE ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_SINGAPORE;
- }
- if(gTeam[playerid] == TEAM_IRAQ && iCP[playerid] == CluckinBell)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_IRAQ);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured CluckinBell For IRAQ ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[CluckinBell] = TEAM_IRAQ;
- }
- //============================================================================//
- //====================================Gym=====================================//
- if(gTeam[playerid] == TEAM_AMERICA && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_BLUE);
- new string[64], pName5[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName5,sizeof(pName5));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For America",pName5);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_AMERICA;
- }
- if(gTeam[playerid] == TEAM_UK && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_RED);
- new string[64], pName4[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName4,sizeof(pName4));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For UK",pName4);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_UK;
- }
- if(gTeam[playerid] == TEAM_BANGLADESH && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_GREEN);
- new string[64], pName3[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName3,sizeof(pName3));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For Bangladesh",pName3);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_BANGLADESH;
- }
- if(gTeam[playerid] == TEAM_RUSSIA && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_ORANGE);
- new string[64], pName2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName2,sizeof(pName2));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For Russisa",pName2);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_RUSSIA;
- }
- if(gTeam[playerid] == TEAM_INDIA && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_INDIA);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For INDIA ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_INDIA;
- }
- if(gTeam[playerid] == TEAM_PAKISTAN && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_PAKISTAN);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For PAKISTAN ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_PAKISTAN;
- }
- if(gTeam[playerid] == TEAM_NEPAL && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_NEPAL);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For NEPAL ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_NEPAL;
- }
- if(gTeam[playerid] == TEAM_BRAZIL && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_BRAZIL);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For BRAZIL ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_BRAZIL;
- }
- if(gTeam[playerid] == TEAM_CHINA && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_CHINA);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For CHINA ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_CHINA;
- }
- if(gTeam[playerid] == TEAM_GREECE && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_GREECE);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For GREECE ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_GREECE;
- }
- if(gTeam[playerid] == TEAM_SINGAPORE && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_SINGAPORE);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For SINGAPORE ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_SINGAPORE;
- }
- if(gTeam[playerid] == TEAM_IRAQ && iCP[playerid] == Gym)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_IRAQ);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured Gym For IRAQ ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[Gym] = TEAM_IRAQ;
- }
- //============================================================================//
- //====================================HOTEL===================================//
- if(gTeam[playerid] == TEAM_AMERICA && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_BLUE);
- new string[64], pName5[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName5,sizeof(pName5));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For America",pName5);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_AMERICA;
- }
- if(gTeam[playerid] == TEAM_UK && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_RED);
- new string[64], pName4[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName4,sizeof(pName4));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For UK",pName4);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_UK;
- }
- if(gTeam[playerid] == TEAM_BANGLADESH && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_GREEN);
- new string[64], pName3[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName3,sizeof(pName3));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For Bangladesh",pName3);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_BANGLADESH;
- }
- if(gTeam[playerid] == TEAM_RUSSIA && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_ORANGE);
- new string[64], pName2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName2,sizeof(pName2));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For Russisa",pName2);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_RUSSIA;
- }
- if(gTeam[playerid] == TEAM_INDIA && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_INDIA);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For INDIA ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_INDIA;
- }
- if(gTeam[playerid] == TEAM_PAKISTAN && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_PAKISTAN);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For PAKISTAN ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_PAKISTAN;
- }
- if(gTeam[playerid] == TEAM_NEPAL && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_NEPAL);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For NEPAL ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_NEPAL;
- }
- if(gTeam[playerid] == TEAM_BRAZIL && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_BRAZIL);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For BRAZIL ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_BRAZIL;
- }
- if(gTeam[playerid] == TEAM_CHINA && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_CHINA);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For CHINA ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_CHINA;
- }
- if(gTeam[playerid] == TEAM_GREECE && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_GREECE);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For GREECE ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_GREECE;
- }
- if(gTeam[playerid] == TEAM_SINGAPORE && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_SINGAPORE);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For SINGAPORE ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_SINGAPORE;
- }
- if(gTeam[playerid] == TEAM_IRAQ && iCP[playerid] == HOTEL)
- {
- GangZoneShowForAll(Zone[UnityStation],COLOR_IRAQ);
- new string[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,sizeof(pName1));
- format(string,sizeof string,"Server Dangerous News: %s has captured HOTEL For IRAQ ",pName1);
- SendClientMessageToAll(0x008000AA,string);
- tCP[HOTEL] = TEAM_IRAQ;
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid,text[])
- {
- if(strval(text) == ContestAnswer && ContestAnswer != -1) // Checks if the text the player has typed is equal to the Contest Answer, but isn't -1.
- {
- OnPlayerWinContest(playerid); // This'll direct the script to the OnPlayerWinContest callback.
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/kill", cmdtext, true, 10) == 0)
- {
- SetPlayerHealth(playerid, 0.0);
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)YOU HAVE COMMITED SUICIDE.!");
- return 1;
- }
- if (strcmp("/help", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)Welcome To Los Santos Cops VS Terrorist.!");
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)Hope You Enjoy The Game It's All About Killing Try /cmds /rules.!");
- return 1;
- }
- if (strcmp("/rules", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)1.Do not car park.!");
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)2.Do not kill with heli blade.!");
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)3.Do not kill players with armoured vehicle in spawn position.!");
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)4.Do not disrespect players.!");
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)5.Treat Everyone As Your Own Brother.!");
- return 1;
- }
- if (strcmp("/banrules", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "(INFO)1.Do not disrespect player it could cause immediate ban.!");
- SendClientMessage(playerid, COLOR_YELLOW, "(INFO)2.Do not cheat it will cause you ban without warnings.!");
- SendClientMessage(playerid, COLOR_YELLOW, "(INFO)3.Massive spawn killing will result ban after 2 kicks.!");
- SendClientMessage(playerid, COLOR_YELLOW, "(INFO)4.Do not raise your score in anyways very early that will also cause ban.!");
- return 1;
- }
- if (strcmp("/cmds", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN, "(INFO)/banrules,/help,/kill,/afk,/shop.!");
- return 1;
- }
- return 0;
- }
- CMD:laseron(playerid, params[])
- {
- SetPVarInt(playerid, "laser", 1);
- SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
- return 1;
- }
- CMD:laseroff(playerid, params[])
- {
- SetPVarInt(playerid, "laser", 0);
- RemovePlayerAttachedObject(playerid, 0);
- return 1;
- }
- CMD:hits(playerid, params[])
- {
- if(isHitman[playerid] == 1)
- {
- SendClientMessage(playerid, -1, "--- Current available contracts ---");
- new string[128];
- new tname[MAX_PLAYER_NAME];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(hit[i] > 0)
- {
- format(string, sizeof(string), "Name: %s | Amount: %i", tname, hit[i]);
- SendClientMessage(playerid, -1, string);
- }
- }
- }
- }
- return 1;
- }
- CMD:contract(playerid, params[])
- {
- new id, amount;
- if(sscanf(params, "ui", id, amount)) return SendClientMessage(playerid, -1, "{A3A1A0}Usage: /contract [id] [amount]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "{A3A1A0}That player is not connected.");
- if(isHitman[playerid] == 1) return SendClientMessage(playerid, -1, "{A3A1A0}Hitmen can not place contracts.");
- if(isHitman[id] == 1) return SendClientMessage(playerid, -1, "{A3A1A0}That player already has the maximum hit on him.");
- if(hit[id] == 150000 || hit[id] > 150000) return SendClientMessage(playerid, -1, "{A3A1A0}That player already has the maximum hit on him.");
- if(amount < 50000 || amount > 150000) return SendClientMessage(playerid, -1, "{A3A1A0}Hits range from $50,000 - $150,000.");
- if(hit[id] + amount > 150000) return SendClientMessage(playerid, -1, "{A3A1A0}That hit is too high for this player, please lower it.");
- hit[id] = hit[id] + amount;
- new result[128];
- new tname[MAX_PLAYER_NAME];
- GetPlayerName(id, tname, sizeof(tname));
- format(result, sizeof(result), "You have placed a hit of $%i on %s.", amount, tname);
- SendClientMessage(playerid, -1, result);
- new string[128];
- format(string, sizeof(string), "HITMAN: A new hit is available. Name: %s | Amount: $%i", tname, hit[id]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(isHitman[i])
- {
- SendClientMessage(i, -1, string);
- }
- }
- }
- return 1;
- }
- CMD:help(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)Welcome To Modern War Battalation.!");
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)Hope You Enjoy The Game It's All About Killing Try /cmds /rules.!");
- return true;
- }
- CMD:kill(playerid, params[])
- {
- SetPlayerHealth(playerid, 0.0);
- SendClientMessage(playerid, COLOR_ORANGE, "(INFO)YOU HAVE COMMITED SUICIDE.!");
- return true;
- }
- CMD:rules(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW,"1.Do not car park.!");
- SendClientMessage(playerid, COLOR_YELLOW,"2.Do not kill with heli blade.!");
- SendClientMessage(playerid, COLOR_YELLOW,"3.Do not kill players with armoured vehicle in spawn position.!");
- SendClientMessage(playerid, COLOR_YELLOW,"4.Do not disrespect players.!");
- SendClientMessage(playerid, COLOR_YELLOW,"5.Treat Everyone As Your Own Brother.!");
- return true;
- }
- CMD:cmds(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_WHITE,"/help,/rules,/kill,/banrules,/shop,/jetpack");
- SendClientMessage(playerid, COLOR_WHITE,"/healme,/armourme,/pm,/refuel,/buy,/derby,/leave");
- SendClientMessage(playerid, COLOR_WHITE,"/helpme,/stats,/report");
- return true;
- }
- CMD:banrules(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "(INFO)1.Do not disrespect player it could cause immediate ban.!");
- SendClientMessage(playerid, COLOR_YELLOW, "(INFO)2.Do not cheat it will cause you ban without warnings.!");
- SendClientMessage(playerid, COLOR_YELLOW, "(INFO)3.Massive spawn killing will result ban after 2 kicks.!");
- SendClientMessage(playerid, COLOR_YELLOW, "(INFO)4.Do not raise your score in anyways very early that will also cause ban.!");
- return true;
- }
- CMD:shop(playerid, params[])//If the player types /shop
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.0, 0.0, 0.0, 0.0))//If there within the coordinates set for the Weapon Shop(For multiple shop locations do "0.0, 0.0, 0.0 || 0.0, 0.0, 0.0 || 0.0, 0.0, 0.0" etc.)
- {
- ShowPlayerDialog(playerid, SHOP_DIALOG, DIALOG_STYLE_LIST, "Weapon Shop", "Deagle: $500\nSawn-Off: $1000\nM4: $2000\nSniper: $3000", "Select", "Exit");//Show them the dialog.
- return true;//Tell pawno to stop processing now.
- }
- else//Else there NOT within the coordinates set for the Weapon Shop.
- {
- SendClientMessage(playerid, -1, "Your not at a Weapon Shop.");//Tell them.
- }
- return true;
- }
- CMD:jetpack(playerid, params[])//If the player types /shop
- {
- if(gPlayerClass[playerid] == PILOT)//if the player is jettrooper
- {
- SetPlayerSpecialAction(playerid,2);//This is command for the jet trooper, he can spawn jetpack by /jp command
- }
- return true;
- }
- CMD:healme(playerid, params[])//If the player types /shop
- {
- if(gPlayerClass[playerid] == MEDIC)//if the player is jettrooper
- {
- SetPlayerHealth(playerid, 100.0);
- SendClientMessage(playerid, COLOR_BLUE, "You Have Healed Yourself.");
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "** %s Has Healed Himself.", pName);
- SendClientMessageToAll(COLOR_YELLOW, string);
- }
- return true;
- }
- CMD:armourme(playerid, params[])//If the player types /shop
- {
- if(gPlayerClass[playerid] == MEDIC)//if the player is jettrooper
- {
- SetPlayerArmour(playerid, 100.0);
- SendClientMessage(playerid, COLOR_BLUE, "You Have Armoured Yourself.");
- new string[128];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "** %s Has Armoured Himself.", pName);
- SendClientMessageToAll(COLOR_YELLOW, string);
- }
- return true;
- }
- CMD:pm(playerid, params[])
- {
- new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
- if(sscanf(params, "us", id, str2))
- {
- SendClientMessage(playerid, 0xFF0000FF, "Usage: /pm <id> <message>");
- return 1;
- }
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
- if(playerid == id) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You cannot pm yourself!");
- {
- GetPlayerName(playerid, Name1, sizeof(Name1));
- GetPlayerName(id, Name2, sizeof(Name2));
- format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
- SendClientMessage(playerid, 0xFF0000FF, str);
- format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
- SendClientMessage(id, 0xFF0000FF, str);
- }
- return 1;
- }
- CMD:refuel(playerid, params[])
- {
- {
- if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFC800FF,"You are not in an vehicle!");
- if (isrefuelling[playerid]) return SendClientMessage(playerid,0xFFC800FF,"You are already refuelling!");
- if (GetPlayerMoney(playerid) - 5000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
- GivePlayerMoney(playerid,-5000);
- SetCameraBehindPlayer(playerid);
- TogglePlayerControllable(playerid,0);
- isrefuelling[playerid] = 1;
- TextDrawSetString(td_fuel[playerid],"Refuelling...");
- SetTimerEx("timer_refuel",4500,false,"i",playerid);
- return 1;
- }
- }
- CMD:buy(playerid, params[])
- {
- ShowPlayerDialog(playerid,333,DIALOG_STYLE_MSGBOX,"Buying Dialog","Buy Health ($3000)\nBuy Armour ($5000)\nBuy MP5 ($7000)\nBuy AK-47 ($10000)\nBuy M4 ($15000)\nBuy Sniper ($20000)","Buy","Close");
- return 1;
- }
- CMD:derby(playerid,params[])
- {
- if(InDerby[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You are already in derby. Type /leave to exit derby dm");
- new rand = random(sizeof(derbyspawns));
- new veh = CreateVehicle(451,derbyspawns[rand][0],derbyspawns[rand][1],derbyspawns[rand][2],derbyspawns[rand][3],-1,-1,-1);
- PutPlayerInVehicle(playerid,veh,0);
- InDerby[playerid] = 1;
- return 1;
- }
- CMD:leave(playerid,params[])
- {
- if(InDerby[playerid] == 0) return SendClientMessage(playerid,COLOR_GREEN,"You are not in derby!");
- InDerby[playerid] = 0;
- SetPlayerHealth(playerid,0);
- return 1;
- }
- CMD:myradio(playerid,params[])
- {
- ShowPlayerDialog(playerid,90,DIALOG_STYLE_LIST,"My Radio list","1. My first channel\r\n2. My second channel\r\n3. My third channel","Select", "Cancel");
- return 1;
- }
- CMD:stopradio(playerid,params[])
- {
- StopAudioStreamForPlayer(playerid);
- return 1;
- }
- //=================================Admin System===============================//
- #if defined USE_STATS
- CMD:stats(playerid,params[]) {
- new string[256], pDeaths, player1, h, m, s,playername[MAX_PLAYER_NAME];
- if(isnull(params)) player1 = playerid;
- else player1 = strval(params);
- if(IsPlayerConnected(player1)) {
- TotalGameTime(player1, h, m, s);
- GetPlayerName(player1, playername, sizeof(playername));
- if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
- format(string,sizeof(string),"{F9FF88}|-| %s's Stats |-|\n \nScores: %d\n \nKills %d\n \nDeaths %d\n \nRatio: %0.2f\n \nMoney: $%d\n \nAdmin Level: %d\n \nModerator: %d\n \nTime: %d hrs %d mins %d secs\n \nFor other information use /stats!",playername, GetPlayerScore(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1), PlayerInfo[player1][Level], PlayerInfo[player1][Helper], h, m, s);
- return ShowPlayerDialog(playerid, 11111,DIALOG_STYLE_MSGBOX,"{FFFF00}Player Status",string,"Close","");
- } else return SendClientMessage(playerid, red, "Player Not Connected!");
- }
- #endif
- CMD:helpme(playerid, params[])
- {
- new str[128], Name1[MAX_PLAYER_NAME];
- if(sscanf(params,"s", str))
- {
- SendClientMessage(playerid, COLOR_RED,"CORRECT USAGE: /helpme [text]");
- return 1;
- }
- GetPlayerName(playerid, Name1, sizeof(Name1));
- format(str, sizeof(str),"{00FFFF}[HELP MSG From %s]:{00FFF0} %s",Name1, str);
- MessageToTwice(COLOR_RED, str);
- SendClientMessage(playerid, COLOR_YELLOW,"Your Request has been sent to online Administrators.");
- return 1;
- }
- CMD:heal(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- SetPlayerHealth(playerid, 100); //if he's allowed, restore his health
- SendClientMessage(playerid, COLOR_GREEN, "Your Health Has Been Restored To 100"); // and send him the success-message
- CMDMessageToAdmins(playerid,"HEAL");
- }
- else
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!"); // if not, send him only the following message
- }
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1) {
- new PID; //define the playerid we wanna kick
- new reason[64]; //the reason, put into a string
- new str[128]; //a new message string
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
- GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
- GetPlayerName(PID, Playername, sizeof(Playername));
- if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /kick [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
- if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
- return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
- format(str, sizeof(str), "'%s' Has Been Kicked By Administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
- SendClientMessageToAll(COLOR_RED, str); //send that message to all
- CMDMessageToAdmins(playerid,"KICK");
- Kick(PID); //kick the playerid we've defined
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!"); //return this message
- }
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new PID; //define the playerid we wanna ban
- new reason[64]; //the reason, put into a string
- new str[128]; //a new message string
- new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME]; //defines the function with the playername we wanna get
- GetPlayerName(playerid, Adminname, sizeof(Adminname)); //defines the function with the adminname we wanna get
- GetPlayerName(PID, Playername, sizeof(Playername));
- if(sscanf(params, "us[64]", PID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid] [reason]"); //tell sscanf if the parameters/the syntax is written wrong to return a message (PID and the reason used here)
- if(!IsPlayerConnected(PID)) // if the ID is wrong or not connected, return a message! (PID used here)
- return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
- format(str, sizeof(str), "'%s' Has Been Banned By Administrator '%s'. Reason: %s ", Playername, Adminname, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
- SendClientMessageToAll(COLOR_RED, str); //send that message to all
- CMDMessageToAdmins(playerid,"BAN");
- Ban(PID);
- //close the log, finished!//Ban the playerid we've defined
- }
- else //if he has not got the permissions
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!"); //return this message
- }
- return 1;
- }
- COMMAND:freeze(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- new Target; //defines the playerid we wanna freeze
- if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /freeze [playerid]"); //tell sscanf again if the parameters/syntax is wrong to return a special message
- if(!IsPlayerConnected(Target)) //if the ID doesn't exist, return an error-message
- return SendClientMessage(playerid, COLOR_RED, "ERROR:Player Is Not Connected!");
- if(!sscanf(params, "u", Target))
- {
- new tname[MAX_PLAYER_NAME]; //define the new target-name of the playerid
- GetPlayerName(Target,tname,sizeof(tname)); //get the playername with this function
- new pname[MAX_PLAYER_NAME]; //define the adminname
- GetPlayerName(playerid,pname,sizeof(pname)); //get the adminname with this function
- new tstring[128]; //define the string for the player (victim)
- new pstring[128];// define the string for the admin which is performing
- new astring[128];//define the string for all the players which are online
- format(tstring,sizeof(tstring),"You have been frozen by administrator %s! You cant move!",pname); //this is formatting the player-string, while it's also getting the adminname
- format(pstring,sizeof(pstring),"You have frozen player %s(%d)!",tname,Target); //this is formatting the adminname-string, while it's also getting the playername and his ID(target)
- format(astring,sizeof(astring),"Administrator %s has frozen %s!",pname,tname); //this is formatting the all-string, while it's sending this message to everybody and is getting admin- and playername
- SendClientMessage(Target,COLOR_GOLD,tstring);//sends the message to the victim
- SendClientMessage(playerid,COLOR_GREEN,pstring);//sends the message to the admin
- SendClientMessageToAll(COLOR_BLUE,astring);//sends the message to everybody
- TogglePlayerControllable(Target,0); //with that function, the player won't be able to mov, while we're using the variable "Target" as the playerid
- CMDMessageToAdmins(playerid,"FREEZE");
- }
- }
- // if he doesn't have permissions, return that message!
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
- return 1;
- }
- COMMAND:car(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >=2)
- {
- new car;
- if(IsPlayerInAnyVehicle(playerid)) return 1;
- if(sscanf(params, "i", car)) return SendClientMessage(playerid, COLOR_ORANGE, "USE: /v(ehicle) [id_vehicle]");
- if(strval(params) >611 || strval(params) <400) return SendClientMessage(playerid, COLOR_GREY, "That id doesn't exist!");
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- car = CreateVehicle(strval(params), x, y, z,a, -1, -1, 60);
- PutPlayerInVehicle(playerid, car, 0);
- CMDMessageToAdmins(playerid,"CAR");
- }
- else
- {
- Error2(playerid);
- }
- return 1;
- }
- COMMAND:fix(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >=1)
- {
- new pla;
- if(sscanf(params,"u",pla)) return SendClientMessage(playerid, COLOR_ORANGE, "USE: /repair [ID]");
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, COLOR_GREY, "Your car is fixed!");
- CMDMessageToAdmins(playerid,"FIX");
- }
- else
- {
- Error1(playerid);
- }
- return 1;
- }
- COMMAND:admins(playerid,params[])
- {
- if(IsPlayerConnected(playerid))
- {
- SendClientMessage(playerid, COLOR_ORANGE, " ");
- SendClientMessage(playerid, COLOR_ORANGE, "-| ADMINS |-");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1341)
- {
- new admtext[64];
- new sendername[MAX_PLAYER_NAME];
- new string[256];
- if(PlayerInfo[i][pAdmin] == 1) { admtext = "Level-1 Trial Admin"; }
- else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Level-2 Moderator"; }
- else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Level-3 Lead Moderator"; }
- else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Level-4 Senior Administrator"; }
- else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Level-5 Master Administrator"; }
- else if(PlayerInfo[i][pAdmin] == 6) { admtext = "Level-6 Global Administrator"; }
- else if(PlayerInfo[i][pAdmin] == 7) { admtext = "Level-7 Co-Owner"; }
- else if(PlayerInfo[i][pAdmin] == 8) { admtext = "level-8 Owner"; }
- else { admtext = "Gamemoderator"; }
- GetPlayerName(i, sendername, sizeof(sendername));
- format(string, 256, "%s ( %s )", sendername, admtext);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- }
- }
- }
- return 1;
- }
- COMMAND:unfreeze(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- new Target; //defines the playerid we wanna unfreeze
- if(sscanf(params, "u", Target)) SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /unfreeze [playerid]"); //tell sscanf again if the parameters/syntax is wrong to return a special message
- if(!IsPlayerConnected(Target)) //if the ID doesn't exist, return an error-message
- return SendClientMessage(playerid, COLOR_GREY, "ERROR:Player is not connected!");
- if(!sscanf(params, "u", Target))
- {
- new tname[MAX_PLAYER_NAME]; //define the new target-name of the playerid
- GetPlayerName(Target,tname,sizeof(tname)); //get the playername with this function
- new pname[MAX_PLAYER_NAME]; //define the adminname
- GetPlayerName(playerid,pname,sizeof(pname)); //get the adminname with this function
- new tstring[128]; //define the string for the player (victim)
- new pstring[128];// define the string for the admin which is performing
- new astring[128];//define the string for all the players which are online
- format(tstring,sizeof(tstring),"You have been unfrozen by administrator %s! You cant move!",pname); //this is formatting the player-string, while it's also getting the adminname
- format(pstring,sizeof(pstring),"You have unfrozen player %s(%d)!",tname,Target); //this is formatting the adminname-string, while it's also getting the playername and his ID(target)
- format(astring,sizeof(astring),"Administrator %s has unfrozen %s!",pname,tname); //this is formatting the all-string, while it's sending this message to everybody and is getting admin- and playername
- SendClientMessage(Target,COLOR_GOLD,tstring);//sends the message to the victim
- SendClientMessage(playerid,COLOR_GREEN,pstring);//sends the message to the admin
- SendClientMessageToAll(COLOR_BLUE,astring);//sends the message to everybody
- TogglePlayerControllable(Target,1); //with that function, the player will be able to move again, while we're using the variable "Target" as playerid again
- CMDMessageToAdmins(playerid,"UNFREEZE");
- }
- else
- {
- Error3(playerid);
- }
- }
- // if he doesn't have permissions, return that message!
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
- return 1;
- }
- COMMAND:clearchat(playerid,params[])
- {
- if( PlayerInfo[ playerid ][ pAdmin ] < 1 ) return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
- {
- for( new i = 0; i <= 100; i ++ ) SendClientMessageToAll( COLOR_BLUE,"Main Chat Has Been Cleared" );
- }
- return 1;
- }
- COMMAND:report(playerid,params[])
- {
- new Target; //define the target's name
- new Reason[128];//the report-reason
- if(!sscanf(params, "us[32]",Target, Reason))
- {
- if(Target == playerid) return SendClientMessage(playerid, COLOR_RED, "SERVER: Cant perform this command on yourself!"); //comment this line if you want to try this cmd on yourself
- if(!IsPlayerConnected(Target)) //if the ID is invalid
- return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected!"); //send the player a message, that the ID doesn't exist
- new tname[MAX_PLAYER_NAME]; //the name of player one (reporting)
- new pname[MAX_PLAYER_NAME]; //the name of player two (the reported)
- GetPlayerName(Target,tname,sizeof(tname)); //get (receive) the player's name for the first
- GetPlayerName(playerid,pname,sizeof(pname)); //get (receive) the player's name for the second
- new rstring[256]; //the report-string
- format(rstring,sizeof(rstring),"* Player %s(%d) reported %s(%d)! (Reason: %s)", pname,playerid,tname,Target,Reason); //only admins will receive this message! a specific player with a reason got reported, here we'll use all variables created
- SendMessageToAdmins(COLOR_WHITE,rstring); //we'll talk about that later
- //NOW HERE, we'll open the reportpath and WRITE into it
- new File:Log = fopen(reportPATH, io_append); //here you're opening the path defined
- new logData[128]; //create the logdata we wanna write in
- new name[MAX_PLAYER_NAME]; //define the name again
- GetPlayerName(Target,name,sizeof(name)); //receive the name again
- new fTime[6]; //create the specific time for the report
- getdate(fTime[0], fTime[1], fTime[2]); //get the report's date
- gettime(fTime[3], fTime[4], fTime[5]); //get the report's time
- format(logData, sizeof logData, "[%02d/%02d/%04d || %02d:%02d:%02d]%s got reported by %s! (Reason: %s)\r\n", fTime[2], fTime[1], fTime[0], fTime[3], fTime[4], fTime[5], tname, pname, Reason); //this will write everything (name,reason,time,date etc.) into the logdata
- fwrite(Log, logData); //write it into the path
- fclose(Log); //close the log, finished!
- }
- else return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /report <playerid> <reason>"); //detects the wrong params from sscanf and send the client this message
- return 1;
- }
- forward SendMessageToAdmins(color,const string[]);
- public SendMessageToAdmins(color,const string[]) //create the callback, including color and string
- {
- for(new i = 0; i < MAX_PLAYERS; i++) //set a for-loop and loop through all the admins
- {
- if(IsPlayerConnected(i) == 1) //the admin gotta be connected
- if(PlayerInfo[i][pAdmin] >= 1) //and his level gotta be at least 1 (or higher)
- SendClientMessage(i, color, string); //send this message now to every admin online, with color + string!
- }
- return 1;
- }
- CMD:acar(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
- //here, you'll have to put in again the variables of your enum of the playerinfo, to check the required adminlevel
- new Float:x, Float:y, Float:z, Float:angle; //create the position of the player, which can be anywhere
- GetPlayerPos(playerid, x, y, z); //get the player's position, to know where the car should be put
- GetPlayerFacingAngle(playerid, angle); //get the player's angle, to put the car in the right angle
- new veh = CreateVehicle(429, x, y, z, angle, 0, 0, 60); //in the variable "veh", you're storing and creating a vehicle now!
- //429 is the ID of the car, "0" is the color (black)! change it simply later, I'mma give you a link
- PutPlayerInVehicle(playerid, veh, 0); //this function will put the player into the created vehicle
- ChangeVehicleColor(429, 0, 1); //this will change the vehicle color to black (and white), surely!
- CMDMessageToAdmins(playerid,"ACAR");
- return 1;
- }
- CMD:fakechat(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 5) //put your admin-variable from your on enum of the playerinfo here again!
- {
- new Target; //the player which'll get "blamed"
- new Msg[128]; //the string for the message
- if(sscanf(params, "us[50]", Target,Msg)) SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /fakechat [playerid] [message]"); //returns the right params if you've written it wrong
- if(!IsPlayerConnected(Target)) //check if the ID is valid, if not
- return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected!"); //send the player such a message
- if(!sscanf(params, "us[50]", Target,Msg)) //if the params are written correctly, do the following! (target "u" and message "s" used here, with the size "50")
- {
- new PName[MAX_PLAYER_NAME]; //a new name for the player
- GetPlayerName(Target,PName,sizeof PName); //receive the player's name
- new textstring[400];//the string for the message
- format(textstring, sizeof(textstring), "{FFFFFF}(%i): {FFFFFF}%s", Target, Msg); //format the message with the string we've created, Target for the player, Msg for the message
- SendPlayerMessageToAll(Target, textstring); //of course everyone should see the message
- format(textstring,sizeof(textstring),"You have sent a fakechat message for %s(%d)! (Message: %s)",PName,Target,Msg); //you don't have to, but you CAN add it! It sends you the success-message that you've sent the fakemessage
- SendClientMessage(playerid,COLOR_GREEN,textstring); //this message should only appear to the one which is performing the command
- CMDMessageToAdmins(playerid,"FAKECHAT");
- }
- }
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-5 Administrator to use this command!");
- return 1;
- }
- COMMAND:givescore(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new Target;
- new Ammount;
- if(!sscanf(params, "ui", Target, Ammount))
- {
- if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Wrong player ID");
- if(Ammount > 100000) return SendClientMessage(playerid,COLOR_RED,"ERROR: Score Amount Is From 0 To 100000");
- SetPlayerScore(Target,GetPlayerScore(Target)+Ammount);
- new tname[MAX_PLAYER_NAME];
- GetPlayerName(Target,tname,sizeof(tname));
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pname,sizeof(pname));
- new tstring[256];
- new pstring[256];
- format(tstring,sizeof(tstring),"You Have Been Given %d Score By Administrator %s",Ammount,pname);
- format(pstring,sizeof(pstring),"You have given %d score to %s(%d)",Ammount,tname,Target);
- SendClientMessage(Target,COLOR_BLUE,tstring);
- SendClientMessage(playerid,COLOR_BLUE,pstring);
- CMDMessageToAdmins(playerid,"GIVESCORE");
- }
- else SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /givescore <playerid> <ammount>");
- }
- else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
- return 1;
- }
- COMMAND:force(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- new Target;
- if(!sscanf(params, "u", Target))
- {
- if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Wrong player ID");
- ForceClassSelection(Target);
- new tname[MAX_PLAYER_NAME];
- GetPlayerName(Target,tname,sizeof(tname));
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pname,sizeof(pname));
- new tstring[256];
- new pstring[256];
- format(tstring,sizeof(tstring),"You Have Been Forced To Class Selection By %s",pname);
- format(pstring,sizeof(pstring),"You Have Forced %s(%d) Into Class Selection",tname);
- SendClientMessage(Target,COLOR_BLUE,tstring);
- SendClientMessage(playerid,COLOR_BLUE,pstring);
- CMDMessageToAdmins(playerid,"FORCE");
- }
- else SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /force <playerid>");
- }
- else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
- return 1;
- }
- COMMAND:spawn(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- new Target;
- if(!sscanf(params, "u", Target))
- {
- if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Wrong player ID");
- if(PlayerInfo[Target][pAdmin] >= PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,COLOR_RED,"ERROR:You Can't Use This Command On This Admin!");
- SpawnPlayer(Target);
- new tname[MAX_PLAYER_NAME];
- GetPlayerName(Target,tname,sizeof(tname));
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pname,sizeof(pname));
- new tstring[256];
- new pstring[256];
- format(tstring,sizeof(tstring),"You Have Been Spawned %s",pname);
- format(pstring,sizeof(pstring),"You Have Spawned %s(%d)",tname);
- SendClientMessage(Target,COLOR_BLUE,tstring);
- SendClientMessage(playerid,COLOR_BLUE,pstring);
- CMDMessageToAdmins(playerid,"SPAWN");
- }
- else SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /spawn <playerid>");
- }
- else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
- return 1;
- }
- COMMAND:mute(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Target;
- if(!sscanf(params, "u", Target))
- {
- if(Target == playerid) return SendClientMessage(playerid, COLOR_RED, "SERVER: Cant perform this command on yourself!" );
- if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Wrong player ID");
- if(PlayerInfo[Target][pAdmin] >= PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,COLOR_RED,"ERROR: You Can't Use This Command On This Admin!");
- new tname[MAX_PLAYER_NAME];
- GetPlayerName(Target,tname,sizeof(tname));
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pname,sizeof(pname));
- new tstring[256];
- new pstring[256];
- format(tstring,sizeof(tstring),"You Have Been Muted By %s! You Can't Talk!",pname);
- format(pstring,sizeof(pstring),"You Have Muted %s(%d)",tname,Target);
- SendClientMessage(Target,COLOR_RED,tstring);
- SendClientMessage(playerid,COLOR_GREEN,pstring);
- CMDMessageToAdmins(playerid,"MUTE");
- }
- else SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /mute <playerid>");
- }
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
- return 1;
- }
- COMMAND:unmute(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Target;
- if(!sscanf(params, "u", Target))
- {
- if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"ERROR: Wrong player ID");
- if(PlayerInfo[Target][pAdmin] >= PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid,COLOR_RED,"ERROR: You Can't Use This Command On This Admin!");
- new tname[MAX_PLAYER_NAME];
- GetPlayerName(Target,tname,sizeof(tname));
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pname,sizeof(pname));
- new tstring[256];
- new pstring[256];
- format(tstring,sizeof(tstring),"You Have Been UnMuted By %s! You Can Talk Now!",pname);
- format(pstring,sizeof(pstring),"You Have Muted Player %s(%d)",tname,Target);
- SendClientMessage(Target,COLOR_RED,tstring);
- SendClientMessage(playerid,COLOR_GREEN,pstring);
- CMDMessageToAdmins(playerid,"UNMUTE");
- }
- else SendClientMessage(playerid,COLOR_ORANGE,"USAGE: /unmute <playerid>");
- }
- else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
- return 1;
- }
- COMMAND:givecash(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new
- toplayerid, // the player we want to give money to
- amount;
- // extracting player's ID and amount from params
- if (!sscanf(params, "ii", toplayerid, amount))
- {
- if (toplayerid != INVALID_PLAYER_ID)
- {
- new
- message[40];
- GivePlayerMoney(toplayerid, amount);
- format(message, sizeof(message), "You Got $%d From Administrator!", amount);
- SendClientMessage(toplayerid, COLOR_RED, message);
- CMDMessageToAdmins(playerid,"GIVECASH");
- }
- else SendClientMessage(playerid, COLOR_RED, "That player is not connected");
- }
- else SendClientMessage(playerid, COLOR_ORANGE, "Usage: /givemoney <playerid> <amount>");
- }
- else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
- return 1;
- }
- COMMAND:god(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- SetPlayerHealth(playerid, 99999);
- SendClientMessage(playerid, COLOR_GREEN,"You Are Now On God Mod");
- CMDMessageToAdmins(playerid,"GOD");
- }
- else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
- return 1;
- }
- COMMAND:offgod(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- SetPlayerHealth(playerid, 100);
- SendClientMessage(playerid, COLOR_GREEN,"You Have Turned Off God Mode");
- CMDMessageToAdmins(playerid,"OFFGOD");
- }
- else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
- return 1;
- }
- COMMAND:jail(playerid, params[])
- {
- new id;
- if(IsPlayerConnected(id))
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(!sscanf(params, "u", id))
- {
- new string[900];
- new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- GetPlayerName(id, PlayerName, sizeof(PlayerName));
- format(string, sizeof(string), "Administrator %s jailed you for %s", name,params);
- SendClientMessage(id, COLOR_RED, string);
- format(string, sizeof(string), "You jailed %s", PlayerName);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "Administrator %s jailed %s",name,PlayerName);
- SendClientMessageToAll(COLOR_WHITE, string);
- SetPlayerPos(id, 264.6288,77.5742,1001.0391);
- SetPlayerInterior(id, 1);
- CMDMessageToAdmins(playerid,"JAIL");
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /jail [PlayerId/PartOfName][Reason]");
- }
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
- }
- else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
- }
- COMMAND:unjail(playerid, params[])
- {
- new id;
- if(IsPlayerConnected(id))
- {
- if(PlayerInfo[playerid][pAdmin] >=1)
- {
- if(!sscanf(params, "u", id))
- {
- new string[900];
- new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- GetPlayerName(id, PlayerName, sizeof(PlayerName));
- format(string, sizeof(string), "Administrator %s Has Unjailed You", name);
- SendClientMessage(id, COLOR_RED, string);
- format(string, sizeof(string), "You unjailed %s", PlayerName);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "Administrator %s Has Unjailed %s",name,PlayerName);
- SetPlayerPos(id, 1555.097900, -1675.848754, 16.195312);
- SetPlayerInterior(id, 0);
- CMDMessageToAdmins(playerid,"UNJAIL");
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /unjail [PlayerId/PartOfName]");
- }
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
- }
- else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
- }
- COMMAND:setscore(playerid, params[])
- {
- new id;
- new score;
- if(IsPlayerConnected(id))
- {
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(!sscanf(params, "ui", id, score))
- {
- if(score <= 999999999)
- {
- new string[64];
- new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- GetPlayerName(id, PlayerName, sizeof(PlayerName));
- format(string, sizeof(string), "Administrator %s Set Your Score To %d", name, score);
- SendClientMessage(id, COLOR_RED, string);
- format(string, sizeof(string), "You reseted %s's score to %d", PlayerName, score);
- SendClientMessage(playerid, COLOR_WHITE, string);
- SetPlayerScore(id, score);
- CMDMessageToAdmins(playerid,"SETSCORE");
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_RED, "You can't set more than $999.999.999");
- }
- else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /setscore [PlayerId/PartOfName] [Score]");
- }
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-4 Administrator to use this command!");
- }
- else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
- }
- COMMAND:goto(playerid, params[])
- {
- new id;
- if(IsPlayerConnected(id))
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(!sscanf(params, "ui", id))
- {
- new string[300];
- new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
- new Float:x, Float:y, Float:z; GetPlayerPos(id,x,y,z); SetPlayerInterior(playerid,GetPlayerInterior(id));
- GetPlayerName(playerid, name, sizeof(name));
- GetPlayerName(id, PlayerName, sizeof(PlayerName));
- format(string, sizeof(string), "Administrator %s Has Been Teleported To Your Position", name);
- SendClientMessage(id, COLOR_RED, string);
- format(string, sizeof(string), "You Went To Player %s", PlayerName);
- SendClientMessage(playerid, COLOR_BLUE, string);
- SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
- SetPlayerPos(playerid,x+2,y,z);
- CMDMessageToAdmins(playerid,"GOTO");
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /goto [PlayerId/PartOfName]");
- }
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
- }
- else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
- }
- COMMAND:get(playerid, params[])
- {
- new id;
- if(IsPlayerConnected(id))
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- if(!sscanf(params, "ui", id))
- {
- new string[300];
- new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
- new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); SetPlayerInterior(id,GetPlayerInterior(playerid));
- GetPlayerName(playerid, name, sizeof(name));
- GetPlayerName(id, PlayerName, sizeof(PlayerName));
- format(string, sizeof(string), "Administrator %s Teleported You To His Position", name);
- SendClientMessage(id,COLOR_RED, string);
- format(string, sizeof(string), "You Have Teleported %s To Your Position", PlayerName);
- SendClientMessage(playerid,COLOR_BLUE, string);
- SetPlayerVirtualWorld(id,GetPlayerVirtualWorld(playerid));
- SetPlayerPos(id,x+2,y,z);
- CMDMessageToAdmins(playerid,"GET");
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /gethere[PlayerId/PartOfName]");
- }
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
- }
- else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
- }
- COMMAND:akill(playerid, params[])
- {
- new id;
- if(IsPlayerConnected(id))
- {
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- if(!sscanf(params, "u", id))
- {
- new string[100];
- new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- GetPlayerName(id, PlayerName, sizeof(PlayerName));
- format(string, sizeof(string), "Administrator %s Has Killed You", name);
- SendClientMessage(id, COLOR_RED, string);
- format(string, sizeof(string), "You Have Killed %s", PlayerName);
- SendClientMessage(playerid, COLOR_BLUE, string);
- SetPlayerHealth(id, 0);
- CMDMessageToAdmins(playerid,"AKILL");
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: /akill [PlayerId/PartOfName]");
- }
- else return SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
- }
- else return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
- }
- COMMAND:acmds(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- SendClientMessage(playerid, COLOR_GREEN,"==============================");
- SendClientMessage(playerid, COLOR_GREEN,"========Admin-Commands========");
- SendClientMessage(playerid, COLOR_GREEN,"/heal,/kick,/ban,/freeze,/unfreeze");
- SendClientMessage(playerid, COLOR_GREEN,"/clearchat,/jail,/unjail,/acar");
- SendClientMessage(playerid, COLOR_GREEN,"/fakechat,/givescore,/force");
- SendClientMessage(playerid, COLOR_GREEN,"/spawn,/mute,/unmute,/fix,/car");
- SendClientMessage(playerid, COLOR_GREEN,"/givecash,/god,/offgod,/setlevel");
- SendClientMessage(playerid, COLOR_GREEN,"/setscore,/akill,/get,/goto");
- SendClientMessage(playerid, COLOR_GREEN,"===============================");
- CMDMessageToAdmins(playerid,"ACMDS");
- }
- else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
- return 1;
- }
- CMD:warn(playerid,params[])
- {
- if(AdminLevel[playerid] >= 1)
- {
- new Target;
- new Reason[50];
- if(sscanf(params, "us[50]", Target, Reason)) return SendClientMessage(playerid,COLOR_RED,"Usage: /warn [playerid] [reason]");
- if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Invaild ID");
- Warns[Target]++;
- new tname[MAX_PLAYER_NAME];
- GetPlayerName(Target,tname,sizeof(tname));
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pname,sizeof(pname));
- new String[256];
- format(String,sizeof String, "Administrator %s warned %s [Reason: %s %d/%d]", pname, tname, Reason, Warns[Target], MAX_WARNINGS);
- SendClientMessage(playerid, COLOR_RED, String);
- if(Warns[Target] == MAX_WARNINGS)
- {
- new str[256];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(Target,name,sizeof(name));
- format(str,sizeof(str),"%s has been kicked by Server [Reason: Max Warnings]", name, Target);
- SendClientMessageToAll(COLOR_RED, str);
- Warns[Target] = 0;
- Kick(Target);
- }
- }
- else SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be level 1 Administrator to use this command!");
- return 1;
- }
- //============================================================================//
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new vehicleid = GetPlayerVehicleID(playerid);//variable to get vehicle ids
- if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == PRIVATE && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == MEDIC && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive
- {
- SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Hunter");//messages goes to the player that he can't drive the hunter
- RemovePlayerFromVehicle(playerid);//get u off from the hunter
- }
- if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == PRIVATE && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == MEDIC && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive
- {
- SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Hydra");//messages goes to the player that he can't drive the hydra
- RemovePlayerFromVehicle(playerid);//get u off from the hydra
- }
- if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == PRIVATE && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == MEDIC && gPlayerClass[playerid] == SPY)//if player is Soldier then he can drive
- {
- SendClientMessage(playerid, COLOR_RED, "You Need to be a Soldier to drive Tank");//messages goes to the player that he can't drive the tank or rhino
- RemovePlayerFromVehicle(playerid);//get u off from the tank or rhino
- }
- if(GetVehicleModel(vehicleid) == 425 && gPlayerClass[playerid] == PRIVATE && gPlayerClass[playerid] == SNIPER && gPlayerClass[playerid] == ENGINEER && gPlayerClass[playerid] == MEDIC && gPlayerClass[playerid] == SPY)//if player is pilot then he can drive
- {
- SendClientMessage(playerid, COLOR_RED, "You Need to be a Pilot to fly Sea Sparrow");//messages goes to the player that he can't drive the tank or sea sparrow
- RemovePlayerFromVehicle(playerid);//get u off from the sea sparrow
- }
- //Fuel System
- if (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
- {
- new vid = GetPlayerVehicleID(playerid);
- new string[125];format(string,sizeof string,"Fuel:%i",fuel[vid]);
- TextDrawSetString(td_fuel[playerid],string);
- TextDrawShowForPlayer(playerid,td_fuel[playerid]);
- }
- else
- {
- TextDrawHideForPlayer(playerid,td_fuel[playerid]);
- }
- if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
- {
- if(IsABike(GetPlayerVehicleID(playerid)))
- {
- switch(GetPlayerSkin(playerid))
- {
- #define SPAO{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, SLOT, 18645, 2, (%0), (%1), (%2), (%3), (%4), (%5));
- case 0, 65, 74, 149, 208, 273: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000}
- case 1..6, 8, 14, 16, 22, 27, 29, 33, 41..49, 82..84, 86, 87, 119, 289: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 77.000000, 0.000000}
- case 7, 10: SPAO{0.090000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
- case 9: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
- case 11..13: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
- case 15: SPAO{0.059999, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
- case 17..21: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 23..26, 28, 30..32, 34..39, 57, 58, 98, 99, 104..118, 120..131: SPAO{0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 40: SPAO{0.050000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 50, 100..103, 148, 150..189, 222: SPAO{0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 51..54: SPAO{0.100000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 55, 56, 63, 64, 66..73, 75, 76, 78..81, 133..143, 147, 190..207, 209..219, 221, 247..272, 274..288, 290..293: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 59..62: SPAO{0.079999, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 77: SPAO{0.059999, 0.019999, 0.000000, 87.000000, 82.000000, 0.000000}
- case 85, 88, 89: SPAO{0.070000, 0.039999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 90..97: SPAO{0.050000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 132: SPAO{0.000000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 144..146: SPAO{0.090000, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
- case 220: SPAO{0.029999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 223, 246: SPAO{0.070000, 0.050000, 0.000000, 88.000000, 82.000000, 0.000000}
- case 224..245: SPAO{0.070000, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 294: SPAO{0.070000, 0.019999, 0.000000, 91.000000, 84.000000, 0.000000}
- case 295: SPAO{0.050000, 0.019998, 0.000000, 86.000000, 82.000000, 0.000000}
- case 296..298: SPAO{0.064999, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 299: SPAO{0.064998, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- }
- }
- }
- else
- {
- RemovePlayerAttachedObject(playerid, SLOT);
- }
- }
- 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)
- {
- new weaponid = GetPlayerWeapon(playerid);//This will cause the "weaponid not defined" Error
- new Nam[MAX_PLAYER_NAME];
- new str[128];
- if(weaponid == 35)
- {
- GetPlayerName(playerid,Nam,sizeof(Nam));
- format(str,sizeof(str),"ANTI WEAPON HACK: %s has been banned from server for spawning a RPG!",Nam);
- SendClientMessageToAll(0xFF0000FF,str);
- BanEx(playerid,"ANTI WEAPON HACK: Weapon Hack!");
- }
- if(weaponid == 36)
- {
- GetPlayerName(playerid,Nam,sizeof(Nam));
- format(str,sizeof(str),"ANTI WEAPON HACK: %s has been banned from server for spawning a Heat seeking rocket!",Nam);
- SendClientMessageToAll(0xFF0000FF,str);
- BanEx(playerid,"ANTI WEAPON HACK: Weapon Hack!");
- }
- if(weaponid == 37)
- {
- GetPlayerName(playerid,Nam,sizeof(Nam));
- format(str,sizeof(str),"ANTI WEAPON HACK: %s has been banned from server for spawning a Flame-thrower!",Nam);
- SendClientMessageToAll(0xFF0000FF,str);
- BanEx(playerid,"ANTI WEAPON HACK: Weapon Hack!");
- }
- if(weaponid == 38)
- {
- GetPlayerName(playerid,Nam,sizeof(Nam));
- format(str,sizeof(str),"ANTI WEAPON HACK: %s has been banned from server for spawning a Minigun!",Nam);
- SendClientMessageToAll(0xFF0000FF,str);
- BanEx(playerid,"ANTI WEAPON HACK: Weapon Hack!");
- }
- if (GetPVarInt(playerid, "laser")) {
- RemovePlayerAttachedObject(playerid, 0);
- if ((IsPlayerInAnyVehicle(playerid)) || (IsPlayerInWater(playerid))) return 1;
- switch (GetPlayerWeapon(playerid)) {
- case 23: {
- if (IsPlayerAiming(playerid)) {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SP standing aiming
- 0.108249, 0.030232, 0.118051, 1.468254, 350.512573, 364.284240);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SP crouched aiming
- 0.108249, 0.030232, 0.118051, 1.468254, 349.862579, 364.784240);
- }
- } else {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SP standing not aiming
- 0.078248, 0.027239, 0.113051, -11.131746, 350.602722, 362.384216);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SP crouched not aiming
- 0.078248, 0.027239, 0.113051, -11.131746, 350.602722, 362.384216);
- } } }
- case 27: {
- if (IsPlayerAiming(playerid)) {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SPAS standing aiming
- 0.588246, -0.022766, 0.138052, -11.531745, 347.712585, 352.784271);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SPAS crouched aiming
- 0.588246, -0.022766, 0.138052, 1.468254, 350.712585, 352.784271);
- }
- } else {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SPAS standing not aiming
- 0.563249, -0.01976, 0.134051, -11.131746, 351.602722, 351.384216);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // SPAS crouched not aiming
- 0.563249, -0.01976, 0.134051, -11.131746, 351.602722, 351.384216);
- } } }
- case 30: {
- if (IsPlayerAiming(playerid)) {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // AK standing aiming
- 0.628249, -0.027766, 0.078052, -6.621746, 352.552642, 355.084289);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // AK crouched aiming
- 0.628249, -0.027766, 0.078052, -1.621746, 356.202667, 355.084289);
- }
- } else {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // AK standing not aiming
- 0.663249, -0.02976, 0.080051, -11.131746, 358.302734, 353.384216);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // AK crouched not aiming
- 0.663249, -0.02976, 0.080051, -11.131746, 358.302734, 353.384216);
- } } }
- case 31: {
- if (IsPlayerAiming(playerid)) {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // M4 standing aiming
- 0.528249, -0.020266, 0.068052, -6.621746, 352.552642, 355.084289);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // M4 crouched aiming
- 0.528249, -0.020266, 0.068052, -1.621746, 356.202667, 355.084289);
- }
- } else {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // M4 standing not aiming
- 0.503249, -0.02376, 0.065051, -11.131746, 357.302734, 354.484222);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // M4 crouched not aiming
- 0.503249, -0.02376, 0.065051, -11.131746, 357.302734, 354.484222);
- } } }
- case 34: {
- if (IsPlayerAiming(playerid)) {
- /*if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // Sniper standing aiming
- 0.528249, -0.020266, 0.068052, -6.621746, 352.552642, 355.084289);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // Sniper crouched aiming
- 0.528249, -0.020266, 0.068052, -1.621746, 356.202667, 355.084289);
- }*/
- return 1;
- } else {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // Sniper standing not aiming
- 0.658248, -0.03276, 0.133051, -11.631746, 355.302673, 353.584259);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // Sniper crouched not aiming
- 0.658248, -0.03276, 0.133051, -11.631746, 355.302673, 353.584259);
- } } }
- case 29: {
- if (IsPlayerAiming(playerid)) {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // MP5 standing aiming
- 0.298249, -0.02776, 0.158052, -11.631746, 359.302673, 357.584259);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // MP5 crouched aiming
- 0.298249, -0.02776, 0.158052, 8.368253, 358.302673, 352.584259);
- }
- } else {
- if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // MP5 standing not aiming
- 0.293249, -0.027759, 0.195051, -12.131746, 354.302734, 352.484222);
- } else {
- SetPlayerAttachedObject(playerid, 0, GetPVarInt(playerid, "color"), 6, // MP5 crouched not aiming
- 0.293249, -0.027759, 0.195051, -12.131746, 354.302734, 352.484222);
- } } } } }
- 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[])
- {
- if(dialogid == DIALOG_REGISTER)
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Cash",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteInt(File,"Donor",0);
- INI_WriteInt(File,"Score",0);
- INI_WriteInt(File,"Helperator",0);
- INI_Close(File);
- SendClientMessage(playerid, COLOR_WHITE,"Your now registered!");
- }
- }
- if(dialogid == DIALOG_LOGIN)
- {
- if ( !response ) return Kick ( playerid );
- if( response )
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
- SetPlayerScore(playerid, GetPlayerScore(playerid));
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Congratulations You Have Been Succesfully Logged In!","Ok","");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You Have Entered An Incorrect Password And This Is Not The Password Of This Account.\n"COL_WHITE"Type your password below to login.","Login","Quit");
- }
- return 1;
- }
- }
- if(dialogid == SHOP_DIALOG)//If the dialog responded to is our Weapon Shop dialog.
- {
- if(!response) return SendClientMessage(playerid, -1, "You have left the Weapon Shop.");//If they click "Exit" they have left the dialog(Shop).
- switch(listitem)
- {
- case 0://Deagle
- {
- if(GetPlayerMoney(playerid) >= 3000)//If they have more or equal to the price.
- {
- GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 3000);//Take the cost.
- GivePlayerWeapon(playerid, 24, 100);//Give them the weapon/ammo.
- SendClientMessage(playerid, -1, "Deagle purchased.");//And let them know they just purchased a weapon.
- return 1;//Tell pawno to stop processing now.
- }
- else//Else the dont have enough money to cover the purchase.
- {
- SendClientMessage(playerid, -1, "You Don't Have Enough Money To Purchase A Deagle.");//Tell them.
- return 1;//Tell pawno to stop processing now.
- }
- }
- case 1://Sawn-Off
- {
- if(GetPlayerMoney(playerid) >= 3500)//If they have more or equal to the price.
- {
- GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 3500);//Take the cost.
- GivePlayerWeapon(playerid, 26, 100);//Give them the weapon/ammo.
- SendClientMessage(playerid, -1, "You Have Successfully Purchased A Sawn-Off!.");//And let them know they just purchased a weapon.
- return 1;//Tell pawno to stop processing now.
- }
- else//Else the dont have enough money to cover the purchase.
- {
- SendClientMessage(playerid, -1, "You Don't Have Enough Money To Purchase A Sawn-Off.");//Tell them.
- return 1;//Tell pawno to stop processing now.
- }
- }
- case 2://M4
- {
- if(GetPlayerMoney(playerid) >= 4500)//If they have more or equal to the price.
- {
- GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 4500);//Take the cost.
- GivePlayerWeapon(playerid, 31, 100);//Give them the weapon/ammo.
- SendClientMessage(playerid, -1, "You Have Successfully Purchased A M4!.");//And let them know they just purchased a weapon.
- return 1;//Tell pawno to stop processing now.
- }
- else//Else the dont have enough money to cover the purchase.
- {
- SendClientMessage(playerid, -1, "You Don't Have Enough Money To Purchase A M4.");//Tell them.
- return 1;//Tell pawno to stop processing now.
- }
- }
- case 3://Sniper
- {
- if(GetPlayerMoney(playerid) >= 5000)//If they have more or equal to the price.
- {
- GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 5000);//Take the cost.
- GivePlayerWeapon(playerid, 34, 100);//Give them the weapon/ammo.
- SendClientMessage(playerid, -1, "You Have Successfully Purchased A Sniper!.");//And let them know they just purchased a weapon.
- return 1;//Tell pawno to stop processing now.
- }
- else//Else the dont have enough money to cover the purchase.
- {
- SendClientMessage(playerid, -1, "You Don't Have Enough Money To Purchase A Sniper.");//Tell them.
- return 1;//Tell pawno to stop processing now.
- }
- }
- }
- }
- if(dialogid == 999)//dialog id response
- {
- if(response)
- {
- if(listitem == 0)//the listitem0, defines the number one option of the dialog
- {
- if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
- {
- SendClientMessage(playerid, COLOR_WHITE, "You chose the Private as your class.");
- ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Soldier Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}M4\n{FFFFFF}Shotgun\n{FFFFFF}Deagle", "Play","");
- gPlayerClass[playerid] = PRIVATE;//setting the class to soldier
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 31, 200);//m4
- GivePlayerWeapon(playerid, 25, 100);//mp5
- GivePlayerWeapon(playerid, 24, 70);//deagle
- }
- }
- if(listitem == 1)//the listitem1, defines the number one option of the dialog
- {
- if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
- {
- SendClientMessage(playerid, COLOR_WHITE, "You chose the Sniper as your class.");
- ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife", "Play","");
- gPlayerClass[playerid] = SNIPER;//setting the class to Sniper
- PickedClass[playerid] = 1;
- RemovePlayerMapIcon(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 34, 250);//sniper
- GivePlayerWeapon(playerid, 29, 250);//mp5
- GivePlayerWeapon(playerid, 4, 1);//knife
- }
- }
- if(listitem == 2)//the listitem2, defines the number one option of the dialog
- {
- if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
- {
- SendClientMessage(playerid, COLOR_WHITE, "You chose the Engineer as your class.");
- ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Engineer Class:", "{F81414}Abilities:\n{FFFFFF}A Strong class, Good in both land and air\nCan drive tanks.\n\n{F81414}Weapons:\n\n{FFFFFF}Spas12\n{FFFFFF}Silent Pistol\n{FFFFFF}RPG\n{FFFFFF}Grenade", "Play","");
- gPlayerClass[playerid] = ENGINEER;//setting the class to engineer
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 27, 200);//spas12
- GivePlayerWeapon(playerid, 23, 200);//silent pistol
- GivePlayerWeapon(playerid, 35, 2);//rpg
- GivePlayerWeapon(playerid, 16, 2);//grenade
- }
- }
- if(listitem == 3)//the listitem3, defines the number one option of the dialog
- {
- if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
- {
- SendClientMessage(playerid, COLOR_WHITE, "You chose the MEDIC as your class.");
- ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Jetrooper Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, cna spawn jetpack by /jetpack.\n\n{F81414}Weapons:\n\n{FFFFFF}Tec-9\n{FFFFFF}Colt\n{FFFFFF}Knife", "Play","");
- gPlayerClass[playerid] = MEDIC;//setting the class to jettrooper
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 32, 500);//tec-9
- GivePlayerWeapon(playerid, 22, 500);//colt
- GivePlayerWeapon(playerid, 4, 1);//knife
- }
- }
- if(listitem == 4)//the listitem4, defines the number one option of the dialog
- {
- if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
- {
- SendClientMessage(playerid, COLOR_WHITE, "You chose the Pilot as your class.");
- ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Pilot Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Can drive hunter, hydra & sea sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun", "Play","");
- gPlayerClass[playerid] = PILOT;//setting the class to pilot
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 24, 200);//deagle
- GivePlayerWeapon(playerid, 17, 4);//moltove
- GivePlayerWeapon(playerid, 25, 100);//shotgun
- }
- }
- if(listitem == 5)//the listitem5, defines the number one option of the dialog
- {
- if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
- {
- SendClientMessage(playerid, COLOR_WHITE, "You chose the Spy as your class.");
- ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Spy Class:", "{F81414}Abilities:\n{FFFFFF}A Victim class, Can Disguise to enemy assaults by /dis\n\n{F81414}Weapons:\n\n{FFFFFF}Mp5\n{FFFFFF}Silent Pistol\n{FFFFFF}Knife\n{FFFFFF}Moltove", "Play","");
- gPlayerClass[playerid] = SPY;//setting the class to Spy
- PickedClass[playerid] = 1;
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 29, 200);//mp5
- GivePlayerWeapon(playerid, 23, 200);//silent pistol
- GivePlayerWeapon(playerid, 4, 1);//knife
- GivePlayerWeapon(playerid, 18, 2);//moltove
- }
- }
- return 1;
- }
- return 1;
- }
- if(dialogid == 333)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if (GetPlayerMoney(playerid) - 3000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
- GivePlayerMoney(playerid, -3000);
- SetPlayerHealth(playerid, 100); //Health
- GameTextForPlayer(playerid, "~r~Health ~w~Refilled!", 500, 0);
- SendClientMessageToAll(COLOR_RED,"A Player Have Refilled His Health");
- }
- if(listitem == 1)
- {
- if (GetPlayerMoney(playerid) - 5000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
- GivePlayerMoney(playerid, -5000);
- SetPlayerArmour(playerid, 100);//Armour
- GameTextForPlayer(playerid, "~w~Armour ~g~Refilled!", 500, 0);
- SendClientMessageToAll(COLOR_RED,"A Player Have Refilled His Armour");
- }
- if(listitem == 2)
- {
- if (GetPlayerMoney(playerid) - 7000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
- GivePlayerMoney(playerid, -7000);
- GivePlayerWeapon(playerid, 29,150);//MP5
- GameTextForPlayer(playerid, "~w~MP5 ~r~Bought!", 500, 0);
- SendClientMessageToAll(COLOR_RED,"A Player Have Bought MP5 Be-Careful");
- }
- if(listitem == 3)
- {
- if (GetPlayerMoney(playerid) - 10000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
- GivePlayerMoney(playerid, -10000);
- GivePlayerWeapon(playerid, 30,150);//AK-47
- GameTextForPlayer(playerid, "~y~AK-47 ~r~Bought!", 500, 0);
- SendClientMessageToAll(COLOR_RED,"A Player Have Bought AK-47 Be-Careful");
- }
- if(listitem == 4)
- {
- if (GetPlayerMoney(playerid) - 15000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
- GivePlayerMoney(playerid, -15000);
- GivePlayerWeapon(playerid, 31,150);//M4
- GameTextForPlayer(playerid, "~r~M4 ~g~Bought!", 500, 0);
- SendClientMessageToAll(COLOR_RED,"A Player Have Bought M4 Be-Careful");
- }
- if(listitem == 5)
- {
- if (GetPlayerMoney(playerid) - 20000 <0) return SendClientMessage(playerid,0xFFC800FF,"You dont have enough money!");
- GivePlayerMoney(playerid, -20000);
- GivePlayerWeapon(playerid, 34,150);//Sniper
- GameTextForPlayer(playerid, "~r~Sniper ~y~Bought!", 500, 0);
- SendClientMessageToAll(COLOR_RED,"A Player Have Bought Sniper Be-Careful");
- }
- return 1;
- }
- }
- if(dialogid == 90)
- {
- if(!response)// This one is used for option 2 which we changed to (Cancel).
- {
- SendClientMessage(playerid, 0x42F3F198, "You canceled the dialog.");//This one sends a message when you close the dialog using (Cancel).
- return 1;
- }
- switch(listitem)//This one will list the items.
- {
- case 0://Case 0 is basically the first line we made in ShowPlayerDialog (1.)
- {
- PlayAudioStreamForPlayer(playerid, "http://radio02-cn3.akadostream.ru:8814/nrj192.mp3");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming."); //This line sends a message to the listener that he can stop it using /stopradio.
- }
- case 1://Case 1 is the second line we put in ShowPlayerDialog (\r\n2.)
- {
- PlayAudioStreamForPlayer(playerid, "http://stream.radioactivity.fm:8002/");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming.");//This line sends a message to the listener that he can stop it using /stopradio.
- }
- case 2://Case 2 is the third line we put in ShowPlayerDialog(\r\n3.)
- {
- PlayAudioStreamForPlayer(playerid, "http://sc.3wk.com:8300/");//This function will play our desired radio. So we have to put the url between its brackets.
- SendClientMessage(playerid, 0x42F3F198, "Type /stopradio to stop audio streaming.");//This line sends a message to the listener that he can stop it using /stopradio.
- }
- //You can continue cases here but make sure you make a new line in the ShowPlayerDialog on /myradio command \r\n4. 4th \r\n5. 5th channel etc..
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public NewContest()
- {
- new string[128]; //We're creating a new string here to inform players of the new number.
- ContestAnswer = MINIMUM_VALUE + random(MAXIMUM_VALUE-MINIMUM_VALUE);
- /* Contest Answer: The number that a player must type to win the contest.
- Minimum_value: The minimum amount, so the number won't be lower then that.
- 'random' picks a random number, but to make sure it doesn't exceeds the maximum value, it substracts the minimum value from it.
- Reason for the 'random': MAXIMUM_VALUE is defined as 8000000. MINIMUM_VALUE is defined as 2000000. The minimum number is already 2000000, and if the the 'random' function also puts out 8000000 (The max value), it'll be able to put out numbers above the MAXIMUM_VALUE. */
- format(string,sizeof string,"A New Money Winning Quiz Has Started. Whoever types %d as first, wins $%d.",ContestAnswer,CONTEST_PRIZE); // This formats a string. More information about strings can be found in the link under this code.
- SendClientMessageToAll(0x00FFFFFF,string); // Color '0x00FFFFFF' is lightblue. The 'string' has just been formatted by us, see the line above. This informs the players that whoever types the contest number first, wins a prize.
- return 1;
- }
- public OnPlayerWinContest(playerid)
- {
- new pName[MAX_PLAYER_NAME],string[128]; // A pName variable for the player's name, and a string to output.
- GetPlayerName(playerid,pName,sizeof pName); //Get's the player's name.
- format(string,sizeof string,"Player %s has won the contest and has won %d!",pName,CONTEST_PRIZE);
- SendClientMessageToAll(0x00FFFFFF,string); //Same color, and it outputs a string.
- GivePlayerMoney(playerid,CONTEST_PRIZE);
- ContestAnswer = -1;
- return 1;
- }
- public EndDeathCam(playerid)
- {
- TogglePlayerSpectating(playerid, 0);
- Died[playerid] = 0;
- }
- public GivePlayerScore(playerid)
- {
- SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
- return 1;
- }
- forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- new Float:HP;
- GetPlayerHealth(playerid, HP);
- if(weaponid == 24) SetPlayerHealth(playerid, HP-60);//DesertEagle
- if(weaponid == 22) SetPlayerHealth(playerid, HP-35);//Colt45
- if(weaponid == 32) SetPlayerHealth(playerid, HP-10);//Tec9
- if(weaponid == 28) SetPlayerHealth(playerid, HP-10);//Uzi
- if(weaponid == 23) SetPlayerHealth(playerid, HP-50);//SilencedColt
- if(weaponid == 31) SetPlayerHealth(playerid, HP-35);//M4
- if(weaponid == 30) SetPlayerHealth(playerid, HP-40);//AK
- if(weaponid == 29) SetPlayerHealth(playerid, HP-18);//MP5
- if(weaponid == 34) SetPlayerHealth(playerid, HP-300);//SniperRifle
- if(weaponid == 33) SetPlayerHealth(playerid, HP-35);//CuntGun
- if(weaponid == 25) SetPlayerHealth(playerid, HP-100);//PumpShotgun
- if(weaponid == 27) SetPlayerHealth(playerid, HP-70);//Spaz12
- if(weaponid == 34) SetPlayerHealth(playerid, HP-700);
- {
- SetPlayerHealth(playerid, HP-700);
- GameTextForPlayer(playerid,"~r~Sniped",3000,3);
- }
- if(GetPlayerState(issuerid) == PLAYER_STATE_DRIVER || GetPlayerState(issuerid) == PLAYER_STATE_PASSENGER )
- {
- new Float:Healths;
- GetPlayerHealth(playerid, Healths);
- GetPlayerHealth(issuerid, Healths);
- SetPlayerHealth(issuerid, Healths - 20); // Make when player DB Kill, issuerid health will -20 /1 shoot
- SetPlayerHealth(playerid, Healths + 100); // playerid health will +100 /1 shoot
- GameTextForPlayer(issuerid,"~r~~h~~h~Stop Drive by kill ~n~ or you will die!",4000,3);
- }
- return 1;
- }
- forward vitals(playerid);
- public vitals(playerid)
- {
- new string[5];
- new Float:pHealth, Float:pArmour;
- GetPlayerHealth(playerid,pHealth);
- GetPlayerArmour(playerid,pArmour);
- format(string, sizeof(string), "%.0f%", pHealth);
- TextDrawSetString(Health[playerid], string);
- format(string, sizeof(string), "%.0f%", pArmour);
- TextDrawSetString(Armour[playerid], string);
- SetTimer("vitals",1000,1);
- }
- public timer_fuel_lower()
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if (isrefuelling[i]) continue;
- new vid = GetPlayerVehicleID(i);
- if (GetPlayerVehicleSeat(i) == 0)
- {
- fuel[vid] = fuel[vid] -1;
- if (fuel[vid]<1)
- {
- fuel[vid] = 0;
- RemovePlayerFromVehicle(i);
- GameTextForPlayer(i,"~r~You are out of ~w~fuel~r~!",5000,4);
- }
- }
- new string[125];format(string,sizeof string,"Fuel:%i",fuel[vid]);
- TextDrawSetString(td_fuel[i],string);
- }
- return 1;
- }
- public timer_refuel(playerid)
- {
- new vid = GetPlayerVehicleID(playerid);
- fuel[vid] = fuel[vid] = 100;
- isrefuelling[playerid] = 0;
- TextDrawSetString(td_fuel[playerid],"Fuel:100");
- TogglePlayerControllable(playerid,1);
- }
- public Speedometer(playerid)
- {
- new vehicleid,Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,speed_string[256],final_speed_int;
- vehicleid = GetPlayerVehicleID(playerid);
- new Float:vehicle_health,final_vehicle_health,health_string[256];
- if(vehicleid != 0)
- {
- GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
- final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*250.666667; // 250.666667 = kmph // 199,4166672= mph
- final_speed_int = floatround(final_speed,floatround_round);
- format(speed_string,256,"Speed: %i",final_speed_int);
- TextDrawSetString(SPEEDOS[playerid], speed_string);
- GetVehicleHealth(vehicleid,vehicle_health);
- final_vehicle_health = floatround(floatround(vehicle_health - 250)/ 7.5); //This will make the health show at 100 when the vehicle is not damaged and at 0 when it is in fire.
- format(health_string,256,"Health %i", final_vehicle_health);
- TextDrawSetString(HEALTH[playerid], health_string);
- }
- else
- {
- TextDrawSetString(SPEEDOS[playerid], " ");
- TextDrawSetString(HEALTH[playerid], " ");
- }
- return 1;
- }
- forward RandomWeather();
- public RandomWeather()
- {
- Weather = random(20);//The variable that we created will hold the random weather.
- SetWeather(Weather);//This will set the weather to a random number which is held in the variable "Weather"
- }
- //===================Admin System
- public SendRandomMsgToAll()
- {
- switch(random(4))// "switch - case" is a sort of "if - else if - else" statement (operator?)
- {
- case 1: SendClientMessageToAll(COLOR_RED, "Please Type /help To Get Help From Server");
- case 2: SendClientMessageToAll(COLOR_RED, "Please Type /cmds To Know Server Commands!");
- case 3: SendClientMessageToAll(COLOR_RED, "Please Respect Everyone In Server.");
- case 4: SendClientMessageToAll(COLOR_RED, "Welcome To Our Server And As You Are New These Are The Basics You Need To Know.");
- }
- }
- forward Error1(playerid);
- public Error1(playerid)
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-1 Administrator to use this command!");
- return 1;
- }
- forward Error2(playerid);
- public Error2(playerid)
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-2 Administrator to use this command!");
- return 1;
- }
- forward Error3(playerid);
- public Error3(playerid)
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-3 Administrator to use this command!");
- return 1;
- }
- forward Error4(playerid);
- public Error4(playerid)
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-4 Administrator to use this command!");
- return 1;
- }
- forward Error5(playerid);
- public Error5(playerid)
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-5 Administrator to use this command!");
- return 1;
- }
- forward Error6(playerid);
- public Error6(playerid)
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-6 Administrator to use this command!");
- return 1;
- }
- forward Error7(playerid);
- public Error7(playerid)
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-7 Administrator to use this command!");
- return 1;
- }
- forward Error8(playerid);
- public Error8(playerid)
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You need to be Level-8 Administrator to use this command!");
- return 1;
- }
- forward MessageToTwice(color,const string[]);
- public MessageToTwice(color,const string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1) if (PlayerInfo[i][pAdmin] >= 1) SendClientMessage(i, color, string);
- }
- return 1;
- }
- stock CMDMessageToAdmins(playerid,command[])
- {
- new string[128]; GetPlayerName(playerid,string,sizeof(string));
- format(string,sizeof(string),"[INFO]Administrator %s has used %s",string,command);
- return MessageToTwice(COLOR_PINK,string);
- }
- //=============================
- stock IsABike(vehicleid) //Made by me
- {
- new result;
- new model = GetVehicleModel(vehicleid);
- switch(model)
- {
- case 509, 481, 510, 462, 448, 581, 522, 461, 521, 523, 463, 586, 468, 471: result = model;
- default: result = 0;
- }
- return result;
- }
- //Funtions
- GetParams(Source[]){
- new Destination[256];
- new SLen=strlen(Source);
- new at,pos=0,tp=0;
- new tempo[256];
- format(Params[0],sizeof(Params),"");
- format(Params[1],sizeof(Params),"");
- format(Params[2],sizeof(Params),"");
- format(Params[3],sizeof(Params),"");
- for(at=pos;at<=SLen;at++){
- strmid(tempo,Source,at,at+1,sizeof(tempo));
- if(!strcmp(tempo,".",true)){
- if(tp<=10){
- strmid(Destination,Source,pos,at,sizeof(Destination));
- format(Params[tp][0],256,"%s",Destination);
- tp=tp+1;
- }
- pos=at+1;
- }
- }
- return 1;
- }
- GetFileData(Source[]){
- new Destination[256];
- new SLen=strlen(Source);
- new at,pos=0,tp=0;
- new tempo[256];
- format(FileData[0],sizeof(FileData),"");
- format(FileData[1],sizeof(FileData),"");
- format(FileData[2],sizeof(FileData),"");
- format(FileData[3],sizeof(FileData),"");
- format(FileData[4],sizeof(FileData),"");
- format(FileData[5],sizeof(FileData),"");
- format(FileData[6],sizeof(FileData),"");
- for(at=pos;at<=SLen;at++){
- strmid(tempo,Source,at,at+1,sizeof(tempo));
- if(!strcmp(tempo,",",true)){
- if(tp<=10){
- strmid(Destination,Source,pos,at,sizeof(Destination));
- format(FileData[tp][0],256,"%s",Destination);
- tp=tp+1;
- }
- pos=at+1;
- }
- }
- return 1;
- }
- GetPlayerCountry(playerid,Country[256]){
- new IPAddress[256];
- new a,b,c,d,ipf;
- new File:IPFile;
- new Text[256],start,end;
- GetPlayerIp(playerid,IPAddress,sizeof(IPAddress));
- GetParams(IPAddress);
- a=strval(Params[0]);
- b=strval(Params[1]);
- c=strval(Params[2]);
- d=strval(Params[3]);
- if(a==127 && b==0 && c==0 && d==1){
- format(Country,sizeof(Country),"Localhost");
- return 1;
- }
- ipf = (16777216*a) + (65536*b) + (256*c) + d;
- if(!fexist("CountriesIPs/IPLIST.csv")) return SendClientMessage(playerid,0xFF0000FF,"Country file not found.");
- IPFile=fopen("CountriesIPs/IPLIST.csv",io_read);
- fread(IPFile,Text,sizeof(Text),false);
- while(strlen(Text)>0){
- GetFileData(Text);
- start=strval(FileData[0]);
- end=strval(FileData[1]);
- if(ipf>=start && ipf<=end){
- format(Country,sizeof(Country),"%s(%s)",FileData[6],FileData[5]);
- fclose(IPFile);
- return 1;
- }
- fread(IPFile,Text,sizeof(Text),false);
- }
- fclose(IPFile);
- return 1;
- }
- GetPName(playerid){
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- // Anti Money Hack
- forward GivePlayerMoneyEx(playerid,ammount);
- public GivePlayerMoneyEx(playerid,ammount)
- {
- OldMoney[playerid] = GetPlayerMoney(playerid);
- NewMoney[playerid] = ammount;
- GivePlayerMoney(playerid,ammount);
- return 1;
- }
- forward CheckMoney();
- public CheckMoney()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(GetPlayerMoney(i) > NewMoney[i])
- {
- ResetPlayerMoney(i);
- GivePlayerMoney(i,OldMoney[i]);
- Ban(i);
- }
- }
- }
- return 1;
- }
- //LASER SYSTEM
- stock IsPlayerInWater(playerid) {
- new anim = GetPlayerAnimationIndex(playerid);
- if (((anim >= 1538) && (anim <= 1542)) || (anim == 1544) || (anim == 1250) || (anim == 1062)) return 1;
- return 0;
- }
- stock IsPlayerAiming(playerid)
- {
- new anim = GetPlayerAnimationIndex(playerid);
- if (((anim >= 1160) && (anim <= 1163)) || (anim == 1167) || (anim == 1365) ||
- (anim == 1643) || (anim == 1453) || (anim == 220)) return 1;
- return 0;
- }
- //----------------------------------------------------------------------------//
- 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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement