Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Please dont remove the credits
- this gm was made by Kjek98*/
- #include <a_samp>
- #include <zcmd>
- #include <streamer>
- #include <foreach>
- #include <YSI\y_ini>
- // enums login
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- OnDuty,//?!
- pDeaths,
- };
- 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]);
- return 1;
- }
- // Capture zones
- #define Zone_1 0
- //colours
- #define germanyteamcolour 0xFF0000FF
- #define usateamcolour 0x2641FEAA
- #define red 0xCC0000
- #define light_blue 0x66BBEE
- #define GREEN 0x15FF00AA
- /*=========================================================================================================
- ==========================================Capture zones===============================================================*/
- #define SNAKE 0 //Snakes farm
- #define BAY 1 //Bay side sea shore
- #define BIG 2 //Area 69
- #define ARMY 3 //army restaurant
- #define PETROL 4 //army petrol bunk
- #define OIL 5 //oil factory
- #define DESERT 6 //gas station
- #define QUARRY 7 //Quarry
- #define GUEST 8 //Army guest house
- #define EAR 9 //Big ear
- #define DIALOG_TEAMS 3
- #define DIALOG_CLASS 4
- #define DIALOG_PI 10
- #define DIALOG_ME 11
- #define DIALOG_SN 12
- #define DIALOG_EN 13
- #define DIALOG_HI 14
- #define DIALOG_SU 15
- #define DIALOG_SO 16
- /*==============================================================================
- Classes
- ===============================================================================*/
- #define CLASS_SOLDIER 0
- #define CLASS_SNIPER 1
- #define CLASS_PILOT 5
- #define CLASS_MEDIC 2
- #define CLASS_ENGINEER 4
- #define CLASS_DONOR 6
- #define CLASS_SUICIDE 3
- // defines login system
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SUCCESS_1 3
- #define DIALOG_SUCCESS_2 4
- // Define the register Path.
- #define PATH "Beta/Users/%s.ini"
- // dialog colors login
- #define COL_WHITE "{FFFFFF}"
- #define COL_GREEN "{00FF22}"
- #define COL_LIGHTBLUE "{00CED1}"
- #define COL_MATI "{0xFF8000FF}"
- #define COL_LAL "{0xFF0000FF}"
- // colors login
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_LIGHTGREEN 0x7FFF00
- #define COLOR_DARKGREEN 0x006400
- #define COLOR_LIGHTBLUE 0x91C8FF
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_GROUPTALK 0x87CEEBAA
- #define COLOR_MENU 0xFFFFFFAA
- #define COLOR_SYSTEM_PM 0x66CC00AA
- #define COLOR_SYSTEM_PW 0xFFFF33AA
- #define COLOR_MATI 0xFF8000FF
- /*==============================================================================
- TextDraws
- ===============================================================================*/
- new Text:blacks;
- new IsSpawned[MAX_PLAYERS];
- new tCP[30];
- new UnderAttack[30] = 0;
- new CP[30];
- new Zone[30];
- new Captured[MAX_PLAYERS][30];
- new timer[MAX_PLAYERS][30];
- new CountVar[MAX_PLAYERS][30];
- new Text:CountText[MAX_PLAYERS];
- new IsPlayerCapturing[MAX_PLAYERS][30];
- // new login system
- new Text:Textdraw0;
- new Text:Textdraw1;
- new Text:Textdraw2;
- //defines
- #define TEAM_USA 0
- #define TEAM_GERMANY 1
- #define TEAM_Z 2
- #define TEAM_NONE 3
- #define TEAM_USA 0
- #define TEAM_GERMANY 1
- #define COLOR_GREEN 0x9EC73DAA
- #define COLOR_RED 0xAA3333AA
- #define COL_WHITE "{FFFFFF}"
- #define COLOR_USA 0x4646FFFF
- #define EMB_USA "{4646FF}"
- #define COLOR_GERMANY 0xE36B31FF
- #define EMB_GERMANY "{E36B31}"
- #define COL_RED "{FF0000}"
- new Spectating[MAX_PLAYERS];
- //new
- new Text:Textdraw4;
- new usa;
- new germany;
- new string[16];
- new Text:tScore[MAX_PLAYERS];
- //others
- static gTeam[MAX_PLAYERS];
- new Class[MAX_PLAYERS];
- //scripting
- main()
- {
- print("***USA vs GERMANY***");
- }
- public OnGameModeInit()
- {
- //login
- Textdraw0 = TextDrawCreate(120.000000, 120.000000, "This Server Register-Login system by karlis");
- TextDrawBackgroundColor(Textdraw0, 255);
- TextDrawFont(Textdraw0, 2);
- TextDrawLetterSize(Textdraw0, 0.480000, 3.000000);
- TextDrawColor(Textdraw0, -16776961);
- TextDrawSetOutline(Textdraw0, 0);
- TextDrawSetProportional(Textdraw0, 1);
- TextDrawSetShadow(Textdraw0, 1);
- TextDrawUseBox(Textdraw0, 1);
- TextDrawBoxColor(Textdraw0, 255);
- TextDrawTextSize(Textdraw0, 581.000000, 24.000000);
- TextDrawSetSelectable(Textdraw0, 0);
- Textdraw1 = TextDrawCreate(98.000000, 121.000000, "°");
- TextDrawBackgroundColor(Textdraw1, 255);
- TextDrawFont(Textdraw1, 2);
- TextDrawLetterSize(Textdraw1, 0.480000, 3.000000);
- TextDrawColor(Textdraw1, -16776961);
- TextDrawSetOutline(Textdraw1, 0);
- TextDrawSetProportional(Textdraw1, 1);
- TextDrawSetShadow(Textdraw1, 1);
- TextDrawUseBox(Textdraw1, 1);
- TextDrawBoxColor(Textdraw1, 255);
- TextDrawTextSize(Textdraw1, 540.000000, 0.000000);
- TextDrawSetSelectable(Textdraw1, 0);
- Textdraw2 = TextDrawCreate(558.000000, 121.000000, "°");
- TextDrawBackgroundColor(Textdraw2, 255);
- TextDrawFont(Textdraw2, 2);
- TextDrawLetterSize(Textdraw2, 0.480000, 3.000000);
- TextDrawColor(Textdraw2, -16776961);
- TextDrawSetOutline(Textdraw2, 0);
- TextDrawSetProportional(Textdraw2, 1);
- TextDrawSetShadow(Textdraw2, 1);
- TextDrawUseBox(Textdraw2, 1);
- TextDrawBoxColor(Textdraw2, 255);
- TextDrawTextSize(Textdraw2, 177.000000, 0.000000);
- TextDrawSetSelectable(Textdraw2, 0);
- //stop login
- SetGameModeText("UVSG");
- blacks = TextDrawCreate(-20.000000,2.000000,"|");
- TextDrawUseBox(blacks,1);
- TextDrawBoxColor(blacks,0x000000ff);
- TextDrawTextSize(blacks,660.000000,22.000000);
- TextDrawAlignment(blacks,0);
- TextDrawBackgroundColor(blacks,0x000000ff);
- TextDrawFont(blacks,3);
- TextDrawLetterSize(blacks,1.000000,52.200000);
- TextDrawColor(blacks,0x000000ff);
- TextDrawSetOutline(blacks,1);
- TextDrawSetProportional(blacks,1);
- TextDrawSetShadow(blacks,1);
- SetTimer("Updater", 1000, 1);
- for(new playerid; playerid < MAX_PLAYERS; playerid ++)
- {
- CountText[playerid] = TextDrawCreate(192.000000, 416.000000, "0/25 seconds left to capture");
- TextDrawBackgroundColor(CountText[playerid], 255);
- TextDrawFont(CountText[playerid], 1);
- TextDrawLetterSize(CountText[playerid], 0.460000, 1.900000);
- TextDrawColor(CountText[playerid], -1);
- TextDrawSetOutline(CountText[playerid], 1);
- TextDrawSetProportional(CountText[playerid], 1);
- tScore[playerid] = TextDrawCreate(499.000000, 140.000000, "Score: 32");
- TextDrawBackgroundColor(tScore[playerid], 255);
- TextDrawFont(tScore[playerid], 1);
- TextDrawLetterSize(tScore[playerid], 0.240000, 1.000000);
- TextDrawColor(tScore[playerid], -65281);
- TextDrawSetOutline(tScore[playerid], 0);
- TextDrawSetProportional(tScore[playerid], 1);
- TextDrawSetShadow(tScore[playerid], 1);
- TextDrawSetSelectable(tScore[playerid], 0);
- }
- tCP[SNAKE] = TEAM_NONE;
- tCP[BAY] = TEAM_NONE;
- tCP[BIG] = TEAM_NONE;
- tCP[ARMY] = TEAM_NONE;
- tCP[PETROL] = TEAM_NONE;
- tCP[OIL] = TEAM_NONE;
- tCP[DESERT] = TEAM_NONE;
- tCP[QUARRY] = TEAM_NONE;
- tCP[GUEST] = TEAM_NONE;
- tCP[EAR] = TEAM_NONE;
- UnderAttack[SNAKE] = 0;
- UnderAttack[BAY] = 0;
- UnderAttack[BIG] = 0;
- UnderAttack[ARMY] = 0;
- UnderAttack[PETROL] = 0;
- UnderAttack[OIL] = 0;
- UnderAttack[DESERT] = 0;
- UnderAttack[QUARRY] = 0;
- UnderAttack[GUEST] = 0;
- UnderAttack[EAR] = 0;
- //---------
- //snakes farm
- CP[SNAKE] = CreateDynamicCP(-36.5458, 2347.6426, 24.1406,3, -1,-1,-1,100.0);
- Zone[SNAKE] = GangZoneCreate(-62.5000000000005,2318.359375,23.4375,2390.625);
- //bayside sea shore
- CP[BAY] = CreateDynamicCP(260.0900,2889.5242,11.1854,3, -1,-1,-1,100.0);
- Zone[BAY] = GangZoneCreate(236.328125,2892.578125,292.96875,2943.359375);
- //area 51
- CP[BIG] = CreateDynamicCP(239.5721,1859.1677,14.0840,3, -1,-1,-1,100.0);
- Zone[BIG] = GangZoneCreate(-46.875,1697.265625,423.828125,2115.234375);
- //army hotel
- CP[ARMY] = CreateDynamicCP(-551.6992,2593.0771,53.9348,3, -1,-1,-1,100.0);
- Zone[ARMY] = GangZoneCreate(-617.1875,2531.25,-455.078125,2658.203125);
- //army petrol bunk
- CP[PETROL] = CreateDynamicCP(670.9215,1705.4658,7.1875,3, -1,-1,-1,100.0);
- Zone[PETROL] = GangZoneCreate(609.375,1652.34375,714.84375,1767.578125);
- //Oil Factory
- CP[OIL] = CreateDynamicCP(221.0856,1422.6615,10.5859,3, -1,-1,-1,100.0);
- Zone[OIL] = GangZoneCreate(95.703125,1339.84375,287.109375,1484.375);
- //Oil Station
- CP[DESERT] = CreateDynamicCP(558.9932,1221.8896,11.7188,3, -1,-1,-1,100.0);
- Zone[DESERT] = GangZoneCreate(529.296875,1205.078125,636.71875,1267.578125);
- //559.5272,1221.7778,11.7188
- //Quarry
- CP[QUARRY] = CreateDynamicCP(588.3246,875.7402,-42.4973,3, -1,-1,-1,100.0);
- Zone[QUARRY] = GangZoneCreate(439.453125,748.046875,863.28125,992.1875);
- //Desert Guest House
- CP[GUEST] = CreateDynamicCP(-314.8433,1773.9176,43.6406,3, -1,-1,-1,100.0);
- Zone[GUEST] = GangZoneCreate(-357.421875,1707.03125,-253.90625,1835.9375);
- //Big Ear
- CP[EAR] = CreateDynamicCP(-311.0136,1542.9733,75.5625,3, -1,-1,-1,100.0);
- Zone[EAR] = GangZoneCreate(-437.5,1513.671875,-244.140625,1636.71875);
- SetTimer("CountDown", 1000, 1);
- //--------------------------------->GangZones<------------------------------------------//
- usa = GangZoneCreate(-362.0141, 2557.455, -105.1009, 2814.368);
- germany = GangZoneCreate(-887.5186, 1354.634, -583.8938, 1646.58);
- //------------------------------->Classes<-----------------------------------------------//
- AddPlayerClass(287,-246.4079,2622.3428,62.9486,269.4406,0,0,0,0,0,0); // usa spawn
- AddPlayerClass(179,-748.3502,1588.8071,26.9609,137.3416,0,0,0,0,0,0); // german spawn
- //------------------------------------>TextDraws<-----------------------------------------//
- Textdraw4 = TextDrawCreate(2.000000,434.000000,"***USA vs GERMANY***");
- TextDrawAlignment(Textdraw4,1);
- TextDrawBackgroundColor(Textdraw4,0x000000ff);
- TextDrawFont(Textdraw4,1);
- TextDrawLetterSize(Textdraw4,0.399999,1.300000);
- TextDrawColor(Textdraw4,0x66BBEE);
- TextDrawSetOutline(Textdraw4,1);
- TextDrawSetProportional(Textdraw4,1);
- TextDrawSetShadow(Textdraw4,1);
- TextDrawShowForAll(Textdraw4);
- //---------------------------------------------------->CreateObject<------------------------------------------------------------------------------//
- //USA BASE
- CreateObject(3115, -161.70344543457, 2659.6105957031, 63.763652801514, 0.000000, 0.000000, 0.000000); //object (carrier_lift1_sfse) (1)
- CreateObject(3934, -161.54772949219, 2659.5832519531, 64.076301574707, 0.000000, 0.000000, 89.325012207031); //object (helipad01) (1)
- CreateObject(3279, -218.10334777832, 2686.6560058594, 61.660766601563, 0.000000, 0.000000, 0.000000); //object (a51_spottower) (1)
- CreateObject(3279, -288.03460693359, 2605.8432617188, 61.660766601563, 0.000000, 0.000000, 356.0299987793); //object (a51_spottower) (2)
- CreateObject(3279, -192.28852844238, 2605.4719238281, 61.660766601563, 0.000000, 0.000000, 3.9683837890625); //object (a51_spottower) (3)
- CreateObject(3279, -309.59515380859, 2744.6889648438, 61.660766601563, 0.000000, 0.000000, 356.02844238281); //object (a51_spottower) (4)
- CreateObject(3279, -159.98118591309, 2743.6232910156, 61.660766601563, 0.000000, 0.000000, 356.02844238281); //object (a51_spottower) (5)
- CreateObject(3115, -218.13275146484, 2662.1687011719, 63.763652801514, 0.000000, 0.000000, 0.000000); //object (carrier_lift1_sfse) (2)
- CreateObject(3934, -218.1735534668, 2661.626953125, 64.077682495117, 0.000000, 0.000000, 0.000000); //object (helipad01) (2)
- CreateObject(3085, -220.32933044434, 2724.453125, 62.621589660645, 0.000000, 0.000000, 0.000000); //object (nf_list_1) (1)
- CreateObject(3749, -139.63252258301, 2635.8393554688, 68.567726135254, 0.000000, 0.000000, 90); //object (clubgate01_lax) (1)
- CreateObject(3749, -380.14517211914, 2690.8317871094, 68.567726135254, 0.000000, 358.01501464844, 208.01501464844); //object (clubgate01_lax) (2)
- //GERAMNY BASE
- //------------------------------------------------------>Vehicles<------------------------------------------//
- //USA BASE
- AddStaticVehicle(470, -228.28308105469, 2609.6574707031, 62.813137054443, 0.000000, -1, -1); //0
- AddStaticVehicle(578,-231.6275000,2634.5352000,63.1967000,0.0000000,-1,-1); //DFT-30
- AddStaticVehicle(470, -233.87504577637, 2609.8413085938, 62.813137054443, 0.000000, -1, -1); //1
- AddStaticVehicle(470, -240.23924255371, 2610.0502929688, 62.813137054443, 0.000000, -1, -1); //2
- AddStaticVehicle(468, -213.17851257324, 2609.36328125, 62.463123321533, 0.000000, -1, -1); //3
- AddStaticVehicle(468, -210.28489685059, 2609.2680664063, 62.463123321533, 0.000000, -1, -1); //4
- AddStaticVehicle(468, -207.39134216309, 2609.1723632813, 62.463123321533, 0.000000, -1, -1); //5
- AddStaticVehicle(468, -208.73417663574, 2609.4091796875, 62.463123321533, 0.000000, -1, -1); //6
- AddStaticVehicle(468, -211.62623596191, 2609.5043945313, 62.463123321533, 0.000000, -1, -1); //7
- AddStaticVehicle(432, -200.84219360352, 2596.1276855469, 62.802463531494, 0.000000, -1, -1); //8
- AddStaticVehicle(432, -208.57057189941, 2596.5698242188, 62.802463531494, 0.000000, -1, -1); //9
- AddStaticVehicle(433, -240.82540893555, 2597.4020996094, 63.273124694824, 0.000000, -1, -1); //10
- AddStaticVehicle(433, -235.03952026367, 2597.2109375, 63.273124694824, 0.000000, -1, -1); //11
- AddStaticVehicle(433, -228.86767578125, 2597.0078125, 63.273124694824, 0.000000, -1, -1); //12
- AddStaticVehicle(432, -217.45196533203, 2596.7978515625, 62.802463531494, 0.000000, -1, -1); //13
- AddStaticVehicle(470, -204.54116821289, 2609.4782714844, 62.813137054443, 0.000000, -1, -1); //14
- AddStaticVehicle(470, -200.4891204834, 2609.4467773438, 62.813137054443, 0.000000, -1, -1); //15
- AddStaticVehicle(470, -158.1381072998, 2685.2199707031, 63.178516387939, 178.65002441406, -1, -1); //16
- AddStaticVehicle(425, -156.02909851074, 2656.490234375, 65.922508239746, 180, -1, -1); //17
- AddStaticVehicle(425, -167.11849975586, 2656.3479003906, 65.922508239746, 180, -1, -1); //18
- AddStaticVehicle(548, -217.85174560547, 2660.7194824219, 66.981689453125, 0.000000, -1, -1); //19
- AddStaticVehicle(520, -303.6012878418, 2682.1376953125, 63.857971191406, 0.000000, -1, -1); //20
- AddStaticVehicle(468, -169.14440917969, 2703.9077148438, 62.253448486328, 0.000000, -1, -1); //21
- AddStaticVehicle(468, -169.30752563477, 2712.6396484375, 62.253448486328, 176.75506591797, -1, -1); //22
- AddStaticVehicle(470, -169.37593078613, 2727.1442871094, 62.591770172119, 91.31005859375, -1, -1); //23
- AddStaticVehicle(433, -216.90167236328, 2779.2653808594, 63.21142578125, 91.31005859375, -1, -1); //24
- AddStaticVehicle(432, -202.03094482422, 2783.9685058594, 62.144927978516, 0.000000, -1, -1); //25
- AddStaticVehicle(432, -188.67221069336, 2783.8757324219, 62.144927978516, 0.000000, -1, -1); //26
- AddStaticVehicle(432, -195.1785736084, 2784.05078125, 62.144927978516, 0.000000, -1, -1); //27
- AddStaticVehicle(520, -316.28744506836, 2681.953125, 63.857971191406, 0.000000, -1, -1); //28
- AddStaticVehicle(433, -295.22485351563, 2687.2722167969, 63.234474182129, 0.000000, -1, -1); //29
- AddStaticVehicle(470, -281.33306884766, 2688.6689453125, 62.779941558838, 0.000000, -1, -1); //30
- AddStaticVehicle(470, -267.39437866211, 2783.7175292969, 62.797512054443, 0.000000, -1, -1); //31
- AddStaticVehicle(470, 282.37728881836, 1948.908203125, 17.750637054443, 270, -1, -1); //32
- AddStaticVehicle(470, 282.15444946289, 1953.3414306641, 17.750637054443, 270, -1, -1); //33
- AddStaticVehicle(470, 281.95114135742, 1957.3885498047, 17.750637054443, 270, -1, -1); //34
- AddStaticVehicle(470, 281.73736572266, 1961.6281738281, 17.750637054443, 270, -1, -1); //35
- AddStaticVehicle(433, 282.16131591797, 1983.9725341797, 18.210624694824, 270, -1, -1); //36
- AddStaticVehicle(433, 281.83221435547, 1990.5251464844, 18.210624694824, 270, -1, -1); //37
- AddStaticVehicle(433, 281.53213500977, 1996.4996337891, 18.210624694824, 270, -1, -1); //38
- AddStaticVehicle(432, 279.28225708008, 2017.2548828125, 17.739961624146, 270, -1, -1); //39
- AddStaticVehicle(432, 279.21112060547, 2023.6234130859, 17.739961624146, 270, -1, -1); //40
- AddStaticVehicle(432, 279.13507080078, 2030.1843261719, 17.739961624146, 270, -1, -1); //41
- AddStaticVehicle(468, 293.01000976563, 2041.3334960938, 17.400625228882, 270, -1, -1); //42
- AddStaticVehicle(468, 293.10296630859, 2043.2534179688, 17.400625228882, 270, -1, -1); //43
- AddStaticVehicle(468, 292.95056152344, 2045.3890380859, 17.400625228882, 270, -1, -1); //44
- AddStaticVehicle(468, 292.97286987305, 2047.5238037109, 17.400625228882, 270, -1, -1); //45
- AddStaticVehicle(468, 293.14498901367, 2049.5307617188, 17.400625228882, 270, -1, -1); //46
- AddStaticVehicle(468, 293.13473510742, 2039.5895996094, 17.400625228882, 270, -1, -1); //47
- AddStaticVehicle(520, 248.1609954834, 2025.4908447266, 18.567474365234, 180, -1, -1); //48
- AddStaticVehicle(520, 232.31455993652, 2024.9099121094, 18.567474365234, 180, -1, -1); //49
- AddStaticVehicle(520, 218.01193237305, 2024.3414306641, 18.567474365234, 180, -1, -1); //50
- AddStaticVehicle(425, 241.40653991699, 2002.1005859375, 18.491624832153, 0.000000, -1, -1); //51
- AddStaticVehicle(425, 225.02996826172, 2002.1018066406, 18.491624832153, 0.000000, -1, -1); //52
- AddStaticVehicle(548, 232.82919311523, 1986.8636474609, 26.048950195313, 0.000000, -1, -1); //53
- AddStaticVehicle(548, 247.10720825195, 1986.9807128906, 26.048950195313, 0.000000, -1, -1); //54
- AddStaticVehicle(548, 219.91345214844, 1987.5314941406, 26.048950195313, 0.000000, -1, -1); //55
- AddStaticVehicle(433, 326.93884277344, 2051.2170410156, 18.210624694824, 90, -1, -1); //56
- AddStaticVehicle(433, 326.77633666992, 2044.8520507813, 18.210624694824, 90, -1, -1); //57
- AddStaticVehicle(433, 326.58471679688, 2037.330078125, 18.210624694824, 90, -1, -1); //58
- AddStaticVehicle(432, 345.26824951172, 2055.6618652344, 18.006259918213, 0.000000, -1, -1); //59
- AddStaticVehicle(432, 354.25405883789, 2059.8725585938, 18.006259918213, 0.000000, -1, -1); //60
- AddStaticVehicle(432, 337.2392578125, 2058.7587890625, 18.006259918213, 0.000000, -1, -1); //61
- AddStaticVehicle(470, 315.82730102539, 2063.5959472656, 17.750637054443, 180, -1, -1); //62
- AddStaticVehicle(470, 309.955078125, 2063.86328125, 17.750637054443, 180, -1, -1); //63
- AddStaticVehicle(470, 304.580078125, 2063.9052734375, 17.750637054443, 180, -1, -1); //64
- AddStaticVehicle(470, 299.16033935547, 2063.5180664063, 17.750637054443, 180, -1, -1); //65
- AddStaticVehicle(470, 320.95343017578, 2063.666015625, 17.750637054443, 180, -1, -1); //66
- AddStaticVehicle(470, 293.74700927734, 2063.3327636719, 17.750637054443, 180, -1, -1); //67
- AddStaticVehicle(568, 284.91848754883, 1936.7231445313, 17.61562538147, 0.000000, -1, -1); //68
- AddStaticVehicle(568, 281.83056640625, 1936.751953125, 17.61562538147, 0.000000, -1, -1); //69
- AddStaticVehicle(568, 278.35675048828, 1936.7849121094, 17.61562538147, 0.000000, -1, -1); //70
- AddStaticVehicle(568, -148.38873291016, 2622.4609375, 63.416919708252, 0.000000, -1, -1); //71
- AddStaticVehicle(568, -152.45854187012, 2622.5288085938, 63.416919708252, 0.000000, -1, -1); //72
- AddStaticVehicle(568, -156.52787780762, 2622.5961914063, 63.416919708252, 0.000000, -1, -1); //73
- AddStaticVehicle(468, -510.11172485352, 2585.8103027344, 53.174060821533, 0.000000, -1, -1); //74
- AddStaticVehicle(468, -507.60360717773, 2585.8698730469, 53.174060821533, 0.000000, -1, -1); //75
- AddStaticVehicle(424, -538.4912109375, 2583.4111328125, 53.261287689209, 0.000000, -1, -1); //76
- AddStaticVehicle(424, -528.8681640625, 2583.2016601563, 53.261287689209, 0.000000, -1, -1); //77
- AddStaticVehicle(424, -519.99609375, 2583.4145507813, 53.261287689209, 0.000000, -1, -1); //78
- AddStaticVehicle(424, -514.01232910156, 2583.3654785156, 53.261287689209, 0.000000, -1, -1); //79
- AddStaticVehicle(470, -538.40991210938, 2600.0681152344, 53.524074554443, 0.000000, -1, -1); //80
- AddStaticVehicle(470, -538.52899169922, 2606.4858398438, 53.524074554443, 0.000000, -1, -1); //81
- AddStaticVehicle(470, -538.43255615234, 2612.8779296875, 53.524074554443, 0.000000, -1, -1); //82
- AddStaticVehicle(470, -538.30670166016, 2618.8857421875, 53.524074554443, 0.000000, -1, -1); //83
- AddStaticVehicle(470, -526.5712890625, 2619.779296875, 53.524074554443, 0.000000, -1, -1); //84
- AddStaticVehicle(470, -526.50384521484, 2613.7861328125, 53.524074554443, 0.000000, -1, -1); //85
- AddStaticVehicle(470, -526.4208984375, 2607.6005859375, 53.524074554443, 0.000000, -1, -1); //86
- AddStaticVehicle(470, -526.16107177734, 2601.6220703125, 53.524074554443, 0.000000, -1, -1); //87
- //GERMANY BASE
- AddStaticVehicle(425,-673.2333000,1546.9912000,88.5096000,0.0000000,-1,-1); //Hunter
- AddStaticVehicle(425,-692.7065000,1546.9478000,88.5096000,0.0000000,-1,-1); //Hunter
- AddStaticVehicle(427,-817.9849000,1444.0083000,13.4993000,78.4407000,-1,-1); //Enforcer
- AddStaticVehicle(427,-804.5104000,1445.2115000,13.4993000,74.7499000,-1,-1); //Enforcer
- AddStaticVehicle(427,-789.7258000,1444.8094000,13.4993000,74.7499000,-1,-1); //Enforcer
- AddStaticVehicle(432,-881.6671000,1513.2935000,25.7139000,84.7047000,-1,-1); //Rhino
- AddStaticVehicle(432,-881.1671000,1521.2935000,25.7139000,84.7047000,-1,-1); //Rhino
- AddStaticVehicle(432,-880.6671000,1529.2935000,25.7139000,84.7047000,-1,-1); //Rhino
- AddStaticVehicle(447,-829.4656000,1650.1561000,0.8014000,0.0000000,-1,-1); //Seasparrow
- AddStaticVehicle(447,-841.4656000,1650.1561000,0.8014000,0.0000000,-1,-1); //Seasparrow
- AddStaticVehicle(468,-815.8135000,1557.8822000,26.7097000,270.0000000,-1,-1); //Sanchez
- AddStaticVehicle(468,-815.8135000,1559.8822000,26.7097000,270.0000000,-1,-1); //Sanchez
- AddStaticVehicle(468,-815.8135000,1561.8822000,26.7097000,270.0000000,-1,-1); //Sanchez
- AddStaticVehicle(468,-779.4361000,1497.2994000,23.4590000,90.0000000,-1,-1); //Sanchez
- AddStaticVehicle(468,-783.0488000,1497.3295000,23.1478000,90.0000000,-1,-1); //Sanchez
- AddStaticVehicle(468,-787.2051000,1497.3896000,22.6590000,90.0000000,-1,-1); //Sanchez
- AddStaticVehicle(469,-823.1869000,1549.9633000,30.4767000,270.0000000,-1,-1); //Sparrow
- AddStaticVehicle(469,-823.1869000,1561.9633000,30.4767000,270.0000000,-1,-1); //Sparrow
- AddStaticVehicle(470,-877.4359000,1555.1265000,25.4578000,90.0000000,-1,-1); //Patriot
- AddStaticVehicle(470,-877.4251000,1550.1096000,25.4578000,90.0000000,-1,-1); //Patriot
- AddStaticVehicle(470,-877.4251000,1545.1096000,25.4578000,90.0000000,-1,-1); //Patriot
- AddStaticVehicle(470,-877.4251000,1540.1096000,25.4578000,90.0000000,-1,-1); //Patriot
- AddStaticVehicle(471,-866.4872000,1540.9298000,22.0670000,270.0000000,-1,-1); //Quad
- AddStaticVehicle(471,-866.4872000,1543.4298000,22.3670000,270.0000000,-1,-1); //Quad
- AddStaticVehicle(471,-866.4872000,1545.9298000,22.4670000,270.0000000,-1,-1); //Quad
- AddStaticVehicle(471,-866.4872000,1548.4298000,22.7720000,270.0000000,-1,-1); //Quad
- AddStaticVehicle(528,-837.0952000,1508.2954000,19.9057000,82.7585000,-1,-1); //FBI Truck
- AddStaticVehicle(528,-836.6769000,1512.6506000,19.9057000,82.7585000,-1,-1); //FBI Truck
- AddStaticVehicle(528,-836.4396000,1517.3896000,19.9057000,82.7585000,-1,-1); //FBI Truck
- AddStaticVehicle(487,-662.4413000,1446.8507000,13.6960000,0.0000000,-1,-1); //Maverick
- AddStaticVehicle(487,-650.5704000,1447.0468000,13.6572000,0.0000000,-1,-1); //Maverick
- AddStaticVehicle(487,-637.6727000,1447.4362000,13.7143000,0.0000000,-1,-1); //Maverick
- AddStaticVehicle(520,-708.9006000,1439.6840000,19.1125000,0.0000000,-1,-1); //Hydra
- AddStaticVehicle(520,-720.8840000,1440.3680000,19.1125000,0.0000000,-1,-1); //Hydra
- AddStaticVehicle(500,-866.0134000,1569.6102000,25.0498000,270.0000000,-1,-1); //Mesa
- AddStaticVehicle(500,-866.2427000,1566.5378000,24.7438000,270.0000000,-1,-1); //Mesa
- AddStaticVehicle(500,-866.4086000,1563.3416000,24.4438000,270.0000000,-1,-1); //Mesa
- AddStaticVehicle(500,-866.3918000,1560.3744000,24.3417000,270.0000000,-1,-1); //Mesa
- AddStaticVehicle(490,-769.2357000,1634.3685000,27.1335000,180.0000000,-1,-1); //FBI Rancher
- AddStaticVehicle(490,-764.2357000,1634.3685000,27.1335000,180.0000000,-1,-1); //FBI Rancher
- AddStaticVehicle(490,-759.2357000,1634.3685000,27.1335000,180.0000000,-1,-1); //FBI Rancher
- AddStaticVehicle(490,-753.7357000,1634.3685000,27.1335000,180.0000000,-1,-1); //FBI Rancher
- AddStaticVehicle(490,-747.2357000,1634.3685000,27.1335000,180.0000000,-1,-1); //FBI Rancher
- return 1;
- }
- //login
- public OnGameModeExit()
- {
- TextDrawHideForAll(Textdraw0);
- TextDrawDestroy(Textdraw0);
- TextDrawHideForAll(Textdraw1);
- TextDrawDestroy(Textdraw1);
- TextDrawHideForAll(Textdraw2);
- TextDrawDestroy(Textdraw2);
- return 1;
- }
- //stop login
- public OnPlayerRequestClass(playerid, classid)
- {
- IsSpawned[playerid] = 0;
- TextDrawShowForPlayer(playerid, blacks);
- TogglePlayerSpectating(playerid, 1);
- ShowPlayerDialog(playerid, DIALOG_TEAMS, DIALOG_STYLE_LIST, "Teams:", ""#EMB_USA"United States of America\n"#EMB_GERMANY"Germany", "Select", "");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch( dialogid )
- {
- case DIALOG_TEAMS:
- {
- if(!response) return ShowPlayerDialog(playerid, DIALOG_TEAMS, DIALOG_STYLE_LIST, "Teams:", ""#EMB_USA"United States of America\n"#EMB_GERMANY"Germany", "Select", "");
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- gTeam[playerid] = TEAM_USA;
- SetPlayerTeam(playerid, 0);
- SendClientMessage(playerid, COLOR_USA, "You have chosen United States as your Team.");
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- case 1:
- {
- gTeam[playerid] = TEAM_GERMANY;
- SetPlayerTeam(playerid, 1);
- SendClientMessage(playerid, COLOR_GERMANY, "You have chosen Germany as your Team.");
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- }
- }
- case DIALOG_CLASS:
- {
- if(!response) return ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- if(response)
- {
- if(listitem == 0)
- {
- Class[playerid] = CLASS_SOLDIER;
- ShowPlayerDialog(playerid, DIALOG_SO, DIALOG_STYLE_MSGBOX, "Soldier", "Advantages: No advantages\nSpecial commands: No special commands\nWeapons: Deagle\nMP5\nSPAS12", "Yes", "Back");
- }
- if(listitem == 1)
- {
- Class[playerid] = CLASS_SNIPER;
- ShowPlayerDialog(playerid, DIALOG_SN, DIALOG_STYLE_MSGBOX, "Sniper", "Advantages: Invisible on Map\nSpecial commands: No special commands\nWeapons: Deagle\nMP5\nSniper", "Yes", "Back");
- }
- if(listitem == 2)
- {
- if(GetPlayerScore(playerid) >= 50)
- {
- Class[playerid] = CLASS_MEDIC;
- ShowPlayerDialog(playerid, DIALOG_ME, DIALOG_STYLE_MSGBOX, "Medic", "Advantages: Invisible on Map\nSpecial commands: /heal, /armour, /sell\nWeapons: Silenced 9mm\nSawn Off", "Yes", "Back");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You need to be a Private(50 score) to join this class. Choose another class");
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- if(listitem == 3)
- {
- if(GetPlayerScore(playerid) >= 100)
- {
- Class[playerid] = CLASS_SUICIDE;
- ShowPlayerDialog(playerid, DIALOG_SU, DIALOG_STYLE_MSGBOX, "Suicider", "Advantages: Able to explode players using /explodecar\nSpecial commands: /explodecar\nWeapons: MP5\nAK47", "Yes", "Back");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You need to be a Corporal(1600 score) to join this class. Choose another class");
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- if(listitem == 4)
- {
- if(GetPlayerScore(playerid) >= 500)
- {
- Class[playerid] = CLASS_ENGINEER;
- ShowPlayerDialog(playerid, DIALOG_EN, DIALOG_STYLE_MSGBOX, "Engineer", "Advantages: Able to drive Rhinos and Rustlers /explodecar\nSpecial commands: No special commands\nWeapons: \nMP5\nAK47\nRPG", "Yes", "Back");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You need to be a Lieutenant(500 score) to join this class. Choose another class");
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- if(listitem == 5)
- {
- if(GetPlayerScore(playerid) >= 600)
- {
- Class[playerid] = CLASS_PILOT;
- ShowPlayerDialog(playerid, DIALOG_PI, DIALOG_STYLE_MSGBOX, "Pilot", "Advantages: Able to fly Heavy Aircraft /explodecar\nSpecial commands: No special commands\nWeapons: MP5\nSilenced 9mm\nAK47", "Yes", "Back");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You need to be a Captain(600 score) to join this class. Choose another class");
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- if(listitem == 6)
- {
- if(GetPlayerScore(playerid) >= 9000)
- {
- Class[playerid] = CLASS_DONOR;
- ShowPlayerDialog(playerid, DIALOG_HI, DIALOG_STYLE_MSGBOX, "Donor", "Advantages: Able to drive Rhinos and Fly Heavy Aircraft\nSpecial commands: See /donorhelp\nWeapons: Depends on donor level", "Yes", "Back");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You need to be a 9000 score to enter this class.");
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- }
- }
- case DIALOG_SO:
- {
- if(response)
- {
- SendClientMessage(playerid, -1, "You have selected Soldier as your current playing class.");
- SpawnPlayer(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- case DIALOG_PI:
- {
- if(response)
- {
- SendClientMessage(playerid, -1, "You have selected Pilot as your current playing class.");
- SpawnPlayer(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- case DIALOG_ME:
- {
- if(response)
- {
- SendClientMessage(playerid, -1, "You have selected Medic as your current playing class.");
- SpawnPlayer(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- case DIALOG_SN:
- {
- if(response)
- {
- SendClientMessage(playerid, -1, "You have selected Sniper as your current playing class.");
- SpawnPlayer(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- case DIALOG_EN:
- {
- if(response)
- {
- SendClientMessage(playerid, -1, "You have selected Engineer as your current playing class.");
- SpawnPlayer(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- case DIALOG_HI:
- {
- if(response)
- {
- SendClientMessage(playerid, -1, "You have selected Donor as your current playing class.");
- SpawnPlayer(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- case DIALOG_SU:
- {
- if(response)
- {
- SendClientMessage(playerid, -1, "You have selected Suicider as your current playing class.");
- SpawnPlayer(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
- }
- }
- case 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_Close(File);
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_RED"Success!",""COL_RED"Congratulations! You are registered!!","Ok","");
- }
- }
- case 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]);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_RED"You have successfully logged in!","Ok","");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
- }
- return 1;
- }
- }
- }
- return 1;
- }
- stock ActiveEar(playerid)
- {
- if(PlayerInfo[playerid][OnDuty] == 0)
- {
- if(UnderAttack[EAR] == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- UnderAttack[EAR] = 1;
- timer[playerid][EAR] = SetTimerEx("BigEar", 25000, false,"i",playerid);
- Captured[playerid][EAR] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
- FlashZone(playerid, Zone[EAR]);
- //------Message-----
- if(tCP[EAR] == TEAM_GERMANY)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
- SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Big Ear is under attack!");
- }
- else if(tCP[EAR] == TEAM_USA)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
- SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Big Ear is under attack!");
- }
- else if(tCP[EAR] == TEAM_NONE)
- {
- SendClientMessage(playerid, -1,"This flag is not controlled by any team");
- }
- //---------loop-------//
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- IsPlayerCapturing[i][EAR] = 1;
- }
- }
- else return CaptureZoneMessage(playerid, 1);
- }
- else return CaptureZoneMessage(playerid, 2);
- }
- else return CaptureZoneMessage(playerid, 3);
- return 1;
- }
- stock FlashZone(playerid, zone)
- {
- if(gTeam[playerid] == TEAM_GERMANY)
- {
- GangZoneFlashForAll(zone, COLOR_GERMANY);
- }
- else if(gTeam[playerid] == TEAM_USA)
- {
- GangZoneFlashForAll(zone, COLOR_USA);
- }
- return 1;
- }
- stock SendTeamMessage(teamid, color, text[])
- {
- for(new x=0; x < MAX_PLAYERS; x++)
- {
- if(IsPlayerConnected(x))
- {
- if(gTeam[x] == teamid)
- {
- SendClientMessage(x, color, text);
- }
- }
- }
- return 1;
- }
- stock EarCaptured(playerid)
- {
- Captured[playerid][EAR] = 1;
- UnderAttack[EAR] = 0;
- KillTimer(timer[playerid][EAR]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][EAR] = 25;
- GivePlayerScore(playerid, 5);
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Big Ear\" you received +5 scores and +$5000 cash!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
- //==========================================================================
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][EAR] = 0;
- if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
- {
- SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Big Ear"#COL_WHITE"! You received +1 score for it!");
- GivePlayerScore(i, 1);
- }
- }
- //==========================================================================
- tCP[EAR] = gTeam[playerid];
- GangZoneStopFlashForAll(Zone[EAR]);
- //==========================================================================
- SetZoneColor(playerid, Zone[EAR]);
- //==========================================================================
- new str[128];
- format(str, sizeof(str),"%s has captured \"Big Ear\" for team %s", Name(playerid), GetTeam(playerid));
- SendClientMessageToAll(-1, str);
- return 1;
- }
- stock GetTeam(playerid)
- {
- new str[15];
- if(gTeam[playerid] == TEAM_GERMANY) str = "Germany";
- else if(gTeam[playerid] == TEAM_USA) str = "USA";
- return str;
- }
- stock SetZoneColor(playerid, zone)
- {
- if(gTeam[playerid] == TEAM_GERMANY)
- {
- GangZoneShowForAll(zone, COLOR_GERMANY);
- }
- else if(gTeam[playerid] == TEAM_USA)
- {
- GangZoneShowForAll(zone, COLOR_USA);
- }
- return 1;
- }
- stock LeavingEar(playerid)
- {
- Captured[playerid][EAR] = 1;
- UnderAttack[EAR] = 0;
- KillTimer(timer[playerid][EAR]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][EAR] = 25;
- GangZoneStopFlashForAll(Zone[EAR]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][EAR] = 0;
- }
- SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
- return 1;
- }
- forward BigEar(playerid);
- public BigEar(playerid)
- {
- EarCaptured(playerid);
- return 1;
- }
- //==============================================================================
- //============================[ OnPlayerEnter and OnPlayerLeave Dynamic CP]=====
- //==============================================================================
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == CP[SNAKE])
- {
- if(Spectating[playerid] == 0) {
- if(UnderAttack[SNAKE] == 0) {
- if(PlayerInfo[playerid][OnDuty] == 0) {
- if(tCP[SNAKE] != gTeam[playerid]) {
- CountVar[playerid][SNAKE] = 25;
- ActiveSnake(playerid);
- } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
- } else return CaptureZoneMessage(playerid, 3);
- } else return CaptureZoneMessage(playerid, 2);
- } else return 0;
- }
- else if(checkpointid == CP[BAY])
- {
- if(Spectating[playerid] == 0) {
- if(UnderAttack[BAY] == 0) {
- if(PlayerInfo[playerid][OnDuty] == 0) {
- if(tCP[BAY] != gTeam[playerid]) {
- CountVar[playerid][BAY] = 25;
- ActiveBay(playerid);
- } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
- } else return CaptureZoneMessage(playerid, 3);
- } else return CaptureZoneMessage(playerid, 2);
- } else return 0;
- }
- else if(checkpointid == CP[BIG])
- {
- if(Spectating[playerid] == 0) {
- if(UnderAttack[BIG] == 0) {
- if(PlayerInfo[playerid][OnDuty] == 0) {
- if(tCP[BIG] != gTeam[playerid]) {
- CountVar[playerid][BIG] = 25;
- ActiveBig(playerid);
- } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
- } else return CaptureZoneMessage(playerid, 3);
- } else return CaptureZoneMessage(playerid, 2);
- } else return 0;
- }
- else if(checkpointid == CP[ARMY])
- {
- if(Spectating[playerid] == 0) {
- if(UnderAttack[ARMY] == 0) {
- if(PlayerInfo[playerid][OnDuty] == 0) {
- if(tCP[ARMY] != gTeam[playerid]) {
- CountVar[playerid][ARMY] = 25;
- ActiveArmy(playerid);
- } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
- } else return CaptureZoneMessage(playerid, 3);
- } else return CaptureZoneMessage(playerid, 2);
- } else return 0;
- }
- else if(checkpointid == CP[PETROL])
- {
- if(Spectating[playerid] == 0) {
- if(UnderAttack[PETROL] == 0) {
- if(PlayerInfo[playerid][OnDuty] == 0) {
- if(tCP[PETROL] != gTeam[playerid]) {
- CountVar[playerid][PETROL] = 25;
- ActivePetrol(playerid);
- } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
- } else return CaptureZoneMessage(playerid, 3);
- } else return CaptureZoneMessage(playerid, 2);
- } else return 0;
- }
- else if(checkpointid == CP[OIL])
- {
- if(Spectating[playerid] == 0) {
- if(UnderAttack[OIL] == 0) {
- if(PlayerInfo[playerid][OnDuty] == 0) {
- if(tCP[OIL] != gTeam[playerid]) {
- CountVar[playerid][OIL] = 25;
- ActiveOil(playerid);
- } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
- } else return CaptureZoneMessage(playerid, 3);
- } else return CaptureZoneMessage(playerid, 2);
- } else return 0;
- }
- else if(checkpointid == CP[DESERT])
- {
- if(Spectating[playerid] == 0) {
- if(UnderAttack[DESERT] == 0) {
- if(PlayerInfo[playerid][OnDuty] == 0) {
- if(tCP[DESERT] != gTeam[playerid]) {
- CountVar[playerid][DESERT] = 25;
- ActiveDesert(playerid);
- } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
- } else return CaptureZoneMessage(playerid, 3);
- } else return CaptureZoneMessage(playerid, 2);
- } else return 0;
- }
- else if(checkpointid == CP[QUARRY])
- {
- if(Spectating[playerid] == 0) {
- if(UnderAttack[QUARRY] == 0) {
- if(PlayerInfo[playerid][OnDuty] == 0) {
- if(tCP[QUARRY] != gTeam[playerid]) {
- CountVar[playerid][QUARRY] = 25;
- ActiveQuarry(playerid);
- } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
- } else return CaptureZoneMessage(playerid, 3);
- } else return CaptureZoneMessage(playerid, 2);
- } else return 0;
- }
- else if(checkpointid == CP[GUEST])
- {
- if(Spectating[playerid] == 0) {
- if(UnderAttack[GUEST] == 0) {
- if(PlayerInfo[playerid][OnDuty] == 0) {
- if(tCP[GUEST] != gTeam[playerid]) {
- CountVar[playerid][GUEST] = 25;
- ActiveGuest(playerid);
- } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
- } else return CaptureZoneMessage(playerid, 3);
- } else return CaptureZoneMessage(playerid, 2);
- } else return 0;
- }
- else if(checkpointid == CP[EAR])
- {
- if(Spectating[playerid] == 0) {
- if(UnderAttack[EAR] == 0) {
- if(PlayerInfo[playerid][OnDuty] == 0) {
- if(tCP[EAR] != gTeam[playerid]) {
- CountVar[playerid][EAR] = 25;
- ActiveEar(playerid);
- } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
- } else return CaptureZoneMessage(playerid, 3);
- } else return CaptureZoneMessage(playerid, 2);
- } else return 0;
- }
- return 1;
- }
- public OnPlayerLeaveDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == CP[SNAKE] && Captured[playerid][SNAKE] == 0 && IsPlayerCapturing[playerid][SNAKE] == 1 && !IsPlayerInDynamicCP(playerid, CP[SNAKE]))
- {
- LeavingSnake(playerid);
- }
- if(checkpointid == CP[BAY] && Captured[playerid][BAY] == 0 && IsPlayerCapturing[playerid][BAY] == 1 && !IsPlayerInDynamicCP(playerid, CP[BAY]))
- {
- LeavingBay(playerid);
- }
- if(checkpointid == CP[BIG] && Captured[playerid][BIG] == 0 && IsPlayerCapturing[playerid][BIG] == 1 && !IsPlayerInDynamicCP(playerid, CP[BIG]))
- {
- LeavingBig(playerid);
- }
- if(checkpointid == CP[ARMY] && Captured[playerid][ARMY] == 0 && IsPlayerCapturing[playerid][ARMY] == 1 && !IsPlayerInDynamicCP(playerid, CP[ARMY]))
- {
- LeavingArmy(playerid);
- }
- if(checkpointid == CP[PETROL] && Captured[playerid][PETROL] == 0 && IsPlayerCapturing[playerid][PETROL] == 1 && !IsPlayerInDynamicCP(playerid, CP[PETROL]))
- {
- LeavingPetrol(playerid);
- }
- if(checkpointid == CP[OIL] && Captured[playerid][OIL] == 0 && IsPlayerCapturing[playerid][OIL] == 1 && !IsPlayerInDynamicCP(playerid, CP[OIL]))
- {
- LeavingOil(playerid);
- }
- if(checkpointid == CP[DESERT] && Captured[playerid][DESERT] == 0 && IsPlayerCapturing[playerid][DESERT] == 1 && !IsPlayerInDynamicCP(playerid, CP[DESERT]))
- {
- LeavingDesert(playerid);
- }
- if(checkpointid == CP[QUARRY] && Captured[playerid][QUARRY] == 0 && IsPlayerCapturing[playerid][QUARRY] == 1 && !IsPlayerInDynamicCP(playerid, CP[QUARRY]))
- {
- LeavingQuarry(playerid);
- }
- if(checkpointid == CP[GUEST] && Captured[playerid][GUEST] == 0 && IsPlayerCapturing[playerid][GUEST] == 1 && !IsPlayerInDynamicCP(playerid, CP[GUEST]))
- {
- LeavingGuest(playerid);
- }
- if(checkpointid == CP[EAR] && Captured[playerid][EAR] == 0 && IsPlayerCapturing[playerid][EAR] == 1 && !IsPlayerInDynamicCP(playerid, CP[EAR]))
- {
- LeavingEar(playerid);
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- //login
- TextDrawShowForPlayer(playerid, Textdraw0);
- TextDrawShowForPlayer(playerid, Textdraw1);
- TextDrawShowForPlayer(playerid, Textdraw2);
- SendClientMessage(playerid,COLOR_MATI,"This server has scripted by Tuntun ");
- 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"Type your password below to login.","Login","Quit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Register your account",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
- }
- return 1;
- }
- //stop
- IsSpawned[playerid] = 0;
- TextDrawShowForPlayer(playerid, blacks);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- new st[100], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"%s Has Just Joined The Server",pName);
- SendClientMessageToAll(0xCC0000, st);
- // Capture Zones
- if(tCP[SNAKE] == TEAM_NONE) GangZoneShowForAll(Zone[SNAKE], -66);
- else if(tCP[SNAKE] == TEAM_GERMANY) GangZoneShowForAll(Zone[SNAKE], COLOR_GERMANY);
- else if(tCP[SNAKE] == TEAM_USA) GangZoneShowForAll(Zone[SNAKE], COLOR_USA);
- //------
- if(tCP[BAY] == TEAM_NONE) GangZoneShowForAll(Zone[BAY], -66);
- else if(tCP[BAY] == TEAM_GERMANY) GangZoneShowForAll(Zone[BAY], COLOR_GERMANY);
- else if(tCP[BAY] == TEAM_USA) GangZoneShowForAll(Zone[BAY], COLOR_USA);
- //------
- if(tCP[BIG] == TEAM_NONE) GangZoneShowForAll(Zone[BIG], -66);
- else if(tCP[BIG] == TEAM_GERMANY) GangZoneShowForAll(Zone[BIG], COLOR_GERMANY);
- else if(tCP[BIG] == TEAM_USA) GangZoneShowForAll(Zone[BIG], COLOR_USA);
- //------
- if(tCP[ARMY] == TEAM_NONE) GangZoneShowForAll(Zone[ARMY], -66);
- else if(tCP[ARMY] == TEAM_GERMANY) GangZoneShowForAll(Zone[ARMY], COLOR_GERMANY);
- else if(tCP[ARMY] == TEAM_USA) GangZoneShowForAll(Zone[ARMY], COLOR_USA);
- //------
- if(tCP[PETROL] == TEAM_NONE) GangZoneShowForAll(Zone[PETROL], -66);
- else if(tCP[PETROL] == TEAM_GERMANY) GangZoneShowForAll(Zone[PETROL], COLOR_GERMANY);
- else if(tCP[PETROL] == TEAM_USA) GangZoneShowForAll(Zone[PETROL], COLOR_USA);
- //------
- if(tCP[OIL] == TEAM_NONE) GangZoneShowForAll(Zone[OIL], -66);
- else if(tCP[OIL] == TEAM_GERMANY) GangZoneShowForAll(Zone[OIL], COLOR_GERMANY);
- else if(tCP[OIL] == TEAM_USA) GangZoneShowForAll(Zone[OIL], COLOR_USA);
- //------
- if(tCP[DESERT] == TEAM_NONE) GangZoneShowForAll(Zone[DESERT], -66);
- else if(tCP[DESERT] == TEAM_GERMANY) GangZoneShowForAll(Zone[DESERT], COLOR_GERMANY);
- else if(tCP[DESERT] == TEAM_USA) GangZoneShowForAll(Zone[DESERT], COLOR_USA);
- //------
- if(tCP[QUARRY] == TEAM_NONE) GangZoneShowForAll(Zone[QUARRY], -66);
- else if(tCP[QUARRY] == TEAM_GERMANY) GangZoneShowForAll(Zone[QUARRY], COLOR_GERMANY);
- else if(tCP[QUARRY] == TEAM_USA) GangZoneShowForAll(Zone[QUARRY], COLOR_USA);
- //------
- if(tCP[GUEST] == TEAM_NONE) GangZoneShowForAll(Zone[GUEST], -66);
- else if(tCP[GUEST] == TEAM_GERMANY) GangZoneShowForAll(Zone[GUEST], COLOR_GERMANY);
- else if(tCP[GUEST] == TEAM_USA) GangZoneShowForAll(Zone[GUEST], COLOR_USA);
- //------
- if(tCP[EAR] == TEAM_NONE) GangZoneShowForAll(Zone[EAR], -66);
- else if(tCP[EAR] == TEAM_GERMANY) GangZoneShowForAll(Zone[EAR], COLOR_GERMANY);
- else if(tCP[EAR] == TEAM_USA) GangZoneShowForAll(Zone[EAR], COLOR_USA);
- //-------------------------------------------------------------------------------------
- //---------------------------------------------------------------------------------------------
- SetPlayerMapIcon(playerid, 5, -36.5458, 2347.6426, 24.1406, 19,2,MAPICON_GLOBAL); //SNakes farm
- SetPlayerMapIcon(playerid, 6, 260.0900,2889.5242,11.1854, 19,2,MAPICON_GLOBAL); //Bay side
- SetPlayerMapIcon(playerid, 7, 239.5721,1859.1677,14.0840, 19,2,MAPICON_GLOBAL); //Area 69
- SetPlayerMapIcon(playerid, 8, -551.6992,2593.0771,53.9348, 19,2,MAPICON_GLOBAL); //Army hotel
- SetPlayerMapIcon(playerid, 9, 670.9215,1705.4658,7.1875, 19,2,MAPICON_GLOBAL); //Army petrol bunk
- SetPlayerMapIcon(playerid, 10, 221.0856,1422.6615,10.5859, 19,2,MAPICON_GLOBAL); //Oil Factory
- SetPlayerMapIcon(playerid, 11, 558.9932,1221.8896,11.7188, 19,2,MAPICON_GLOBAL); //Oil Station
- SetPlayerMapIcon(playerid, 12, 588.3246,875.7402,-42.4973, 19,2,MAPICON_GLOBAL); //Quarry
- SetPlayerMapIcon(playerid, 13, -314.8433,1773.9176,43.6406, 19,2,MAPICON_GLOBAL); //Desert Guest house
- SetPlayerMapIcon(playerid, 14, -311.0136,1542.9733,75.5625, 19,2,MAPICON_GLOBAL); //Big Ear
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- //login
- 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_Close(File);
- return 1;
- }
- //stop
- new str[100], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"%s Has Left The Server",pName);
- SendClientMessageToAll(0xCC0000,str);
- return 1;
- }
- forward Updater();
- public Updater()
- {
- foreach(new playerid: Player)
- {
- if(IsSpawned[playerid] == 1)
- {
- TextDrawShowForPlayer(playerid, tScore[playerid]);
- new st3[80];
- format(st3, sizeof(st3), "~g~Score: ~w~%d", GetPlayerScore(playerid));
- TextDrawSetString(tScore[playerid], st3);
- }
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- IsSpawned[playerid] = 1;
- TextDrawHideForPlayer(playerid, blacks);
- TogglePlayerSpectating(playerid, 0);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- //login
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- TextDrawHideForPlayer(playerid, Textdraw2);
- return 1;
- }//stop
- //-------------------------------------GangZone colors--------------------------------------------//
- GangZoneShowForPlayer(playerid, germany, 0xFF00004E);
- GangZoneShowForPlayer(playerid, usa, 0x0000FF61);
- //-------------------------------------starter message---------------------------------------------//
- SendClientMessage(playerid,0x66BBEE,"***USA vs GERMANY***");
- SendClientMessage(playerid,0x66BBEE,"It Was Scripted By Mc_karlis");
- SendClientMessage(playerid,0x66BBEE,"Type /cmds to know commands!");
- SendClientMessage(playerid,0x66BBEE,"Hope You Like It!");
- SetPlayerArmour(playerid, 0.0);
- if(gTeam[playerid] == TEAM_GERMANY) //germany
- {
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,25,500);
- GivePlayerWeapon(playerid,29,500);
- GivePlayerWeapon(playerid,30,500);
- GivePlayerWeapon(playerid,31,500);
- SetPlayerColor(playerid,0xFF0000FF);
- SetPlayerPos(playerid, -748.3502,1588.8071,26.9609);
- SetPlayerFacingAngle(playerid, 137.3416);
- SetPlayerSkin(playerid, 179);
- }
- else if(gTeam[playerid] == TEAM_USA) //usa
- {
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,25,500);
- GivePlayerWeapon(playerid,29,500);
- GivePlayerWeapon(playerid,30,500);
- GivePlayerWeapon(playerid,31,500);
- SetPlayerColor(playerid,0x2641FEAA);
- SetPlayerPos(playerid, -246.4079,2622.3428,62.9486);
- SetPlayerFacingAngle(playerid, 269.4406);
- SetPlayerSkin(playerid, 287);
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- PlayerInfo[killerid][pKills]++;
- PlayerInfo[playerid][pDeaths]++;
- SetPlayerScore(killerid,GetPlayerScore(killerid)+3);
- GivePlayerMoney(killerid,800);
- new msg[128];
- new killername[MAX_PLAYER_NAME],victimname[MAX_PLAYER_NAME];
- GetPlayerName(killerid,killername,MAX_PLAYER_NAME); GetPlayerName(playerid,victimname,MAX_PLAYER_NAME);
- format(msg, 128, "%s You got killed %s with Weapon ID: %i", killername, victimname, GetPlayerWeapon(killerid));
- GameTextForPlayer(playerid,"you just got killed",5000,1);
- SendClientMessageToAll(0xAA3333AA,msg);
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/objectives", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Information","~~~~~~~~~~~~~~~~~~~~~~~~~\n\t:Commands:\n/objectives\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\t:Objective:\n1.Kill The Other Team.\n2.Earn Cash. \n3.Buy Items From Shop(s)\n~~~~~~~~~~~~~~~~~~~~~~~~~","Ok","Cancel");
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- format(string,sizeof(string),"-%.0f hp",amount);
- SetPlayerChatBubble(playerid,string,0x660000AA,150.0,2500);
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- //---------------------------------------------CMDS------------------------------------------//
- //--------------------------------------------/Kill cmd-------------------------------------//
- CMD:kill(playerid, params[])
- {
- SetPlayerHealth(playerid,0);
- return 1;
- }
- //--------------------------------------------/help cmd-------------------------------------//
- CMD:cmds(playerid, params[])
- {
- SendClientMessage(playerid, 0xFFFFFFF, "/kill /stats /buyhealth /buyarmour /forum");
- SendClientMessage(playerid, 0xFFFFFFF, "/help /credits /rules /ch");
- return 1;
- }
- //---------------------------------------/buyhealth cmd-------------------------------------------//
- CMD:buyhealth(playerid, params[])
- {
- if(GetPlayerMoney(playerid) > 5500) // if the player have 5500+ in his pocket
- {
- SetPlayerHealth(playerid,100); // we heal him a.k.a give him full health
- SendClientMessage(playerid,-1,"You paid 5500$ to heal your self !"); // changeme : the color you wan't , COLOR_GREEN for example
- } else SendClientMessage(playerid,-1,"You don't have 5500$ !");
- return 1;
- }
- //-------------------------------------------/buyarmour---------------------------------------------------------------------------------------//
- CMD:buyarmour(playerid, params[])
- {
- if(GetPlayerMoney(playerid) > 6000) // if the player have 5500+ in his pocket
- {
- SetPlayerArmour(playerid,100); // we heal him a.k.a give him full health
- SendClientMessage(playerid,-1,"You paid 6000$ to armour your self !"); // changeme : the color you wan't , COLOR_GREEN for example
- } else SendClientMessage(playerid,-1,"You don't have 6000$ !");
- return 1;
- }
- //-----------------------------------------/forum-------------------------------------------------------------------//
- CMD:forum(playerid, params[])
- {
- SendClientMessage(playerid, GREEN, "www.sfworld.tk");
- GameTextForPlayer(playerid, "~w~Server Website:~n~your forum link here", 2500, 3);
- return 1;
- }
- //----------------------------------------------/help----------------------------------------------------//
- CMD:help(playerid, params[])
- {
- SendClientMessage(playerid, GREEN, "***************** COD-NW Help *******************************" );
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, -1, "Welcome to ***USA vs GERMANY***] - Generation of Wars");
- SendClientMessage(playerid, -1, "Read /cmds /rules /credits for more info. ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, GREEN, "*************************************************************");
- return true;
- }
- //--------------------------------------------/credits------------------------------------------------------//
- CMD:credits(playerid, params[])
- {
- SendClientMessage(playerid, GREEN, "*** Server Scripted By Mc_karlis ***");
- SendClientMessage(playerid, GREEN, "*** Beta Tester & Help in Mapping - Mc_karlis***");
- return true;
- }
- //---------------------------------------------/rules---------------------------------------------------------//
- CMD:rules(playerid, params[])
- {
- SendClientMessage(playerid, GREEN, "************ ***USA vs GERMANY*** Rules *****************");
- SendClientMessage(playerid, red, " ");
- SendClientMessage(playerid, red, "1.Do not car park.!");
- SendClientMessage(playerid, red, "2.Do not kill with heli blade.!");
- SendClientMessage(playerid, red, "3.Do not kill players with armoured vehicle in spawn position.!");
- SendClientMessage(playerid, red, "4.Do not disrespect players.!");
- SendClientMessage(playerid, red, "5.Insulting will lead to Warn/Kick/ban.!");
- SendClientMessage(playerid, red, "6.Dont CBug, Slide Bug or Anyother Bug ");
- SendClientMessage(playerid, -1, " ");
- SendClientMessage(playerid, GREEN, "**********************************************");
- return true;
- }
- //-----------------------------------------/ch---------------------------------------------------//
- CMD:ch(playerid, params[])
- {
- SetPlayerHealth(playerid, 0.0);
- ForceClassSelection(playerid);
- SendClientMessage(playerid, -1,"Select your new Team!");
- return 1;
- }
- //--------------------------------------------
- stock CaptureZoneMessage(playerid, messageid)
- {
- switch(messageid)
- {
- case 1:
- {
- SendClientMessage(playerid, -1,"*You cannot capture while in vehicle!");
- }
- case 2:
- {
- SendClientMessage(playerid, -1,"*Zone is already underattack!");
- }
- case 3:
- {
- SendClientMessage(playerid, -1,"You cannot capture areas");
- }
- }
- return 1;
- }
- stock Name(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- stock GivePlayerScore(playerid, score)
- {
- SetPlayerScore(playerid, GetPlayerScore(playerid)+score);
- return 1;
- }
- //Capture Zones
- stock ActiveSnake(playerid)
- {
- if(PlayerInfo[playerid][OnDuty] == 0)
- {
- if(UnderAttack[SNAKE] == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- UnderAttack[SNAKE] = 1;
- timer[playerid][SNAKE] = SetTimerEx("BigSnake", 25000, false,"i",playerid);
- Captured[playerid][SNAKE] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
- FlashZone(playerid, Zone[SNAKE]);
- //------Message-----
- if(tCP[SNAKE] == TEAM_GERMANY)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
- SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Big Snake is under attack!");
- }
- else if(tCP[SNAKE] == TEAM_USA)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
- SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Big Snake is under attack!");
- }
- else if(tCP[SNAKE] == TEAM_NONE)
- {
- SendClientMessage(playerid, -1,"This flag is not controlled by any team");
- }
- //---------loop-------//
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- IsPlayerCapturing[i][SNAKE] = 1;
- }
- }
- else return CaptureZoneMessage(playerid, 1);
- }
- else return CaptureZoneMessage(playerid, 2);
- }
- else return CaptureZoneMessage(playerid, 3);
- return 1;
- }
- stock SnakeCaptured(playerid)
- {
- Captured[playerid][SNAKE] = 1;
- UnderAttack[SNAKE] = 0;
- KillTimer(timer[playerid][SNAKE]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][SNAKE] = 25;
- GivePlayerScore(playerid, 5);
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Big Snake\" you received +5 scores and +$5000 cash!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
- //==========================================================================
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][SNAKE] = 0;
- if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
- {
- SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Big Snake"#COL_WHITE"! You received +1 score for it!");
- GivePlayerScore(i, 1);
- }
- }
- //==========================================================================
- tCP[SNAKE] = gTeam[playerid];
- GangZoneStopFlashForAll(Zone[SNAKE]);
- //==========================================================================
- SetZoneColor(playerid, Zone[SNAKE]);
- //==========================================================================
- new str[128];
- format(str, sizeof(str),"%s has captured \"Big Snake\" for team %s", Name(playerid), GetTeam(playerid));
- SendClientMessageToAll(-1, str);
- return 1;
- }
- stock LeavingSnake(playerid)
- {
- Captured[playerid][SNAKE] = 1;
- UnderAttack[SNAKE] = 0;
- KillTimer(timer[playerid][SNAKE]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][SNAKE] = 25;
- GangZoneStopFlashForAll(Zone[SNAKE]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][SNAKE] = 0;
- }
- SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
- return 1;
- }
- forward BigSnake(playerid);
- public BigSnake(playerid)
- {
- SnakeCaptured(playerid);
- return 1;
- }
- stock ActiveBay(playerid)
- {
- if(PlayerInfo[playerid][OnDuty] == 0)
- {
- if(UnderAttack[BAY] == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- UnderAttack[BAY] = 1;
- timer[playerid][BAY] = SetTimerEx("BigBay", 25000, false,"i",playerid);
- Captured[playerid][BAY] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
- FlashZone(playerid, Zone[BAY]);
- //------Message-----
- if(tCP[BAY] == TEAM_GERMANY)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
- SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Big Bay is under attack!");
- }
- else if(tCP[BAY] == TEAM_USA)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
- SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Big Bay is under attack!");
- }
- else if(tCP[BAY] == TEAM_NONE)
- {
- SendClientMessage(playerid, -1,"This flag is not controlled by any team");
- }
- //---------loop-------//
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- IsPlayerCapturing[i][BAY] = 1;
- }
- }
- else return CaptureZoneMessage(playerid, 1);
- }
- else return CaptureZoneMessage(playerid, 2);
- }
- else return CaptureZoneMessage(playerid, 3);
- return 1;
- }
- stock BayCaptured(playerid)
- {
- Captured[playerid][BAY] = 1;
- UnderAttack[BAY] = 0;
- KillTimer(timer[playerid][BAY]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][BAY] = 25;
- GivePlayerScore(playerid, 5);
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Big Bay\" you received +5 scores and +$5000 cash!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
- //==========================================================================
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][BAY] = 0;
- if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
- {
- SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Big Bay"#COL_WHITE"! You received +1 score for it!");
- GivePlayerScore(i, 1);
- }
- }
- //==========================================================================
- tCP[BAY] = gTeam[playerid];
- GangZoneStopFlashForAll(Zone[BAY]);
- //==========================================================================
- SetZoneColor(playerid, Zone[BAY]);
- //==========================================================================
- new str[128];
- format(str, sizeof(str),"%s has captured \"Big Bay\" for team %s", Name(playerid), GetTeam(playerid));
- SendClientMessageToAll(-1, str);
- return 1;
- }
- stock LeavingBay(playerid)
- {
- Captured[playerid][BAY] = 1;
- UnderAttack[BAY] = 0;
- KillTimer(timer[playerid][BAY]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][BAY] = 25;
- GangZoneStopFlashForAll(Zone[BAY]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][BAY] = 0;
- }
- SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
- return 1;
- }
- forward BigBay(playerid);
- public BigBay(playerid)
- {
- BayCaptured(playerid);
- return 1;
- }
- stock ActiveBig(playerid)
- {
- if(PlayerInfo[playerid][OnDuty] == 0)
- {
- if(UnderAttack[BIG] == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- UnderAttack[BIG] = 1;
- timer[playerid][BIG] = SetTimerEx("BigBig", 25000, false,"i",playerid);
- Captured[playerid][BIG] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
- FlashZone(playerid, Zone[BIG]);
- //------Message-----
- if(tCP[BIG] == TEAM_GERMANY)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
- SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Big Big is under attack!");
- }
- else if(tCP[BIG] == TEAM_USA)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
- SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Big Big is under attack!");
- }
- else if(tCP[BIG] == TEAM_NONE)
- {
- SendClientMessage(playerid, -1,"This flag is not controlled by any team");
- }
- //---------loop-------//
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- IsPlayerCapturing[i][BIG] = 1;
- }
- }
- else return CaptureZoneMessage(playerid, 1);
- }
- else return CaptureZoneMessage(playerid, 2);
- }
- else return CaptureZoneMessage(playerid, 3);
- return 1;
- }
- stock BigCaptured(playerid)
- {
- Captured[playerid][BIG] = 1;
- UnderAttack[BIG] = 0;
- KillTimer(timer[playerid][BIG]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][BIG] = 25;
- GivePlayerScore(playerid, 5);
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Big Big\" you received +5 scores and +$5000 cash!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
- //==========================================================================
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][BIG] = 0;
- if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
- {
- SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Big Big"#COL_WHITE"! You received +1 score for it!");
- GivePlayerScore(i, 1);
- }
- }
- //==========================================================================
- tCP[BIG] = gTeam[playerid];
- GangZoneStopFlashForAll(Zone[BIG]);
- //==========================================================================
- SetZoneColor(playerid, Zone[BIG]);
- //==========================================================================
- new str[128];
- format(str, sizeof(str),"%s has captured \"Big Big\" for team %s", Name(playerid), GetTeam(playerid));
- SendClientMessageToAll(-1, str);
- return 1;
- }
- stock LeavingBig(playerid)
- {
- Captured[playerid][BIG] = 1;
- UnderAttack[BIG] = 0;
- KillTimer(timer[playerid][BIG]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][BIG] = 25;
- GangZoneStopFlashForAll(Zone[BIG]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][BIG] = 0;
- }
- SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
- return 1;
- }
- forward BigBig(playerid);
- public BigBig(playerid)
- {
- BigCaptured(playerid);
- return 1;
- }
- stock ActiveArmy(playerid)
- {
- if(PlayerInfo[playerid][OnDuty] == 0)
- {
- if(UnderAttack[ARMY] == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- UnderAttack[ARMY] = 1;
- timer[playerid][ARMY] = SetTimerEx("ArmyArmy", 25000, false,"i",playerid);
- Captured[playerid][ARMY] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
- FlashZone(playerid, Zone[ARMY]);
- //------Message-----
- if(tCP[ARMY] == TEAM_GERMANY)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
- SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Army Army is under attack!");
- }
- else if(tCP[ARMY] == TEAM_USA)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
- SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Army Army is under attack!");
- }
- else if(tCP[ARMY] == TEAM_NONE)
- {
- SendClientMessage(playerid, -1,"This flag is not controlled by any team");
- }
- //---------loop-------//
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- IsPlayerCapturing[i][ARMY] = 1;
- }
- }
- else return CaptureZoneMessage(playerid, 1);
- }
- else return CaptureZoneMessage(playerid, 2);
- }
- else return CaptureZoneMessage(playerid, 3);
- return 1;
- }
- stock ArmyCaptured(playerid)
- {
- Captured[playerid][ARMY] = 1;
- UnderAttack[ARMY] = 0;
- KillTimer(timer[playerid][ARMY]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][ARMY] = 25;
- GivePlayerScore(playerid, 5);
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Army Army\" you received +5 scores and +$5000 cash!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
- //==========================================================================
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][ARMY] = 0;
- if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
- {
- SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Army Army"#COL_WHITE"! You received +1 score for it!");
- GivePlayerScore(i, 1);
- }
- }
- //==========================================================================
- tCP[ARMY] = gTeam[playerid];
- GangZoneStopFlashForAll(Zone[ARMY]);
- //==========================================================================
- SetZoneColor(playerid, Zone[ARMY]);
- //==========================================================================
- new str[128];
- format(str, sizeof(str),"%s has captured \"Army Army\" for team %s", Name(playerid), GetTeam(playerid));
- SendClientMessageToAll(-1, str);
- return 1;
- }
- stock LeavingArmy(playerid)
- {
- Captured[playerid][ARMY] = 1;
- UnderAttack[ARMY] = 0;
- KillTimer(timer[playerid][ARMY]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][ARMY] = 25;
- GangZoneStopFlashForAll(Zone[ARMY]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][ARMY] = 0;
- }
- SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
- return 1;
- }
- forward ArmyArmy(playerid);
- public ArmyArmy(playerid)
- {
- ArmyCaptured(playerid);
- return 1;
- }
- stock ActivePetrol(playerid)
- {
- if(PlayerInfo[playerid][OnDuty] == 0)
- {
- if(UnderAttack[PETROL] == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- UnderAttack[PETROL] = 1;
- timer[playerid][PETROL] = SetTimerEx("PetrolPetrol", 25000, false,"i",playerid);
- Captured[playerid][PETROL] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
- FlashZone(playerid, Zone[PETROL]);
- //------Message-----
- if(tCP[PETROL] == TEAM_GERMANY)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
- SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Petrol Petrol is under attack!");
- }
- else if(tCP[PETROL] == TEAM_USA)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
- SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Petrol Petrol is under attack!");
- }
- else if(tCP[PETROL] == TEAM_NONE)
- {
- SendClientMessage(playerid, -1,"This flag is not controlled by any team");
- }
- //---------loop-------//
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- IsPlayerCapturing[i][PETROL] = 1;
- }
- }
- else return CaptureZoneMessage(playerid, 1);
- }
- else return CaptureZoneMessage(playerid, 2);
- }
- else return CaptureZoneMessage(playerid, 3);
- return 1;
- }
- stock PetrolCaptured(playerid)
- {
- Captured[playerid][PETROL] = 1;
- UnderAttack[PETROL] = 0;
- KillTimer(timer[playerid][PETROL]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][PETROL] = 25;
- GivePlayerScore(playerid, 5);
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Petrol Petrol\" you received +5 scores and +$5000 cash!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
- //==========================================================================
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][PETROL] = 0;
- if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
- {
- SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Petrol Petrol"#COL_WHITE"! You received +1 score for it!");
- GivePlayerScore(i, 1);
- }
- }
- //==========================================================================
- tCP[PETROL] = gTeam[playerid];
- GangZoneStopFlashForAll(Zone[PETROL]);
- //==========================================================================
- SetZoneColor(playerid, Zone[PETROL]);
- //==========================================================================
- new str[128];
- format(str, sizeof(str),"%s has captured \"Petrol Petrol\" for team %s", Name(playerid), GetTeam(playerid));
- SendClientMessageToAll(-1, str);
- return 1;
- }
- stock LeavingPetrol(playerid)
- {
- Captured[playerid][PETROL] = 1;
- UnderAttack[PETROL] = 0;
- KillTimer(timer[playerid][PETROL]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][PETROL] = 25;
- GangZoneStopFlashForAll(Zone[PETROL]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][PETROL] = 0;
- }
- SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
- return 1;
- }
- forward PetrolPetrol(playerid);
- public PetrolPetrol(playerid)
- {
- PetrolCaptured(playerid);
- return 1;
- }
- stock ActiveOil(playerid)
- {
- if(PlayerInfo[playerid][OnDuty] == 0)
- {
- if(UnderAttack[OIL] == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- UnderAttack[OIL] = 1;
- timer[playerid][OIL] = SetTimerEx("OilOil", 25000, false,"i",playerid);
- Captured[playerid][OIL] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
- FlashZone(playerid, Zone[OIL]);
- //------Message-----
- if(tCP[OIL] == TEAM_GERMANY)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
- SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Oil Oil is under attack!");
- }
- else if(tCP[OIL] == TEAM_USA)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
- SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Oil Oil is under attack!");
- }
- else if(tCP[OIL] == TEAM_NONE)
- {
- SendClientMessage(playerid, -1,"This flag is not controlled by any team");
- }
- //---------loop-------//
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- IsPlayerCapturing[i][OIL] = 1;
- }
- }
- else return CaptureZoneMessage(playerid, 1);
- }
- else return CaptureZoneMessage(playerid, 2);
- }
- else return CaptureZoneMessage(playerid, 3);
- return 1;
- }
- stock OilCaptured(playerid)
- {
- Captured[playerid][OIL] = 1;
- UnderAttack[OIL] = 0;
- KillTimer(timer[playerid][OIL]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][OIL] = 25;
- GivePlayerScore(playerid, 5);
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Oil Oil\" you received +5 scores and +$5000 cash!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
- //==========================================================================
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][OIL] = 0;
- if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
- {
- SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Oil Oil"#COL_WHITE"! You received +1 score for it!");
- GivePlayerScore(i, 1);
- }
- }
- //==========================================================================
- tCP[OIL] = gTeam[playerid];
- GangZoneStopFlashForAll(Zone[OIL]);
- //==========================================================================
- SetZoneColor(playerid, Zone[OIL]);
- //==========================================================================
- new str[128];
- format(str, sizeof(str),"%s has captured \"Oil Oil\" for team %s", Name(playerid), GetTeam(playerid));
- SendClientMessageToAll(-1, str);
- return 1;
- }
- stock LeavingOil(playerid)
- {
- Captured[playerid][OIL] = 1;
- UnderAttack[OIL] = 0;
- KillTimer(timer[playerid][OIL]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][OIL] = 25;
- GangZoneStopFlashForAll(Zone[OIL]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][OIL] = 0;
- }
- SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
- return 1;
- }
- forward OilOil(playerid);
- public OilOil(playerid)
- {
- OilCaptured(playerid);
- return 1;
- }
- stock ActiveDesert(playerid)
- {
- if(PlayerInfo[playerid][OnDuty] == 0)
- {
- if(UnderAttack[DESERT] == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- UnderAttack[DESERT] = 1;
- timer[playerid][DESERT] = SetTimerEx("DesertDesert", 25000, false,"i",playerid);
- Captured[playerid][DESERT] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
- FlashZone(playerid, Zone[DESERT]);
- //------Message-----
- if(tCP[DESERT] == TEAM_GERMANY)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
- SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Desert Desert is under attack!");
- }
- else if(tCP[DESERT] == TEAM_USA)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
- SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Desert Desert is under attack!");
- }
- else if(tCP[DESERT] == TEAM_NONE)
- {
- SendClientMessage(playerid, -1,"This flag is not controlled by any team");
- }
- //---------loop-------//
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- IsPlayerCapturing[i][DESERT] = 1;
- }
- }
- else return CaptureZoneMessage(playerid, 1);
- }
- else return CaptureZoneMessage(playerid, 2);
- }
- else return CaptureZoneMessage(playerid, 3);
- return 1;
- }
- stock DesertCaptured(playerid)
- {
- Captured[playerid][DESERT] = 1;
- UnderAttack[DESERT] = 0;
- KillTimer(timer[playerid][DESERT]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][DESERT] = 25;
- GivePlayerScore(playerid, 5);
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Desert Desert\" you received +5 scores and +$5000 cash!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
- //==========================================================================
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][DESERT] = 0;
- if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
- {
- SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Desert Desert"#COL_WHITE"! You received +1 score for it!");
- GivePlayerScore(i, 1);
- }
- }
- //==========================================================================
- tCP[DESERT] = gTeam[playerid];
- GangZoneStopFlashForAll(Zone[DESERT]);
- //==========================================================================
- SetZoneColor(playerid, Zone[DESERT]);
- //==========================================================================
- new str[128];
- format(str, sizeof(str),"%s has captured \"Desert Desert\" for team %s", Name(playerid), GetTeam(playerid));
- SendClientMessageToAll(-1, str);
- return 1;
- }
- stock LeavingDesert(playerid)
- {
- Captured[playerid][DESERT] = 1;
- UnderAttack[DESERT] = 0;
- KillTimer(timer[playerid][DESERT]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][DESERT] = 25;
- GangZoneStopFlashForAll(Zone[DESERT]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][DESERT] = 0;
- }
- SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
- return 1;
- }
- forward DesertDesert(playerid);
- public DesertDesert(playerid)
- {
- DesertCaptured(playerid);
- return 1;
- }
- stock ActiveQuarry(playerid)
- {
- if(PlayerInfo[playerid][OnDuty] == 0)
- {
- if(UnderAttack[QUARRY] == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- UnderAttack[QUARRY] = 1;
- timer[playerid][QUARRY] = SetTimerEx("QuarryQuarry", 25000, false,"i",playerid);
- Captured[playerid][QUARRY] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
- FlashZone(playerid, Zone[QUARRY]);
- //------Message-----
- if(tCP[QUARRY] == TEAM_GERMANY)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
- SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Quarry Quarry is under attack!");
- }
- else if(tCP[QUARRY] == TEAM_USA)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
- SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Quarry Quarry is under attack!");
- }
- else if(tCP[QUARRY] == TEAM_NONE)
- {
- SendClientMessage(playerid, -1,"This flag is not controlled by any team");
- }
- //---------loop-------//
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- IsPlayerCapturing[i][QUARRY] = 1;
- }
- }
- else return CaptureZoneMessage(playerid, 1);
- }
- else return CaptureZoneMessage(playerid, 2);
- }
- else return CaptureZoneMessage(playerid, 3);
- return 1;
- }
- stock QuarryCaptured(playerid)
- {
- Captured[playerid][QUARRY] = 1;
- UnderAttack[QUARRY] = 0;
- KillTimer(timer[playerid][QUARRY]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][QUARRY] = 25;
- GivePlayerScore(playerid, 5);
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Quarry Quarry\" you received +5 scores and +$5000 cash!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
- //==========================================================================
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][QUARRY] = 0;
- if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
- {
- SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Quarry Quarry"#COL_WHITE"! You received +1 score for it!");
- GivePlayerScore(i, 1);
- }
- }
- //==========================================================================
- tCP[QUARRY] = gTeam[playerid];
- GangZoneStopFlashForAll(Zone[QUARRY]);
- //==========================================================================
- SetZoneColor(playerid, Zone[QUARRY]);
- //==========================================================================
- new str[128];
- format(str, sizeof(str),"%s has captured \"Quarry Quarry\" for team %s", Name(playerid), GetTeam(playerid));
- SendClientMessageToAll(-1, str);
- return 1;
- }
- stock LeavingQuarry(playerid)
- {
- Captured[playerid][QUARRY] = 1;
- UnderAttack[QUARRY] = 0;
- KillTimer(timer[playerid][QUARRY]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][QUARRY] = 25;
- GangZoneStopFlashForAll(Zone[QUARRY]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][QUARRY] = 0;
- }
- SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
- return 1;
- }
- forward QuarryQuarry(playerid);
- public QuarryQuarry(playerid)
- {
- QuarryCaptured(playerid);
- return 1;
- }
- stock ActiveGuest(playerid)
- {
- if(PlayerInfo[playerid][OnDuty] == 0)
- {
- if(UnderAttack[GUEST] == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- UnderAttack[GUEST] = 1;
- timer[playerid][GUEST] = SetTimerEx("GuestGuest", 25000, false,"i",playerid);
- Captured[playerid][GUEST] = 0;
- SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
- FlashZone(playerid, Zone[GUEST]);
- //------Message-----
- if(tCP[GUEST] == TEAM_GERMANY)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
- SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Guest Guest is under attack!");
- }
- else if(tCP[GUEST] == TEAM_USA)
- {
- SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
- SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Guest Guest is under attack!");
- }
- else if(tCP[GUEST] == TEAM_NONE)
- {
- SendClientMessage(playerid, -1,"This flag is not controlled by any team");
- }
- //---------loop-------//
- for(new i = 0; i < MAX_PLAYERS; i ++)
- {
- IsPlayerCapturing[i][GUEST] = 1;
- }
- }
- else return CaptureZoneMessage(playerid, 1);
- }
- else return CaptureZoneMessage(playerid, 2);
- }
- else return CaptureZoneMessage(playerid, 3);
- return 1;
- }
- stock GuestCaptured(playerid)
- {
- Captured[playerid][GUEST] = 1;
- UnderAttack[GUEST] = 0;
- KillTimer(timer[playerid][GUEST]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][GUEST] = 25;
- GivePlayerScore(playerid, 5);
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Guest Guest\" you received +5 scores and +$5000 cash!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
- //==========================================================================
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][GUEST] = 0;
- if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
- {
- SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Guest Guest"#COL_WHITE"! You received +1 score for it!");
- GivePlayerScore(i, 1);
- }
- }
- //==========================================================================
- tCP[GUEST] = gTeam[playerid];
- GangZoneStopFlashForAll(Zone[GUEST]);
- //==========================================================================
- SetZoneColor(playerid, Zone[GUEST]);
- //==========================================================================
- new str[128];
- format(str, sizeof(str),"%s has captured \"Guest Guest\" for team %s", Name(playerid), GetTeam(playerid));
- SendClientMessageToAll(-1, str);
- return 1;
- }
- stock LeavingGuest(playerid)
- {
- Captured[playerid][GUEST] = 1;
- UnderAttack[GUEST] = 0;
- KillTimer(timer[playerid][GUEST]);
- TextDrawHideForPlayer(playerid, CountText[playerid]);
- CountVar[playerid][GUEST] = 25;
- GangZoneStopFlashForAll(Zone[GUEST]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- IsPlayerCapturing[i][GUEST] = 0;
- }
- SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
- PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
- return 1;
- }
- forward GuestGuest(playerid);
- public GuestGuest(playerid)
- {
- GuestCaptured(playerid);
- return 1;
- }
- forward CountDown();
- public CountDown()
- {
- for(new playerid; playerid < MAX_PLAYERS; playerid++)
- {
- if(IsPlayerInDynamicCP(playerid, CP[SNAKE]) && UnderAttack[SNAKE] == 1 && IsPlayerCapturing[playerid][SNAKE] == 1)
- {
- CountVar[playerid][SNAKE]--;
- new str1[124];
- TextDrawShowForPlayer(playerid, CountText[playerid]);
- format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][SNAKE]);
- TextDrawSetString(CountText[playerid], str1);
- }
- if(IsPlayerInDynamicCP(playerid, CP[BAY]) && UnderAttack[BAY] == 1 && IsPlayerCapturing[playerid][BAY] == 1)
- {
- CountVar[playerid][BAY]--;
- new str1[124];
- TextDrawShowForPlayer(playerid, CountText[playerid]);
- format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][BAY]);
- TextDrawSetString(CountText[playerid], str1);
- }
- if(IsPlayerInDynamicCP(playerid, CP[BIG]) && UnderAttack[BIG] == 1 && IsPlayerCapturing[playerid][BIG] == 1)
- {
- CountVar[playerid][BIG]--;
- new str1[124];
- TextDrawShowForPlayer(playerid, CountText[playerid]);
- format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][BIG]);
- TextDrawSetString(CountText[playerid], str1);
- }
- if(IsPlayerInDynamicCP(playerid, CP[ARMY]) && UnderAttack[ARMY] == 1 && IsPlayerCapturing[playerid][ARMY] == 1)
- {
- CountVar[playerid][ARMY]--;
- new str1[124];
- TextDrawShowForPlayer(playerid, CountText[playerid]);
- format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][ARMY]);
- TextDrawSetString(CountText[playerid], str1);
- }
- if(IsPlayerInDynamicCP(playerid, CP[PETROL]) && UnderAttack[PETROL] == 1 && IsPlayerCapturing[playerid][PETROL] == 1)
- {
- CountVar[playerid][PETROL]--;
- new str1[124];
- TextDrawShowForPlayer(playerid, CountText[playerid]);
- format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][PETROL]);
- TextDrawSetString(CountText[playerid], str1);
- }
- if(IsPlayerInDynamicCP(playerid, CP[OIL]) && UnderAttack[OIL] == 1 && IsPlayerCapturing[playerid][OIL] == 1)
- {
- CountVar[playerid][OIL]--;
- new str1[124];
- TextDrawShowForPlayer(playerid, CountText[playerid]);
- format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][OIL]);
- TextDrawSetString(CountText[playerid], str1);
- }
- if(IsPlayerInDynamicCP(playerid, CP[DESERT]) && UnderAttack[DESERT] == 1 && IsPlayerCapturing[playerid][DESERT] == 1)
- {
- CountVar[playerid][DESERT]--;
- new str1[124];
- TextDrawShowForPlayer(playerid, CountText[playerid]);
- format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][DESERT]);
- TextDrawSetString(CountText[playerid], str1);
- }
- if(IsPlayerInDynamicCP(playerid, CP[QUARRY]) && UnderAttack[QUARRY] == 1 && IsPlayerCapturing[playerid][QUARRY] == 1)
- {
- CountVar[playerid][QUARRY]--;
- new str1[124];
- TextDrawShowForPlayer(playerid, CountText[playerid]);
- format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][QUARRY]);
- TextDrawSetString(CountText[playerid], str1);
- }
- if(IsPlayerInDynamicCP(playerid, CP[GUEST]) && UnderAttack[GUEST] == 1 && IsPlayerCapturing[playerid][GUEST] == 1)
- {
- CountVar[playerid][GUEST]--;
- new str1[124];
- TextDrawShowForPlayer(playerid, CountText[playerid]);
- format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][GUEST]);
- TextDrawSetString(CountText[playerid], str1);
- }
- if(IsPlayerInDynamicCP(playerid, CP[EAR]) && UnderAttack[EAR] == 1 && IsPlayerCapturing[playerid][EAR] == 1)
- {
- CountVar[playerid][EAR]--;
- new str1[124];
- TextDrawShowForPlayer(playerid, CountText[playerid]);
- format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][EAR]);
- TextDrawSetString(CountText[playerid], str1);
- }
- }
- return 1;
- }
- // stock login
- 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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement