Advertisement
Guest User

Yourgm

a guest
Aug 19th, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 96.62 KB | None | 0 0
  1. /* Please dont remove the credits
  2. this gm was made by Kjek98*/
  3. #include <a_samp>
  4. #include <zcmd>
  5. #include <streamer>
  6. #include <foreach>
  7. #include <YSI\y_ini>
  8.  
  9. // enums login
  10. enum pInfo
  11. {
  12.     pPass,
  13.     pCash,
  14.     pAdmin,
  15.     pKills,
  16.     OnDuty,//?!
  17.     pDeaths,
  18. };
  19.  
  20. new PlayerInfo[MAX_PLAYERS][pInfo];
  21.  
  22. forward LoadUser_data(playerid,name[],value[]);
  23. public LoadUser_data(playerid,name[],value[])
  24. {
  25.     INI_Int("Password",PlayerInfo[playerid][pPass]);
  26.     INI_Int("Cash",PlayerInfo[playerid][pCash]);
  27.     INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  28.     INI_Int("Kills",PlayerInfo[playerid][pKills]);
  29.     INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
  30.     return 1;
  31. }
  32. // Capture zones
  33. #define Zone_1 0
  34.  
  35. //colours
  36. #define germanyteamcolour   0xFF0000FF
  37. #define usateamcolour       0x2641FEAA
  38. #define red                 0xCC0000
  39. #define light_blue          0x66BBEE
  40. #define GREEN               0x15FF00AA
  41.  
  42.  
  43. /*=========================================================================================================
  44. ==========================================Capture zones===============================================================*/
  45. #define SNAKE 0  //Snakes farm
  46. #define BAY 1 //Bay side sea shore
  47. #define BIG 2 //Area 69
  48. #define ARMY 3 //army restaurant
  49. #define PETROL 4 //army petrol bunk
  50. #define OIL 5 //oil factory
  51. #define DESERT 6 //gas station
  52. #define QUARRY 7 //Quarry
  53. #define GUEST 8 //Army guest house
  54. #define EAR 9 //Big ear
  55.  
  56.  
  57. #define DIALOG_TEAMS 3
  58. #define DIALOG_CLASS 4
  59. #define DIALOG_PI 10
  60. #define DIALOG_ME 11
  61. #define DIALOG_SN 12
  62. #define DIALOG_EN 13
  63. #define DIALOG_HI 14
  64. #define DIALOG_SU 15
  65. #define DIALOG_SO 16
  66. /*==============================================================================
  67. Classes
  68. ===============================================================================*/
  69. #define CLASS_SOLDIER 0
  70. #define CLASS_SNIPER 1
  71. #define CLASS_PILOT 5
  72. #define CLASS_MEDIC 2
  73. #define CLASS_ENGINEER 4
  74. #define CLASS_DONOR 6
  75. #define CLASS_SUICIDE 3
  76.  
  77. // defines login system
  78. #define DIALOG_REGISTER 1
  79. #define DIALOG_LOGIN 2
  80. #define DIALOG_SUCCESS_1 3
  81. #define DIALOG_SUCCESS_2 4
  82.  
  83. // Define the register Path.
  84. #define PATH "Beta/Users/%s.ini"
  85.  
  86. // dialog colors login
  87. #define COL_WHITE "{FFFFFF}"
  88. #define COL_GREEN "{00FF22}"
  89. #define COL_LIGHTBLUE "{00CED1}"
  90. #define COL_MATI    "{0xFF8000FF}"
  91. #define COL_LAL "{0xFF0000FF}"
  92.  
  93. // colors login
  94. #define     COLOR_GREY      0xAFAFAFAA
  95. #define     COLOR_GREY      0xAFAFAFAA
  96.  
  97. #define     COLOR_YELLOW    0xFFFF00AA
  98. #define     COLOR_WHITE     0xFFFFFFAA
  99. #define     COLOR_LIGHTGREEN 0x7FFF00
  100. #define     COLOR_DARKGREEN 0x006400
  101. #define     COLOR_LIGHTBLUE 0x91C8FF
  102. #define     COLOR_ORANGE    0xFF9900AA
  103. #define     COLOR_GROUPTALK 0x87CEEBAA
  104. #define     COLOR_MENU      0xFFFFFFAA
  105. #define     COLOR_SYSTEM_PM 0x66CC00AA
  106. #define     COLOR_SYSTEM_PW 0xFFFF33AA
  107. #define     COLOR_MATI      0xFF8000FF
  108. /*==============================================================================
  109.                                 TextDraws
  110. ===============================================================================*/
  111. new Text:blacks;
  112. new IsSpawned[MAX_PLAYERS];
  113. new tCP[30];
  114. new UnderAttack[30] = 0;
  115. new CP[30];
  116. new Zone[30];
  117. new Captured[MAX_PLAYERS][30];
  118.  
  119. new timer[MAX_PLAYERS][30];
  120. new CountVar[MAX_PLAYERS][30];
  121. new Text:CountText[MAX_PLAYERS];
  122. new IsPlayerCapturing[MAX_PLAYERS][30];
  123.  
  124. // new login system
  125. new Text:Textdraw0;
  126. new Text:Textdraw1;
  127. new Text:Textdraw2;
  128.  
  129.  
  130. //defines
  131. #define TEAM_USA 0
  132. #define TEAM_GERMANY 1
  133. #define TEAM_Z 2
  134. #define TEAM_NONE 3
  135.  
  136.  
  137. #define TEAM_USA      0
  138. #define TEAM_GERMANY         1
  139. #define COLOR_GREEN    0x9EC73DAA
  140. #define COLOR_RED        0xAA3333AA
  141.  
  142. #define COL_WHITE "{FFFFFF}"
  143.  
  144. #define COLOR_USA 0x4646FFFF
  145. #define EMB_USA "{4646FF}"
  146. #define COLOR_GERMANY 0xE36B31FF
  147. #define EMB_GERMANY "{E36B31}"
  148.  
  149.  
  150.  
  151. #define COL_RED "{FF0000}"
  152.  
  153. new Spectating[MAX_PLAYERS];
  154. //new
  155. new Text:Textdraw4;
  156. new usa;
  157. new germany;
  158. new string[16];
  159.  
  160. new Text:tScore[MAX_PLAYERS];
  161. //others
  162. static gTeam[MAX_PLAYERS];
  163. new Class[MAX_PLAYERS];
  164.  
  165.  
  166. //scripting
  167. main()
  168. {
  169.     print("***USA vs GERMANY***");
  170.  
  171. }
  172.  
  173. public OnGameModeInit()
  174. {
  175.     //login
  176.     Textdraw0 = TextDrawCreate(120.000000, 120.000000, "This Server Register-Login system by karlis");
  177.     TextDrawBackgroundColor(Textdraw0, 255);
  178.     TextDrawFont(Textdraw0, 2);
  179.     TextDrawLetterSize(Textdraw0, 0.480000, 3.000000);
  180.     TextDrawColor(Textdraw0, -16776961);
  181.     TextDrawSetOutline(Textdraw0, 0);
  182.     TextDrawSetProportional(Textdraw0, 1);
  183.     TextDrawSetShadow(Textdraw0, 1);
  184.     TextDrawUseBox(Textdraw0, 1);
  185.     TextDrawBoxColor(Textdraw0, 255);
  186.     TextDrawTextSize(Textdraw0, 581.000000, 24.000000);
  187.     TextDrawSetSelectable(Textdraw0, 0);
  188.  
  189.     Textdraw1 = TextDrawCreate(98.000000, 121.000000, "°");
  190.     TextDrawBackgroundColor(Textdraw1, 255);
  191.     TextDrawFont(Textdraw1, 2);
  192.     TextDrawLetterSize(Textdraw1, 0.480000, 3.000000);
  193.     TextDrawColor(Textdraw1, -16776961);
  194.     TextDrawSetOutline(Textdraw1, 0);
  195.     TextDrawSetProportional(Textdraw1, 1);
  196.     TextDrawSetShadow(Textdraw1, 1);
  197.     TextDrawUseBox(Textdraw1, 1);
  198.     TextDrawBoxColor(Textdraw1, 255);
  199.     TextDrawTextSize(Textdraw1, 540.000000, 0.000000);
  200.     TextDrawSetSelectable(Textdraw1, 0);
  201.  
  202.     Textdraw2 = TextDrawCreate(558.000000, 121.000000, "°");
  203.     TextDrawBackgroundColor(Textdraw2, 255);
  204.     TextDrawFont(Textdraw2, 2);
  205.     TextDrawLetterSize(Textdraw2, 0.480000, 3.000000);
  206.     TextDrawColor(Textdraw2, -16776961);
  207.     TextDrawSetOutline(Textdraw2, 0);
  208.     TextDrawSetProportional(Textdraw2, 1);
  209.     TextDrawSetShadow(Textdraw2, 1);
  210.     TextDrawUseBox(Textdraw2, 1);
  211.     TextDrawBoxColor(Textdraw2, 255);
  212.     TextDrawTextSize(Textdraw2, 177.000000, 0.000000);
  213.     TextDrawSetSelectable(Textdraw2, 0);
  214. //stop login
  215.  
  216.     SetGameModeText("UVSG");
  217.  
  218.     blacks = TextDrawCreate(-20.000000,2.000000,"|");
  219.     TextDrawUseBox(blacks,1);
  220.     TextDrawBoxColor(blacks,0x000000ff);
  221.     TextDrawTextSize(blacks,660.000000,22.000000);
  222.     TextDrawAlignment(blacks,0);
  223.     TextDrawBackgroundColor(blacks,0x000000ff);
  224.     TextDrawFont(blacks,3);
  225.     TextDrawLetterSize(blacks,1.000000,52.200000);
  226.     TextDrawColor(blacks,0x000000ff);
  227.     TextDrawSetOutline(blacks,1);
  228.     TextDrawSetProportional(blacks,1);
  229.     TextDrawSetShadow(blacks,1);
  230.  
  231.     SetTimer("Updater", 1000, 1);
  232.  
  233.     for(new playerid; playerid < MAX_PLAYERS; playerid ++)
  234.     {
  235.         CountText[playerid] = TextDrawCreate(192.000000, 416.000000, "0/25 seconds left to capture");
  236.         TextDrawBackgroundColor(CountText[playerid], 255);
  237.         TextDrawFont(CountText[playerid], 1);
  238.         TextDrawLetterSize(CountText[playerid], 0.460000, 1.900000);
  239.         TextDrawColor(CountText[playerid], -1);
  240.         TextDrawSetOutline(CountText[playerid], 1);
  241.         TextDrawSetProportional(CountText[playerid], 1);
  242.  
  243.         tScore[playerid] = TextDrawCreate(499.000000, 140.000000, "Score: 32");
  244.         TextDrawBackgroundColor(tScore[playerid], 255);
  245.         TextDrawFont(tScore[playerid], 1);
  246.         TextDrawLetterSize(tScore[playerid], 0.240000, 1.000000);
  247.         TextDrawColor(tScore[playerid], -65281);
  248.         TextDrawSetOutline(tScore[playerid], 0);
  249.         TextDrawSetProportional(tScore[playerid], 1);
  250.         TextDrawSetShadow(tScore[playerid], 1);
  251.         TextDrawSetSelectable(tScore[playerid], 0);
  252.     }
  253.  
  254.     tCP[SNAKE] = TEAM_NONE;
  255.     tCP[BAY] = TEAM_NONE;
  256.     tCP[BIG] = TEAM_NONE;
  257.     tCP[ARMY] = TEAM_NONE;
  258.     tCP[PETROL] = TEAM_NONE;
  259.     tCP[OIL] = TEAM_NONE;
  260.     tCP[DESERT] = TEAM_NONE;
  261.     tCP[QUARRY] = TEAM_NONE;
  262.     tCP[GUEST] = TEAM_NONE;
  263.     tCP[EAR] = TEAM_NONE;
  264.  
  265.     UnderAttack[SNAKE] = 0;
  266.     UnderAttack[BAY] = 0;
  267.     UnderAttack[BIG] = 0;
  268.     UnderAttack[ARMY] = 0;
  269.     UnderAttack[PETROL] = 0;
  270.     UnderAttack[OIL] = 0;
  271.     UnderAttack[DESERT] = 0;
  272.     UnderAttack[QUARRY] = 0;
  273.     UnderAttack[GUEST] = 0;
  274.     UnderAttack[EAR] = 0;
  275.  
  276.     //---------
  277.     //snakes farm
  278.     CP[SNAKE] = CreateDynamicCP(-36.5458, 2347.6426, 24.1406,3, -1,-1,-1,100.0);
  279.     Zone[SNAKE] = GangZoneCreate(-62.5000000000005,2318.359375,23.4375,2390.625);
  280.     //bayside sea shore
  281.     CP[BAY] = CreateDynamicCP(260.0900,2889.5242,11.1854,3, -1,-1,-1,100.0);
  282.     Zone[BAY] = GangZoneCreate(236.328125,2892.578125,292.96875,2943.359375);
  283.     //area 51
  284.     CP[BIG] = CreateDynamicCP(239.5721,1859.1677,14.0840,3, -1,-1,-1,100.0);
  285.     Zone[BIG] = GangZoneCreate(-46.875,1697.265625,423.828125,2115.234375);
  286.     //army hotel
  287.     CP[ARMY] = CreateDynamicCP(-551.6992,2593.0771,53.9348,3, -1,-1,-1,100.0);
  288.     Zone[ARMY] = GangZoneCreate(-617.1875,2531.25,-455.078125,2658.203125);
  289.     //army petrol bunk
  290.     CP[PETROL] = CreateDynamicCP(670.9215,1705.4658,7.1875,3, -1,-1,-1,100.0);
  291.     Zone[PETROL] = GangZoneCreate(609.375,1652.34375,714.84375,1767.578125);
  292.     //Oil Factory
  293.     CP[OIL] = CreateDynamicCP(221.0856,1422.6615,10.5859,3, -1,-1,-1,100.0);
  294.     Zone[OIL] = GangZoneCreate(95.703125,1339.84375,287.109375,1484.375);
  295.     //Oil Station
  296.     CP[DESERT] = CreateDynamicCP(558.9932,1221.8896,11.7188,3, -1,-1,-1,100.0);
  297.     Zone[DESERT] = GangZoneCreate(529.296875,1205.078125,636.71875,1267.578125);
  298.     //559.5272,1221.7778,11.7188
  299.     //Quarry
  300.     CP[QUARRY] = CreateDynamicCP(588.3246,875.7402,-42.4973,3, -1,-1,-1,100.0);
  301.     Zone[QUARRY] = GangZoneCreate(439.453125,748.046875,863.28125,992.1875);
  302.     //Desert Guest House
  303.     CP[GUEST] = CreateDynamicCP(-314.8433,1773.9176,43.6406,3, -1,-1,-1,100.0);
  304.     Zone[GUEST] = GangZoneCreate(-357.421875,1707.03125,-253.90625,1835.9375);
  305.     //Big Ear
  306.     CP[EAR] = CreateDynamicCP(-311.0136,1542.9733,75.5625,3, -1,-1,-1,100.0);
  307.     Zone[EAR] = GangZoneCreate(-437.5,1513.671875,-244.140625,1636.71875);
  308.     SetTimer("CountDown", 1000, 1);
  309. //--------------------------------->GangZones<------------------------------------------//
  310.     usa = GangZoneCreate(-362.0141, 2557.455, -105.1009, 2814.368);
  311.     germany = GangZoneCreate(-887.5186, 1354.634, -583.8938, 1646.58);
  312.  
  313. //------------------------------->Classes<-----------------------------------------------//
  314.  
  315.     AddPlayerClass(287,-246.4079,2622.3428,62.9486,269.4406,0,0,0,0,0,0); // usa spawn
  316.     AddPlayerClass(179,-748.3502,1588.8071,26.9609,137.3416,0,0,0,0,0,0); // german spawn
  317.  
  318. //------------------------------------>TextDraws<-----------------------------------------//
  319.  
  320.     Textdraw4 = TextDrawCreate(2.000000,434.000000,"***USA vs GERMANY***");
  321.     TextDrawAlignment(Textdraw4,1);
  322.     TextDrawBackgroundColor(Textdraw4,0x000000ff);
  323.     TextDrawFont(Textdraw4,1);
  324.     TextDrawLetterSize(Textdraw4,0.399999,1.300000);
  325.     TextDrawColor(Textdraw4,0x66BBEE);
  326.     TextDrawSetOutline(Textdraw4,1);
  327.     TextDrawSetProportional(Textdraw4,1);
  328.     TextDrawSetShadow(Textdraw4,1);
  329.     TextDrawShowForAll(Textdraw4);
  330.  
  331.  
  332. //---------------------------------------------------->CreateObject<------------------------------------------------------------------------------//
  333.     //USA BASE
  334.     CreateObject(3115, -161.70344543457, 2659.6105957031, 63.763652801514, 0.000000, 0.000000, 0.000000); //object (carrier_lift1_sfse) (1)
  335.     CreateObject(3934, -161.54772949219, 2659.5832519531, 64.076301574707, 0.000000, 0.000000, 89.325012207031); //object (helipad01) (1)
  336.     CreateObject(3279, -218.10334777832, 2686.6560058594, 61.660766601563, 0.000000, 0.000000, 0.000000); //object (a51_spottower) (1)
  337.     CreateObject(3279, -288.03460693359, 2605.8432617188, 61.660766601563, 0.000000, 0.000000, 356.0299987793); //object (a51_spottower) (2)
  338.     CreateObject(3279, -192.28852844238, 2605.4719238281, 61.660766601563, 0.000000, 0.000000, 3.9683837890625); //object (a51_spottower) (3)
  339.     CreateObject(3279, -309.59515380859, 2744.6889648438, 61.660766601563, 0.000000, 0.000000, 356.02844238281); //object (a51_spottower) (4)
  340.     CreateObject(3279, -159.98118591309, 2743.6232910156, 61.660766601563, 0.000000, 0.000000, 356.02844238281); //object (a51_spottower) (5)
  341.     CreateObject(3115, -218.13275146484, 2662.1687011719, 63.763652801514, 0.000000, 0.000000, 0.000000); //object (carrier_lift1_sfse) (2)
  342.     CreateObject(3934, -218.1735534668, 2661.626953125, 64.077682495117, 0.000000, 0.000000, 0.000000); //object (helipad01) (2)
  343.     CreateObject(3085, -220.32933044434, 2724.453125, 62.621589660645, 0.000000, 0.000000, 0.000000); //object (nf_list_1) (1)
  344.     CreateObject(3749, -139.63252258301, 2635.8393554688, 68.567726135254, 0.000000, 0.000000, 90); //object (clubgate01_lax) (1)
  345.     CreateObject(3749, -380.14517211914, 2690.8317871094, 68.567726135254, 0.000000, 358.01501464844, 208.01501464844); //object (clubgate01_lax) (2)
  346.  
  347.     //GERAMNY BASE
  348. //------------------------------------------------------>Vehicles<------------------------------------------//
  349.  
  350.     //USA BASE
  351.     AddStaticVehicle(470, -228.28308105469, 2609.6574707031, 62.813137054443, 0.000000, -1, -1); //0
  352.     AddStaticVehicle(578,-231.6275000,2634.5352000,63.1967000,0.0000000,-1,-1); //DFT-30
  353.     AddStaticVehicle(470, -233.87504577637, 2609.8413085938, 62.813137054443, 0.000000, -1, -1); //1
  354.     AddStaticVehicle(470, -240.23924255371, 2610.0502929688, 62.813137054443, 0.000000, -1, -1); //2
  355.     AddStaticVehicle(468, -213.17851257324, 2609.36328125, 62.463123321533, 0.000000, -1, -1); //3
  356.     AddStaticVehicle(468, -210.28489685059, 2609.2680664063, 62.463123321533, 0.000000, -1, -1); //4
  357.     AddStaticVehicle(468, -207.39134216309, 2609.1723632813, 62.463123321533, 0.000000, -1, -1); //5
  358.     AddStaticVehicle(468, -208.73417663574, 2609.4091796875, 62.463123321533, 0.000000, -1, -1); //6
  359.     AddStaticVehicle(468, -211.62623596191, 2609.5043945313, 62.463123321533, 0.000000, -1, -1); //7
  360.     AddStaticVehicle(432, -200.84219360352, 2596.1276855469, 62.802463531494, 0.000000, -1, -1); //8
  361.     AddStaticVehicle(432, -208.57057189941, 2596.5698242188, 62.802463531494, 0.000000, -1, -1); //9
  362.     AddStaticVehicle(433, -240.82540893555, 2597.4020996094, 63.273124694824, 0.000000, -1, -1); //10
  363.     AddStaticVehicle(433, -235.03952026367, 2597.2109375, 63.273124694824, 0.000000, -1, -1); //11
  364.     AddStaticVehicle(433, -228.86767578125, 2597.0078125, 63.273124694824, 0.000000, -1, -1); //12
  365.     AddStaticVehicle(432, -217.45196533203, 2596.7978515625, 62.802463531494, 0.000000, -1, -1); //13
  366.     AddStaticVehicle(470, -204.54116821289, 2609.4782714844, 62.813137054443, 0.000000, -1, -1); //14
  367.     AddStaticVehicle(470, -200.4891204834, 2609.4467773438, 62.813137054443, 0.000000, -1, -1); //15
  368.     AddStaticVehicle(470, -158.1381072998, 2685.2199707031, 63.178516387939, 178.65002441406, -1, -1); //16
  369.     AddStaticVehicle(425, -156.02909851074, 2656.490234375, 65.922508239746, 180, -1, -1); //17
  370.     AddStaticVehicle(425, -167.11849975586, 2656.3479003906, 65.922508239746, 180, -1, -1); //18
  371.     AddStaticVehicle(548, -217.85174560547, 2660.7194824219, 66.981689453125, 0.000000, -1, -1); //19
  372.     AddStaticVehicle(520, -303.6012878418, 2682.1376953125, 63.857971191406, 0.000000, -1, -1); //20
  373.     AddStaticVehicle(468, -169.14440917969, 2703.9077148438, 62.253448486328, 0.000000, -1, -1); //21
  374.     AddStaticVehicle(468, -169.30752563477, 2712.6396484375, 62.253448486328, 176.75506591797, -1, -1); //22
  375.     AddStaticVehicle(470, -169.37593078613, 2727.1442871094, 62.591770172119, 91.31005859375, -1, -1); //23
  376.     AddStaticVehicle(433, -216.90167236328, 2779.2653808594, 63.21142578125, 91.31005859375, -1, -1); //24
  377.     AddStaticVehicle(432, -202.03094482422, 2783.9685058594, 62.144927978516, 0.000000, -1, -1); //25
  378.     AddStaticVehicle(432, -188.67221069336, 2783.8757324219, 62.144927978516, 0.000000, -1, -1); //26
  379.     AddStaticVehicle(432, -195.1785736084, 2784.05078125, 62.144927978516, 0.000000, -1, -1); //27
  380.     AddStaticVehicle(520, -316.28744506836, 2681.953125, 63.857971191406, 0.000000, -1, -1); //28
  381.     AddStaticVehicle(433, -295.22485351563, 2687.2722167969, 63.234474182129, 0.000000, -1, -1); //29
  382.     AddStaticVehicle(470, -281.33306884766, 2688.6689453125, 62.779941558838, 0.000000, -1, -1); //30
  383.     AddStaticVehicle(470, -267.39437866211, 2783.7175292969, 62.797512054443, 0.000000, -1, -1); //31
  384.     AddStaticVehicle(470, 282.37728881836, 1948.908203125, 17.750637054443, 270, -1, -1); //32
  385.     AddStaticVehicle(470, 282.15444946289, 1953.3414306641, 17.750637054443, 270, -1, -1); //33
  386.     AddStaticVehicle(470, 281.95114135742, 1957.3885498047, 17.750637054443, 270, -1, -1); //34
  387.     AddStaticVehicle(470, 281.73736572266, 1961.6281738281, 17.750637054443, 270, -1, -1); //35
  388.     AddStaticVehicle(433, 282.16131591797, 1983.9725341797, 18.210624694824, 270, -1, -1); //36
  389.     AddStaticVehicle(433, 281.83221435547, 1990.5251464844, 18.210624694824, 270, -1, -1); //37
  390.     AddStaticVehicle(433, 281.53213500977, 1996.4996337891, 18.210624694824, 270, -1, -1); //38
  391.     AddStaticVehicle(432, 279.28225708008, 2017.2548828125, 17.739961624146, 270, -1, -1); //39
  392.     AddStaticVehicle(432, 279.21112060547, 2023.6234130859, 17.739961624146, 270, -1, -1); //40
  393.     AddStaticVehicle(432, 279.13507080078, 2030.1843261719, 17.739961624146, 270, -1, -1); //41
  394.     AddStaticVehicle(468, 293.01000976563, 2041.3334960938, 17.400625228882, 270, -1, -1); //42
  395.     AddStaticVehicle(468, 293.10296630859, 2043.2534179688, 17.400625228882, 270, -1, -1); //43
  396.     AddStaticVehicle(468, 292.95056152344, 2045.3890380859, 17.400625228882, 270, -1, -1); //44
  397.     AddStaticVehicle(468, 292.97286987305, 2047.5238037109, 17.400625228882, 270, -1, -1); //45
  398.     AddStaticVehicle(468, 293.14498901367, 2049.5307617188, 17.400625228882, 270, -1, -1); //46
  399.     AddStaticVehicle(468, 293.13473510742, 2039.5895996094, 17.400625228882, 270, -1, -1); //47
  400.     AddStaticVehicle(520, 248.1609954834, 2025.4908447266, 18.567474365234, 180, -1, -1); //48
  401.     AddStaticVehicle(520, 232.31455993652, 2024.9099121094, 18.567474365234, 180, -1, -1); //49
  402.     AddStaticVehicle(520, 218.01193237305, 2024.3414306641, 18.567474365234, 180, -1, -1); //50
  403.     AddStaticVehicle(425, 241.40653991699, 2002.1005859375, 18.491624832153, 0.000000, -1, -1); //51
  404.     AddStaticVehicle(425, 225.02996826172, 2002.1018066406, 18.491624832153, 0.000000, -1, -1); //52
  405.     AddStaticVehicle(548, 232.82919311523, 1986.8636474609, 26.048950195313, 0.000000, -1, -1); //53
  406.     AddStaticVehicle(548, 247.10720825195, 1986.9807128906, 26.048950195313, 0.000000, -1, -1); //54
  407.     AddStaticVehicle(548, 219.91345214844, 1987.5314941406, 26.048950195313, 0.000000, -1, -1); //55
  408.     AddStaticVehicle(433, 326.93884277344, 2051.2170410156, 18.210624694824, 90, -1, -1); //56
  409.     AddStaticVehicle(433, 326.77633666992, 2044.8520507813, 18.210624694824, 90, -1, -1); //57
  410.     AddStaticVehicle(433, 326.58471679688, 2037.330078125, 18.210624694824, 90, -1, -1); //58
  411.     AddStaticVehicle(432, 345.26824951172, 2055.6618652344, 18.006259918213, 0.000000, -1, -1); //59
  412.     AddStaticVehicle(432, 354.25405883789, 2059.8725585938, 18.006259918213, 0.000000, -1, -1); //60
  413.     AddStaticVehicle(432, 337.2392578125, 2058.7587890625, 18.006259918213, 0.000000, -1, -1); //61
  414.     AddStaticVehicle(470, 315.82730102539, 2063.5959472656, 17.750637054443, 180, -1, -1); //62
  415.     AddStaticVehicle(470, 309.955078125, 2063.86328125, 17.750637054443, 180, -1, -1); //63
  416.     AddStaticVehicle(470, 304.580078125, 2063.9052734375, 17.750637054443, 180, -1, -1); //64
  417.     AddStaticVehicle(470, 299.16033935547, 2063.5180664063, 17.750637054443, 180, -1, -1); //65
  418.     AddStaticVehicle(470, 320.95343017578, 2063.666015625, 17.750637054443, 180, -1, -1); //66
  419.     AddStaticVehicle(470, 293.74700927734, 2063.3327636719, 17.750637054443, 180, -1, -1); //67
  420.     AddStaticVehicle(568, 284.91848754883, 1936.7231445313, 17.61562538147, 0.000000, -1, -1); //68
  421.     AddStaticVehicle(568, 281.83056640625, 1936.751953125, 17.61562538147, 0.000000, -1, -1); //69
  422.     AddStaticVehicle(568, 278.35675048828, 1936.7849121094, 17.61562538147, 0.000000, -1, -1); //70
  423.     AddStaticVehicle(568, -148.38873291016, 2622.4609375, 63.416919708252, 0.000000, -1, -1); //71
  424.     AddStaticVehicle(568, -152.45854187012, 2622.5288085938, 63.416919708252, 0.000000, -1, -1); //72
  425.     AddStaticVehicle(568, -156.52787780762, 2622.5961914063, 63.416919708252, 0.000000, -1, -1); //73
  426.     AddStaticVehicle(468, -510.11172485352, 2585.8103027344, 53.174060821533, 0.000000, -1, -1); //74
  427.     AddStaticVehicle(468, -507.60360717773, 2585.8698730469, 53.174060821533, 0.000000, -1, -1); //75
  428.     AddStaticVehicle(424, -538.4912109375, 2583.4111328125, 53.261287689209, 0.000000, -1, -1); //76
  429.     AddStaticVehicle(424, -528.8681640625, 2583.2016601563, 53.261287689209, 0.000000, -1, -1); //77
  430.     AddStaticVehicle(424, -519.99609375, 2583.4145507813, 53.261287689209, 0.000000, -1, -1); //78
  431.     AddStaticVehicle(424, -514.01232910156, 2583.3654785156, 53.261287689209, 0.000000, -1, -1); //79
  432.     AddStaticVehicle(470, -538.40991210938, 2600.0681152344, 53.524074554443, 0.000000, -1, -1); //80
  433.     AddStaticVehicle(470, -538.52899169922, 2606.4858398438, 53.524074554443, 0.000000, -1, -1); //81
  434.     AddStaticVehicle(470, -538.43255615234, 2612.8779296875, 53.524074554443, 0.000000, -1, -1); //82
  435.     AddStaticVehicle(470, -538.30670166016, 2618.8857421875, 53.524074554443, 0.000000, -1, -1); //83
  436.     AddStaticVehicle(470, -526.5712890625, 2619.779296875, 53.524074554443, 0.000000, -1, -1); //84
  437.     AddStaticVehicle(470, -526.50384521484, 2613.7861328125, 53.524074554443, 0.000000, -1, -1); //85
  438.     AddStaticVehicle(470, -526.4208984375, 2607.6005859375, 53.524074554443, 0.000000, -1, -1); //86
  439.     AddStaticVehicle(470, -526.16107177734, 2601.6220703125, 53.524074554443, 0.000000, -1, -1); //87
  440.  
  441.     //GERMANY BASE
  442.     AddStaticVehicle(425,-673.2333000,1546.9912000,88.5096000,0.0000000,-1,-1); //Hunter
  443.     AddStaticVehicle(425,-692.7065000,1546.9478000,88.5096000,0.0000000,-1,-1); //Hunter
  444.     AddStaticVehicle(427,-817.9849000,1444.0083000,13.4993000,78.4407000,-1,-1); //Enforcer
  445.     AddStaticVehicle(427,-804.5104000,1445.2115000,13.4993000,74.7499000,-1,-1); //Enforcer
  446.     AddStaticVehicle(427,-789.7258000,1444.8094000,13.4993000,74.7499000,-1,-1); //Enforcer
  447.     AddStaticVehicle(432,-881.6671000,1513.2935000,25.7139000,84.7047000,-1,-1); //Rhino
  448.     AddStaticVehicle(432,-881.1671000,1521.2935000,25.7139000,84.7047000,-1,-1); //Rhino
  449.     AddStaticVehicle(432,-880.6671000,1529.2935000,25.7139000,84.7047000,-1,-1); //Rhino
  450.     AddStaticVehicle(447,-829.4656000,1650.1561000,0.8014000,0.0000000,-1,-1); //Seasparrow
  451.     AddStaticVehicle(447,-841.4656000,1650.1561000,0.8014000,0.0000000,-1,-1); //Seasparrow
  452.     AddStaticVehicle(468,-815.8135000,1557.8822000,26.7097000,270.0000000,-1,-1); //Sanchez
  453.     AddStaticVehicle(468,-815.8135000,1559.8822000,26.7097000,270.0000000,-1,-1); //Sanchez
  454.     AddStaticVehicle(468,-815.8135000,1561.8822000,26.7097000,270.0000000,-1,-1); //Sanchez
  455.     AddStaticVehicle(468,-779.4361000,1497.2994000,23.4590000,90.0000000,-1,-1); //Sanchez
  456.     AddStaticVehicle(468,-783.0488000,1497.3295000,23.1478000,90.0000000,-1,-1); //Sanchez
  457.     AddStaticVehicle(468,-787.2051000,1497.3896000,22.6590000,90.0000000,-1,-1); //Sanchez
  458.     AddStaticVehicle(469,-823.1869000,1549.9633000,30.4767000,270.0000000,-1,-1); //Sparrow
  459.     AddStaticVehicle(469,-823.1869000,1561.9633000,30.4767000,270.0000000,-1,-1); //Sparrow
  460.     AddStaticVehicle(470,-877.4359000,1555.1265000,25.4578000,90.0000000,-1,-1); //Patriot
  461.     AddStaticVehicle(470,-877.4251000,1550.1096000,25.4578000,90.0000000,-1,-1); //Patriot
  462.     AddStaticVehicle(470,-877.4251000,1545.1096000,25.4578000,90.0000000,-1,-1); //Patriot
  463.     AddStaticVehicle(470,-877.4251000,1540.1096000,25.4578000,90.0000000,-1,-1); //Patriot
  464.     AddStaticVehicle(471,-866.4872000,1540.9298000,22.0670000,270.0000000,-1,-1); //Quad
  465.     AddStaticVehicle(471,-866.4872000,1543.4298000,22.3670000,270.0000000,-1,-1); //Quad
  466.     AddStaticVehicle(471,-866.4872000,1545.9298000,22.4670000,270.0000000,-1,-1); //Quad
  467.     AddStaticVehicle(471,-866.4872000,1548.4298000,22.7720000,270.0000000,-1,-1); //Quad
  468.     AddStaticVehicle(528,-837.0952000,1508.2954000,19.9057000,82.7585000,-1,-1); //FBI Truck
  469.     AddStaticVehicle(528,-836.6769000,1512.6506000,19.9057000,82.7585000,-1,-1); //FBI Truck
  470.     AddStaticVehicle(528,-836.4396000,1517.3896000,19.9057000,82.7585000,-1,-1); //FBI Truck
  471.     AddStaticVehicle(487,-662.4413000,1446.8507000,13.6960000,0.0000000,-1,-1); //Maverick
  472.     AddStaticVehicle(487,-650.5704000,1447.0468000,13.6572000,0.0000000,-1,-1); //Maverick
  473.     AddStaticVehicle(487,-637.6727000,1447.4362000,13.7143000,0.0000000,-1,-1); //Maverick
  474.     AddStaticVehicle(520,-708.9006000,1439.6840000,19.1125000,0.0000000,-1,-1); //Hydra
  475.     AddStaticVehicle(520,-720.8840000,1440.3680000,19.1125000,0.0000000,-1,-1); //Hydra
  476.     AddStaticVehicle(500,-866.0134000,1569.6102000,25.0498000,270.0000000,-1,-1); //Mesa
  477.     AddStaticVehicle(500,-866.2427000,1566.5378000,24.7438000,270.0000000,-1,-1); //Mesa
  478.     AddStaticVehicle(500,-866.4086000,1563.3416000,24.4438000,270.0000000,-1,-1); //Mesa
  479.     AddStaticVehicle(500,-866.3918000,1560.3744000,24.3417000,270.0000000,-1,-1); //Mesa
  480.     AddStaticVehicle(490,-769.2357000,1634.3685000,27.1335000,180.0000000,-1,-1); //FBI Rancher
  481.     AddStaticVehicle(490,-764.2357000,1634.3685000,27.1335000,180.0000000,-1,-1); //FBI Rancher
  482.     AddStaticVehicle(490,-759.2357000,1634.3685000,27.1335000,180.0000000,-1,-1); //FBI Rancher
  483.     AddStaticVehicle(490,-753.7357000,1634.3685000,27.1335000,180.0000000,-1,-1); //FBI Rancher
  484.     AddStaticVehicle(490,-747.2357000,1634.3685000,27.1335000,180.0000000,-1,-1); //FBI Rancher
  485.  
  486.  
  487.  
  488.     return 1;
  489. }
  490.  
  491. //login
  492. public OnGameModeExit()
  493. {
  494.     TextDrawHideForAll(Textdraw0);
  495.     TextDrawDestroy(Textdraw0);
  496.     TextDrawHideForAll(Textdraw1);
  497.     TextDrawDestroy(Textdraw1);
  498.     TextDrawHideForAll(Textdraw2);
  499.     TextDrawDestroy(Textdraw2);
  500.     return 1;
  501. }
  502. //stop login
  503.  
  504. public OnPlayerRequestClass(playerid, classid)
  505. {
  506.     IsSpawned[playerid] = 0;
  507.     TextDrawShowForPlayer(playerid, blacks);
  508.     TogglePlayerSpectating(playerid, 1);
  509.     ShowPlayerDialog(playerid, DIALOG_TEAMS, DIALOG_STYLE_LIST, "Teams:", ""#EMB_USA"United States of America\n"#EMB_GERMANY"Germany", "Select", "");
  510.     return 1;
  511. }
  512. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  513. {
  514.     switch( dialogid )
  515.     {
  516.         case DIALOG_TEAMS:
  517.         {
  518.             if(!response) return  ShowPlayerDialog(playerid, DIALOG_TEAMS, DIALOG_STYLE_LIST, "Teams:", ""#EMB_USA"United States of America\n"#EMB_GERMANY"Germany", "Select", "");
  519.             if(response)
  520.             {
  521.                 switch(listitem)
  522.                 {
  523.                     case 0:
  524.                     {
  525.                         gTeam[playerid] = TEAM_USA;
  526.                         SetPlayerTeam(playerid, 0);
  527.                         SendClientMessage(playerid, COLOR_USA, "You have chosen United States as your Team.");
  528.                         ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  529.                     }
  530.                     case 1:
  531.                     {
  532.                         gTeam[playerid] = TEAM_GERMANY;
  533.                         SetPlayerTeam(playerid, 1);
  534.                         SendClientMessage(playerid, COLOR_GERMANY, "You have chosen Germany as your Team.");
  535.                         ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  536.                     }
  537.                 }
  538.             }
  539.         }
  540.         case DIALOG_CLASS:
  541.         {
  542.             if(!response) return ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  543.             if(response)
  544.             {
  545.                 if(listitem == 0)
  546.                 {
  547.                     Class[playerid] = CLASS_SOLDIER;
  548.                     ShowPlayerDialog(playerid, DIALOG_SO, DIALOG_STYLE_MSGBOX, "Soldier", "Advantages: No advantages\nSpecial commands: No special commands\nWeapons: Deagle\nMP5\nSPAS12", "Yes", "Back");
  549.                 }
  550.                 if(listitem == 1)
  551.                 {
  552.                     Class[playerid] = CLASS_SNIPER;
  553.                     ShowPlayerDialog(playerid, DIALOG_SN, DIALOG_STYLE_MSGBOX, "Sniper", "Advantages: Invisible on Map\nSpecial commands: No special commands\nWeapons: Deagle\nMP5\nSniper", "Yes", "Back");
  554.                 }
  555.                 if(listitem == 2)
  556.                 {
  557.                     if(GetPlayerScore(playerid) >= 50)
  558.                     {
  559.                         Class[playerid] = CLASS_MEDIC;
  560.                         ShowPlayerDialog(playerid, DIALOG_ME, DIALOG_STYLE_MSGBOX, "Medic", "Advantages: Invisible on Map\nSpecial commands: /heal, /armour, /sell\nWeapons: Silenced 9mm\nSawn Off", "Yes", "Back");
  561.                     }
  562.                     else
  563.                     {
  564.                         SendClientMessage(playerid, COLOR_RED, "You need to be a Private(50 score) to join this class. Choose another class");
  565.                         ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  566.                     }
  567.  
  568.                 }
  569.                 if(listitem == 3)
  570.                 {
  571.                     if(GetPlayerScore(playerid) >= 100)
  572.                     {
  573.                         Class[playerid] = CLASS_SUICIDE;
  574.                         ShowPlayerDialog(playerid, DIALOG_SU, DIALOG_STYLE_MSGBOX, "Suicider", "Advantages: Able to explode players using /explodecar\nSpecial commands: /explodecar\nWeapons: MP5\nAK47", "Yes", "Back");
  575.                     }
  576.                     else
  577.                     {
  578.                         SendClientMessage(playerid, COLOR_RED, "You need to be a Corporal(1600 score) to join this class. Choose another class");
  579.                         ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  580.                     }
  581.  
  582.                 }
  583.                 if(listitem == 4)
  584.                 {
  585.                     if(GetPlayerScore(playerid) >= 500)
  586.                     {
  587.                         Class[playerid] = CLASS_ENGINEER;
  588.                         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");
  589.                     }
  590.                     else
  591.                     {
  592.                         SendClientMessage(playerid, COLOR_RED, "You need to be a Lieutenant(500 score) to join this class. Choose another class");
  593.                         ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  594.                     }
  595.                 }
  596.                 if(listitem == 5)
  597.                 {
  598.                     if(GetPlayerScore(playerid) >= 600)
  599.                     {
  600.                         Class[playerid] = CLASS_PILOT;
  601.                         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");
  602.                     }
  603.                     else
  604.                     {
  605.                         SendClientMessage(playerid, COLOR_RED, "You need to be a Captain(600 score) to join this class. Choose another class");
  606.                         ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  607.                     }
  608.                 }
  609.                 if(listitem == 6)
  610.                 {
  611.                     if(GetPlayerScore(playerid) >= 9000)
  612.                     {
  613.                         Class[playerid] = CLASS_DONOR;
  614.                         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");
  615.                     }
  616.                     else
  617.                     {
  618.                         SendClientMessage(playerid, COLOR_RED, "You need to be a 9000 score to enter this class.");
  619.                         ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  620.                     }
  621.                 }
  622.             }
  623.         }
  624.         case DIALOG_SO:
  625.         {
  626.             if(response)
  627.             {
  628.                 SendClientMessage(playerid, -1, "You have selected Soldier as your current playing class.");
  629.                 SpawnPlayer(playerid);
  630.             }
  631.             else
  632.             {
  633.                 ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  634.             }
  635.         }
  636.         case DIALOG_PI:
  637.         {
  638.             if(response)
  639.             {
  640.                 SendClientMessage(playerid, -1, "You have selected Pilot as your current playing class.");
  641.                 SpawnPlayer(playerid);
  642.             }
  643.             else
  644.             {
  645.                 ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  646.             }
  647.         }
  648.         case DIALOG_ME:
  649.         {
  650.             if(response)
  651.             {
  652.                 SendClientMessage(playerid, -1, "You have selected Medic as your current playing class.");
  653.                 SpawnPlayer(playerid);
  654.             }
  655.             else
  656.             {
  657.                 ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  658.             }
  659.         }
  660.         case DIALOG_SN:
  661.         {
  662.             if(response)
  663.             {
  664.                 SendClientMessage(playerid, -1, "You have selected Sniper as your current playing class.");
  665.                 SpawnPlayer(playerid);
  666.             }
  667.             else
  668.             {
  669.                 ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  670.             }
  671.         }
  672.         case DIALOG_EN:
  673.         {
  674.             if(response)
  675.             {
  676.                 SendClientMessage(playerid, -1, "You have selected Engineer as your current playing class.");
  677.                 SpawnPlayer(playerid);
  678.             }
  679.             else
  680.             {
  681.                 ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  682.             }
  683.         }
  684.         case DIALOG_HI:
  685.         {
  686.             if(response)
  687.             {
  688.                 SendClientMessage(playerid, -1, "You have selected Donor as your current playing class.");
  689.                 SpawnPlayer(playerid);
  690.             }
  691.             else
  692.             {
  693.                 ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  694.             }
  695.         }
  696.         case DIALOG_SU:
  697.         {
  698.             if(response)
  699.             {
  700.                 SendClientMessage(playerid, -1, "You have selected Suicider as your current playing class.");
  701.                 SpawnPlayer(playerid);
  702.             }
  703.             else
  704.             {
  705.                 ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Classes", "Soldier\nSniper\nMedic\nSuicide\nEngineer\nPilot\nDonor", "Select", "");
  706.             }
  707.         }
  708.         case DIALOG_REGISTER:
  709.         {
  710.             if (!response) return Kick(playerid);
  711.             if(response)
  712.             {
  713.                 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");
  714.                 new INI:File = INI_Open(UserPath(playerid));
  715.                 INI_SetTag(File,"data");
  716.                 INI_WriteInt(File,"Password",udb_hash(inputtext));
  717.                 INI_WriteInt(File,"Cash",0);
  718.                 INI_WriteInt(File,"Admin",0);
  719.                 INI_WriteInt(File,"Kills",0);
  720.                 INI_WriteInt(File,"Deaths",0);
  721.                 INI_Close(File);
  722.  
  723.                 SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
  724.                 SpawnPlayer(playerid);
  725.                 ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_RED"Success!",""COL_RED"Congratulations! You are registered!!","Ok","");
  726.             }
  727.         }
  728.  
  729.         case DIALOG_LOGIN:
  730.         {
  731.             if ( !response ) return Kick ( playerid );
  732.             if( response )
  733.             {
  734.                 if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  735.                 {
  736.                     INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  737.                     GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
  738.                     ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_RED"You have successfully logged in!","Ok","");
  739.                 }
  740.                 else
  741.                 {
  742.                     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");
  743.                 }
  744.                 return 1;
  745.             }
  746.         }
  747.      }
  748.     return 1;
  749. }
  750. stock ActiveEar(playerid)
  751. {
  752.     if(PlayerInfo[playerid][OnDuty] == 0)
  753.     {
  754.         if(UnderAttack[EAR] == 0)
  755.         {
  756.             if(!IsPlayerInAnyVehicle(playerid))
  757.             {
  758.                 UnderAttack[EAR] = 1;
  759.                 timer[playerid][EAR] = SetTimerEx("BigEar", 25000, false,"i",playerid);
  760.                 Captured[playerid][EAR] = 0;
  761.                 SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
  762.                 PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
  763.                 FlashZone(playerid, Zone[EAR]);
  764.                 //------Message-----
  765.                 if(tCP[EAR] == TEAM_GERMANY)
  766.                 {
  767.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
  768.                   SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Big Ear is under attack!");
  769.                 }
  770.                 else if(tCP[EAR] == TEAM_USA)
  771.                 {
  772.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
  773.                   SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Big Ear is under attack!");
  774.                 }
  775.                 else if(tCP[EAR] == TEAM_NONE)
  776.                 {
  777.                   SendClientMessage(playerid, -1,"This flag is not controlled by any team");
  778.                 }
  779.                 //---------loop-------//
  780.                 for(new i = 0; i < MAX_PLAYERS; i ++)
  781.                 {
  782.                    IsPlayerCapturing[i][EAR] = 1;
  783.                 }
  784.             }
  785.             else return CaptureZoneMessage(playerid, 1);
  786.         }
  787.         else return CaptureZoneMessage(playerid, 2);
  788.     }
  789.     else return CaptureZoneMessage(playerid, 3);
  790.     return 1;
  791. }
  792. stock FlashZone(playerid, zone)
  793. {
  794.     if(gTeam[playerid] == TEAM_GERMANY)
  795.     {
  796.        GangZoneFlashForAll(zone, COLOR_GERMANY);
  797.     }
  798.     else if(gTeam[playerid] == TEAM_USA)
  799.     {
  800.        GangZoneFlashForAll(zone, COLOR_USA);
  801.     }
  802.     return 1;
  803. }
  804. stock SendTeamMessage(teamid, color, text[])
  805. {
  806.   for(new x=0; x < MAX_PLAYERS; x++)
  807.   {
  808.     if(IsPlayerConnected(x))
  809.     {
  810.       if(gTeam[x] == teamid)
  811.       {
  812.         SendClientMessage(x, color, text);
  813.       }
  814.     }
  815.   }
  816.   return 1;
  817. }
  818. stock EarCaptured(playerid)
  819. {
  820.     Captured[playerid][EAR] = 1;
  821.     UnderAttack[EAR] = 0;
  822.     KillTimer(timer[playerid][EAR]);
  823.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  824.     CountVar[playerid][EAR] = 25;
  825.     GivePlayerScore(playerid, 5);
  826.     GivePlayerMoney(playerid, 5000);
  827.     SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Big Ear\" you received +5 scores and +$5000 cash!");
  828.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
  829.     //==========================================================================
  830.     for(new i = 0; i < MAX_PLAYERS; i++)
  831.     {
  832.        IsPlayerCapturing[i][EAR] = 0;
  833.        if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
  834.        {
  835.            SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Big Ear"#COL_WHITE"! You received +1 score for it!");
  836.            GivePlayerScore(i, 1);
  837.        }
  838.     }
  839.     //==========================================================================
  840.     tCP[EAR] = gTeam[playerid];
  841.     GangZoneStopFlashForAll(Zone[EAR]);
  842.     //==========================================================================
  843.     SetZoneColor(playerid, Zone[EAR]);
  844.     //==========================================================================
  845.     new str[128];
  846.     format(str, sizeof(str),"%s has captured \"Big Ear\" for team %s", Name(playerid), GetTeam(playerid));
  847.     SendClientMessageToAll(-1, str);
  848.     return 1;
  849. }
  850. stock GetTeam(playerid)
  851. {
  852.     new str[15];
  853.     if(gTeam[playerid] == TEAM_GERMANY) str = "Germany";
  854.     else if(gTeam[playerid] == TEAM_USA) str = "USA";
  855.     return str;
  856. }
  857. stock SetZoneColor(playerid, zone)
  858. {
  859.     if(gTeam[playerid] == TEAM_GERMANY)
  860.     {
  861.        GangZoneShowForAll(zone, COLOR_GERMANY);
  862.     }
  863.     else if(gTeam[playerid] == TEAM_USA)
  864.     {
  865.        GangZoneShowForAll(zone, COLOR_USA);
  866.     }
  867.     return 1;
  868. }
  869.  
  870. stock LeavingEar(playerid)
  871. {
  872.     Captured[playerid][EAR] = 1;
  873.     UnderAttack[EAR] = 0;
  874.     KillTimer(timer[playerid][EAR]);
  875.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  876.     CountVar[playerid][EAR] = 25;
  877.     GangZoneStopFlashForAll(Zone[EAR]);
  878.     for(new i = 0; i < MAX_PLAYERS; i++)
  879.     {
  880.        IsPlayerCapturing[i][EAR] = 0;
  881.     }
  882.     SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
  883.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
  884.     return 1;
  885. }
  886. forward BigEar(playerid);
  887. public BigEar(playerid)
  888. {
  889.     EarCaptured(playerid);
  890.     return 1;
  891. }
  892. //==============================================================================
  893. //============================[ OnPlayerEnter and OnPlayerLeave Dynamic CP]=====
  894. //==============================================================================
  895. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  896. {
  897.     if(checkpointid == CP[SNAKE])
  898.     {
  899.         if(Spectating[playerid] == 0) {
  900.             if(UnderAttack[SNAKE] == 0) {
  901.                 if(PlayerInfo[playerid][OnDuty] == 0) {
  902.                     if(tCP[SNAKE] != gTeam[playerid]) {
  903.                         CountVar[playerid][SNAKE] = 25;
  904.                         ActiveSnake(playerid);
  905.                     } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
  906.                 } else return CaptureZoneMessage(playerid, 3);
  907.             } else return CaptureZoneMessage(playerid, 2);
  908.         } else return 0;
  909.     }
  910.     else if(checkpointid == CP[BAY])
  911.     {
  912.         if(Spectating[playerid] == 0) {
  913.             if(UnderAttack[BAY] == 0) {
  914.                 if(PlayerInfo[playerid][OnDuty] == 0) {
  915.                     if(tCP[BAY] != gTeam[playerid]) {
  916.                         CountVar[playerid][BAY] = 25;
  917.                         ActiveBay(playerid);
  918.                     } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
  919.                 } else return CaptureZoneMessage(playerid, 3);
  920.             } else return CaptureZoneMessage(playerid, 2);
  921.         } else return 0;
  922.     }
  923.     else if(checkpointid == CP[BIG])
  924.     {
  925.         if(Spectating[playerid] == 0) {
  926.             if(UnderAttack[BIG] == 0) {
  927.                 if(PlayerInfo[playerid][OnDuty] == 0) {
  928.                     if(tCP[BIG] != gTeam[playerid]) {
  929.                         CountVar[playerid][BIG] = 25;
  930.                         ActiveBig(playerid);
  931.                     } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
  932.                 } else return CaptureZoneMessage(playerid, 3);
  933.             } else return CaptureZoneMessage(playerid, 2);
  934.         } else return 0;
  935.     }
  936.     else if(checkpointid == CP[ARMY])
  937.     {
  938.         if(Spectating[playerid] == 0) {
  939.             if(UnderAttack[ARMY] == 0) {
  940.                 if(PlayerInfo[playerid][OnDuty] == 0) {
  941.                     if(tCP[ARMY] != gTeam[playerid]) {
  942.                         CountVar[playerid][ARMY] = 25;
  943.                         ActiveArmy(playerid);
  944.                     } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
  945.                 } else return CaptureZoneMessage(playerid, 3);
  946.             } else return CaptureZoneMessage(playerid, 2);
  947.         } else return 0;
  948.     }
  949.     else if(checkpointid == CP[PETROL])
  950.     {
  951.         if(Spectating[playerid] == 0) {
  952.             if(UnderAttack[PETROL] == 0) {
  953.                 if(PlayerInfo[playerid][OnDuty] == 0) {
  954.                     if(tCP[PETROL] != gTeam[playerid]) {
  955.                         CountVar[playerid][PETROL] = 25;
  956.                         ActivePetrol(playerid);
  957.                     } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
  958.                 } else return CaptureZoneMessage(playerid, 3);
  959.             } else return CaptureZoneMessage(playerid, 2);
  960.         } else return 0;
  961.     }
  962.     else if(checkpointid == CP[OIL])
  963.     {
  964.         if(Spectating[playerid] == 0) {
  965.             if(UnderAttack[OIL] == 0) {
  966.                 if(PlayerInfo[playerid][OnDuty] == 0) {
  967.                     if(tCP[OIL] != gTeam[playerid]) {
  968.                         CountVar[playerid][OIL] = 25;
  969.                         ActiveOil(playerid);
  970.                     } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
  971.                 } else return CaptureZoneMessage(playerid, 3);
  972.             } else return CaptureZoneMessage(playerid, 2);
  973.         } else return 0;
  974.     }
  975.     else if(checkpointid == CP[DESERT])
  976.     {
  977.         if(Spectating[playerid] == 0) {
  978.             if(UnderAttack[DESERT] == 0) {
  979.                 if(PlayerInfo[playerid][OnDuty] == 0) {
  980.                     if(tCP[DESERT] != gTeam[playerid]) {
  981.                         CountVar[playerid][DESERT] = 25;
  982.                         ActiveDesert(playerid);
  983.                     } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
  984.                 } else return CaptureZoneMessage(playerid, 3);
  985.             } else return CaptureZoneMessage(playerid, 2);
  986.         } else return 0;
  987.     }
  988.     else if(checkpointid == CP[QUARRY])
  989.     {
  990.         if(Spectating[playerid] == 0) {
  991.             if(UnderAttack[QUARRY] == 0) {
  992.                 if(PlayerInfo[playerid][OnDuty] == 0) {
  993.                     if(tCP[QUARRY] != gTeam[playerid]) {
  994.                         CountVar[playerid][QUARRY] = 25;
  995.                         ActiveQuarry(playerid);
  996.                     } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
  997.                 } else return CaptureZoneMessage(playerid, 3);
  998.             } else return CaptureZoneMessage(playerid, 2);
  999.         } else return 0;
  1000.     }
  1001.     else if(checkpointid == CP[GUEST])
  1002.     {
  1003.         if(Spectating[playerid] == 0) {
  1004.             if(UnderAttack[GUEST] == 0) {
  1005.                 if(PlayerInfo[playerid][OnDuty] == 0) {
  1006.                     if(tCP[GUEST] != gTeam[playerid]) {
  1007.                         CountVar[playerid][GUEST] = 25;
  1008.                         ActiveGuest(playerid);
  1009.                     } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
  1010.                 } else return CaptureZoneMessage(playerid, 3);
  1011.             } else return CaptureZoneMessage(playerid, 2);
  1012.         } else return 0;
  1013.     }
  1014.     else if(checkpointid == CP[EAR])
  1015.     {
  1016.         if(Spectating[playerid] == 0) {
  1017.             if(UnderAttack[EAR] == 0) {
  1018.                 if(PlayerInfo[playerid][OnDuty] == 0) {
  1019.                     if(tCP[EAR] != gTeam[playerid]) {
  1020.                         CountVar[playerid][EAR] = 25;
  1021.                         ActiveEar(playerid);
  1022.                     } else return SendClientMessage(playerid, red,"*This zone is already captured by your team!");
  1023.                 } else return CaptureZoneMessage(playerid, 3);
  1024.             } else return CaptureZoneMessage(playerid, 2);
  1025.         } else return 0;
  1026.     }
  1027.     return 1;
  1028. }
  1029. public OnPlayerLeaveDynamicCP(playerid, checkpointid)
  1030. {
  1031.     if(checkpointid == CP[SNAKE] && Captured[playerid][SNAKE] == 0 && IsPlayerCapturing[playerid][SNAKE] == 1 && !IsPlayerInDynamicCP(playerid, CP[SNAKE]))
  1032.     {
  1033.         LeavingSnake(playerid);
  1034.     }
  1035.     if(checkpointid == CP[BAY] && Captured[playerid][BAY] == 0 && IsPlayerCapturing[playerid][BAY] == 1 && !IsPlayerInDynamicCP(playerid, CP[BAY]))
  1036.     {
  1037.         LeavingBay(playerid);
  1038.     }
  1039.     if(checkpointid == CP[BIG] && Captured[playerid][BIG] == 0 && IsPlayerCapturing[playerid][BIG] == 1 && !IsPlayerInDynamicCP(playerid, CP[BIG]))
  1040.     {
  1041.         LeavingBig(playerid);
  1042.     }
  1043.     if(checkpointid == CP[ARMY] && Captured[playerid][ARMY] == 0 && IsPlayerCapturing[playerid][ARMY] == 1 && !IsPlayerInDynamicCP(playerid, CP[ARMY]))
  1044.     {
  1045.         LeavingArmy(playerid);
  1046.     }
  1047.     if(checkpointid == CP[PETROL] && Captured[playerid][PETROL] == 0 && IsPlayerCapturing[playerid][PETROL] == 1 && !IsPlayerInDynamicCP(playerid, CP[PETROL]))
  1048.     {
  1049.         LeavingPetrol(playerid);
  1050.     }
  1051.     if(checkpointid == CP[OIL] && Captured[playerid][OIL] == 0 && IsPlayerCapturing[playerid][OIL] == 1 && !IsPlayerInDynamicCP(playerid, CP[OIL]))
  1052.     {
  1053.         LeavingOil(playerid);
  1054.     }
  1055.     if(checkpointid == CP[DESERT] && Captured[playerid][DESERT] == 0 && IsPlayerCapturing[playerid][DESERT] == 1 && !IsPlayerInDynamicCP(playerid, CP[DESERT]))
  1056.     {
  1057.         LeavingDesert(playerid);
  1058.     }
  1059.     if(checkpointid == CP[QUARRY] && Captured[playerid][QUARRY] == 0 && IsPlayerCapturing[playerid][QUARRY] == 1 && !IsPlayerInDynamicCP(playerid, CP[QUARRY]))
  1060.     {
  1061.         LeavingQuarry(playerid);
  1062.     }
  1063.     if(checkpointid == CP[GUEST] && Captured[playerid][GUEST] == 0 && IsPlayerCapturing[playerid][GUEST] == 1 && !IsPlayerInDynamicCP(playerid, CP[GUEST]))
  1064.     {
  1065.         LeavingGuest(playerid);
  1066.     }
  1067.     if(checkpointid == CP[EAR] && Captured[playerid][EAR] == 0 && IsPlayerCapturing[playerid][EAR] == 1 && !IsPlayerInDynamicCP(playerid, CP[EAR]))
  1068.     {
  1069.         LeavingEar(playerid);
  1070.     }
  1071.     return 1;
  1072. }
  1073.  
  1074. public OnPlayerConnect(playerid)
  1075. {
  1076.     //login
  1077.     TextDrawShowForPlayer(playerid, Textdraw0);
  1078.     TextDrawShowForPlayer(playerid, Textdraw1);
  1079.     TextDrawShowForPlayer(playerid, Textdraw2);
  1080.     SendClientMessage(playerid,COLOR_MATI,"This server has scripted by Tuntun ");
  1081.     if(fexist(UserPath(playerid)))
  1082.     {
  1083.         INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  1084.         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
  1085.     }
  1086.     else
  1087.     {
  1088.         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");
  1089.     }
  1090.     return 1;
  1091. }
  1092. //stop
  1093.  
  1094.     IsSpawned[playerid] = 0;
  1095.     TextDrawShowForPlayer(playerid, blacks);
  1096.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1097.     new st[100], pName[MAX_PLAYER_NAME];
  1098.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  1099.     format(string,sizeof string,"%s Has Just Joined The Server",pName);
  1100.     SendClientMessageToAll(0xCC0000, st);
  1101.  
  1102.     // Capture Zones
  1103.     if(tCP[SNAKE] == TEAM_NONE) GangZoneShowForAll(Zone[SNAKE], -66);
  1104.     else if(tCP[SNAKE] == TEAM_GERMANY) GangZoneShowForAll(Zone[SNAKE], COLOR_GERMANY);
  1105.     else if(tCP[SNAKE] == TEAM_USA) GangZoneShowForAll(Zone[SNAKE], COLOR_USA);
  1106.  
  1107.     //------
  1108.     if(tCP[BAY] == TEAM_NONE) GangZoneShowForAll(Zone[BAY], -66);
  1109.     else if(tCP[BAY] == TEAM_GERMANY) GangZoneShowForAll(Zone[BAY], COLOR_GERMANY);
  1110.     else if(tCP[BAY] == TEAM_USA) GangZoneShowForAll(Zone[BAY], COLOR_USA);
  1111.  
  1112.     //------
  1113.     if(tCP[BIG] == TEAM_NONE) GangZoneShowForAll(Zone[BIG], -66);
  1114.     else if(tCP[BIG] == TEAM_GERMANY) GangZoneShowForAll(Zone[BIG], COLOR_GERMANY);
  1115.     else if(tCP[BIG] == TEAM_USA) GangZoneShowForAll(Zone[BIG], COLOR_USA);
  1116.     //------
  1117.     if(tCP[ARMY] == TEAM_NONE) GangZoneShowForAll(Zone[ARMY], -66);
  1118.     else if(tCP[ARMY] == TEAM_GERMANY) GangZoneShowForAll(Zone[ARMY], COLOR_GERMANY);
  1119.     else if(tCP[ARMY] == TEAM_USA) GangZoneShowForAll(Zone[ARMY], COLOR_USA);
  1120.  
  1121.     //------
  1122.     if(tCP[PETROL] == TEAM_NONE) GangZoneShowForAll(Zone[PETROL], -66);
  1123.     else if(tCP[PETROL] == TEAM_GERMANY) GangZoneShowForAll(Zone[PETROL], COLOR_GERMANY);
  1124.     else if(tCP[PETROL] == TEAM_USA) GangZoneShowForAll(Zone[PETROL], COLOR_USA);
  1125.  
  1126.     //------
  1127.     if(tCP[OIL] == TEAM_NONE) GangZoneShowForAll(Zone[OIL], -66);
  1128.     else if(tCP[OIL] == TEAM_GERMANY) GangZoneShowForAll(Zone[OIL], COLOR_GERMANY);
  1129.     else if(tCP[OIL] == TEAM_USA) GangZoneShowForAll(Zone[OIL], COLOR_USA);
  1130.  
  1131.     //------
  1132.     if(tCP[DESERT] == TEAM_NONE) GangZoneShowForAll(Zone[DESERT], -66);
  1133.     else if(tCP[DESERT] == TEAM_GERMANY) GangZoneShowForAll(Zone[DESERT], COLOR_GERMANY);
  1134.     else if(tCP[DESERT] == TEAM_USA) GangZoneShowForAll(Zone[DESERT], COLOR_USA);
  1135.     //------
  1136.     if(tCP[QUARRY] == TEAM_NONE) GangZoneShowForAll(Zone[QUARRY], -66);
  1137.     else if(tCP[QUARRY] == TEAM_GERMANY) GangZoneShowForAll(Zone[QUARRY], COLOR_GERMANY);
  1138.     else if(tCP[QUARRY] == TEAM_USA) GangZoneShowForAll(Zone[QUARRY], COLOR_USA);
  1139.     //------
  1140.     if(tCP[GUEST] == TEAM_NONE) GangZoneShowForAll(Zone[GUEST], -66);
  1141.     else if(tCP[GUEST] == TEAM_GERMANY) GangZoneShowForAll(Zone[GUEST], COLOR_GERMANY);
  1142.     else if(tCP[GUEST] == TEAM_USA) GangZoneShowForAll(Zone[GUEST], COLOR_USA);
  1143.  
  1144.     //------
  1145.     if(tCP[EAR] == TEAM_NONE) GangZoneShowForAll(Zone[EAR], -66);
  1146.     else if(tCP[EAR] == TEAM_GERMANY) GangZoneShowForAll(Zone[EAR], COLOR_GERMANY);
  1147.     else if(tCP[EAR] == TEAM_USA) GangZoneShowForAll(Zone[EAR], COLOR_USA);
  1148.  
  1149.  
  1150.     //-------------------------------------------------------------------------------------
  1151.     //---------------------------------------------------------------------------------------------
  1152.     SetPlayerMapIcon(playerid, 5, -36.5458, 2347.6426, 24.1406, 19,2,MAPICON_GLOBAL); //SNakes farm
  1153.  
  1154.     SetPlayerMapIcon(playerid, 6, 260.0900,2889.5242,11.1854, 19,2,MAPICON_GLOBAL); //Bay side
  1155.  
  1156.     SetPlayerMapIcon(playerid, 7, 239.5721,1859.1677,14.0840, 19,2,MAPICON_GLOBAL); //Area 69
  1157.  
  1158.     SetPlayerMapIcon(playerid, 8, -551.6992,2593.0771,53.9348, 19,2,MAPICON_GLOBAL); //Army hotel
  1159.  
  1160.     SetPlayerMapIcon(playerid, 9, 670.9215,1705.4658,7.1875, 19,2,MAPICON_GLOBAL); //Army petrol bunk
  1161.  
  1162.     SetPlayerMapIcon(playerid, 10, 221.0856,1422.6615,10.5859, 19,2,MAPICON_GLOBAL); //Oil Factory
  1163.  
  1164.     SetPlayerMapIcon(playerid, 11, 558.9932,1221.8896,11.7188, 19,2,MAPICON_GLOBAL); //Oil Station
  1165.  
  1166.     SetPlayerMapIcon(playerid, 12, 588.3246,875.7402,-42.4973, 19,2,MAPICON_GLOBAL); //Quarry
  1167.  
  1168.     SetPlayerMapIcon(playerid, 13, -314.8433,1773.9176,43.6406, 19,2,MAPICON_GLOBAL); //Desert Guest house
  1169.  
  1170.     SetPlayerMapIcon(playerid, 14, -311.0136,1542.9733,75.5625, 19,2,MAPICON_GLOBAL); //Big Ear
  1171.     return 1;
  1172. }
  1173.  
  1174. public OnPlayerDisconnect(playerid, reason)
  1175. {
  1176.     //login
  1177.     new INI:File = INI_Open(UserPath(playerid));
  1178.     INI_SetTag(File,"data");
  1179.     INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
  1180.     INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
  1181.     INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
  1182.     INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
  1183.     INI_Close(File);
  1184.     return 1;
  1185. }
  1186. //stop
  1187.  
  1188.     new str[100], pName[MAX_PLAYER_NAME];
  1189.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  1190.     format(string,sizeof string,"%s Has Left The Server",pName);
  1191.     SendClientMessageToAll(0xCC0000,str);
  1192.  
  1193.  
  1194.  
  1195.     return 1;
  1196. }
  1197.  
  1198. forward Updater();
  1199. public Updater()
  1200. {
  1201.     foreach(new playerid: Player)
  1202.     {
  1203.         if(IsSpawned[playerid] == 1)
  1204.         {
  1205.             TextDrawShowForPlayer(playerid, tScore[playerid]);
  1206.             new st3[80];
  1207.             format(st3, sizeof(st3), "~g~Score: ~w~%d", GetPlayerScore(playerid));
  1208.             TextDrawSetString(tScore[playerid], st3);
  1209.         }
  1210.     }
  1211.     return 1;
  1212. }
  1213.  
  1214. public OnPlayerSpawn(playerid)
  1215. {
  1216.     IsSpawned[playerid] = 1;
  1217.     TextDrawHideForPlayer(playerid, blacks);
  1218.     TogglePlayerSpectating(playerid, 0);
  1219.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1220.     //login
  1221.     TextDrawHideForPlayer(playerid, Textdraw0);
  1222.     TextDrawHideForPlayer(playerid, Textdraw1);
  1223.     TextDrawHideForPlayer(playerid, Textdraw2);
  1224.     return 1;
  1225. }//stop
  1226.  
  1227. //-------------------------------------GangZone colors--------------------------------------------//
  1228.  
  1229.     GangZoneShowForPlayer(playerid, germany, 0xFF00004E);
  1230.     GangZoneShowForPlayer(playerid, usa, 0x0000FF61);
  1231.  
  1232. //-------------------------------------starter message---------------------------------------------//
  1233.  
  1234.     SendClientMessage(playerid,0x66BBEE,"***USA vs GERMANY***");
  1235.     SendClientMessage(playerid,0x66BBEE,"It Was Scripted By Mc_karlis");
  1236.     SendClientMessage(playerid,0x66BBEE,"Type /cmds to know commands!");
  1237.     SendClientMessage(playerid,0x66BBEE,"Hope You Like It!");
  1238.     SetPlayerArmour(playerid, 0.0);
  1239.  
  1240.  
  1241.  
  1242.     if(gTeam[playerid] == TEAM_GERMANY) //germany
  1243.     {
  1244.         GivePlayerWeapon(playerid,24,500);
  1245.         GivePlayerWeapon(playerid,25,500);
  1246.         GivePlayerWeapon(playerid,29,500);
  1247.         GivePlayerWeapon(playerid,30,500);
  1248.         GivePlayerWeapon(playerid,31,500);
  1249.         SetPlayerColor(playerid,0xFF0000FF);
  1250.         SetPlayerPos(playerid, -748.3502,1588.8071,26.9609);
  1251.         SetPlayerFacingAngle(playerid, 137.3416);
  1252.         SetPlayerSkin(playerid, 179);
  1253.     }
  1254.     else if(gTeam[playerid] == TEAM_USA) //usa
  1255.     {
  1256.         GivePlayerWeapon(playerid,24,500);
  1257.         GivePlayerWeapon(playerid,25,500);
  1258.         GivePlayerWeapon(playerid,29,500);
  1259.         GivePlayerWeapon(playerid,30,500);
  1260.         GivePlayerWeapon(playerid,31,500);
  1261.         SetPlayerColor(playerid,0x2641FEAA);
  1262.         SetPlayerPos(playerid, -246.4079,2622.3428,62.9486);
  1263.         SetPlayerFacingAngle(playerid, 269.4406);
  1264.         SetPlayerSkin(playerid, 287);
  1265.     }
  1266.  
  1267.  
  1268.     return 1;
  1269. }
  1270.  
  1271. public OnPlayerDeath(playerid, killerid, reason)
  1272. {
  1273.     PlayerInfo[killerid][pKills]++;
  1274.     PlayerInfo[playerid][pDeaths]++;
  1275.  
  1276.     SetPlayerScore(killerid,GetPlayerScore(killerid)+3);
  1277.     GivePlayerMoney(killerid,800);
  1278.     new msg[128];
  1279.     new killername[MAX_PLAYER_NAME],victimname[MAX_PLAYER_NAME];
  1280.     GetPlayerName(killerid,killername,MAX_PLAYER_NAME); GetPlayerName(playerid,victimname,MAX_PLAYER_NAME);
  1281.     format(msg, 128, "%s You got killed %s with Weapon ID: %i", killername, victimname, GetPlayerWeapon(killerid));
  1282.     GameTextForPlayer(playerid,"you just got killed",5000,1);
  1283.     SendClientMessageToAll(0xAA3333AA,msg);
  1284.     return 1;
  1285. }
  1286.  
  1287. public OnVehicleSpawn(vehicleid)
  1288. {
  1289.  
  1290.     return 1;
  1291. }
  1292.  
  1293. public OnVehicleDeath(vehicleid, killerid)
  1294. {
  1295.     return 1;
  1296. }
  1297.  
  1298. public OnPlayerText(playerid, text[])
  1299. {
  1300.     return 1;
  1301. }
  1302.  
  1303. public OnPlayerCommandText(playerid, cmdtext[])
  1304. {
  1305.     if (strcmp("/objectives", cmdtext, true, 10) == 0)
  1306.     {
  1307.     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");
  1308.     return 1;
  1309.     }
  1310.     return 0;
  1311. }
  1312.  
  1313. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1314. {
  1315.     return 1;
  1316. }
  1317.  
  1318. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  1319. {
  1320.     format(string,sizeof(string),"-%.0f hp",amount);
  1321.     SetPlayerChatBubble(playerid,string,0x660000AA,150.0,2500);
  1322.     return 1;
  1323. }
  1324.  
  1325. public OnPlayerExitVehicle(playerid, vehicleid)
  1326. {
  1327.     return 1;
  1328. }
  1329.  
  1330. public OnPlayerStateChange(playerid, newstate, oldstate)
  1331. {
  1332.     return 1;
  1333. }
  1334.  
  1335. public OnRconCommand(cmd[])
  1336. {
  1337.     return 1;
  1338. }
  1339.  
  1340. //---------------------------------------------CMDS------------------------------------------//
  1341.  
  1342.  
  1343.  
  1344. //--------------------------------------------/Kill cmd-------------------------------------//
  1345. CMD:kill(playerid, params[])
  1346. {
  1347. SetPlayerHealth(playerid,0);
  1348. return 1;
  1349. }
  1350.  
  1351. //--------------------------------------------/help cmd-------------------------------------//
  1352. CMD:cmds(playerid, params[])
  1353. {
  1354.     SendClientMessage(playerid, 0xFFFFFFF, "/kill   /stats   /buyhealth   /buyarmour   /forum");
  1355.     SendClientMessage(playerid, 0xFFFFFFF, "/help   /credits   /rules   /ch");
  1356.  
  1357.     return 1;
  1358. }
  1359.  
  1360. //---------------------------------------/buyhealth cmd-------------------------------------------//
  1361. CMD:buyhealth(playerid, params[])
  1362. {
  1363.  if(GetPlayerMoney(playerid) > 5500) // if the player have 5500+ in his pocket
  1364.     {
  1365.         SetPlayerHealth(playerid,100); // we heal him a.k.a give him full health
  1366.         SendClientMessage(playerid,-1,"You paid 5500$ to heal your self !"); // changeme : the color you wan't , COLOR_GREEN for example
  1367.  } else  SendClientMessage(playerid,-1,"You don't have 5500$ !");
  1368.  return 1;
  1369. }
  1370.  
  1371. //-------------------------------------------/buyarmour---------------------------------------------------------------------------------------//
  1372.  
  1373. CMD:buyarmour(playerid, params[])
  1374. {
  1375.  if(GetPlayerMoney(playerid) > 6000) // if the player have 5500+ in his pocket
  1376.     {
  1377.         SetPlayerArmour(playerid,100); // we heal him a.k.a give him full health
  1378.         SendClientMessage(playerid,-1,"You paid 6000$ to armour your self !"); // changeme : the color you wan't , COLOR_GREEN for example
  1379.  } else  SendClientMessage(playerid,-1,"You don't have 6000$ !");
  1380.  return 1;
  1381. }
  1382.  
  1383. //-----------------------------------------/forum-------------------------------------------------------------------//
  1384.  
  1385. CMD:forum(playerid, params[])
  1386. {
  1387. SendClientMessage(playerid, GREEN, "www.sfworld.tk");
  1388. GameTextForPlayer(playerid, "~w~Server Website:~n~your forum link here", 2500, 3);
  1389. return 1;
  1390. }
  1391.  
  1392. //----------------------------------------------/help----------------------------------------------------//
  1393.  
  1394. CMD:help(playerid, params[])
  1395. {
  1396. SendClientMessage(playerid, GREEN, "***************** COD-NW Help *******************************"                    );
  1397. SendClientMessage(playerid, -1, "                                                                ");
  1398. SendClientMessage(playerid, -1, "Welcome to ***USA vs GERMANY***]  - Generation of Wars");
  1399. SendClientMessage(playerid, -1,  "Read /cmds /rules /credits for more info.            ");
  1400. SendClientMessage(playerid, -1, "                                                                ");
  1401. SendClientMessage(playerid, GREEN, "*************************************************************");
  1402. return true;
  1403. }
  1404.  
  1405. //--------------------------------------------/credits------------------------------------------------------//
  1406.  
  1407. CMD:credits(playerid, params[])
  1408. {
  1409. SendClientMessage(playerid, GREEN, "*** Server Scripted By Mc_karlis ***");
  1410. SendClientMessage(playerid, GREEN, "*** Beta Tester & Help in Mapping - Mc_karlis***");
  1411. return true;
  1412. }
  1413.  
  1414. //---------------------------------------------/rules---------------------------------------------------------//
  1415.  
  1416. CMD:rules(playerid, params[])
  1417. {
  1418. SendClientMessage(playerid, GREEN, "************ ***USA vs GERMANY*** Rules *****************");
  1419. SendClientMessage(playerid, red, "                                                     ");
  1420. SendClientMessage(playerid, red, "1.Do not car park.!");
  1421. SendClientMessage(playerid, red, "2.Do not kill with heli blade.!");
  1422. SendClientMessage(playerid, red, "3.Do not kill players with armoured vehicle in spawn position.!");
  1423. SendClientMessage(playerid, red, "4.Do not disrespect players.!");
  1424. SendClientMessage(playerid, red, "5.Insulting will lead to Warn/Kick/ban.!");
  1425. SendClientMessage(playerid, red, "6.Dont CBug, Slide Bug or Anyother Bug ");
  1426. SendClientMessage(playerid, -1, "                                                     ");
  1427. SendClientMessage(playerid, GREEN, "**********************************************");
  1428.  
  1429. return true;
  1430. }
  1431.  
  1432. //-----------------------------------------/ch---------------------------------------------------//
  1433.  
  1434. CMD:ch(playerid, params[])
  1435. {
  1436. SetPlayerHealth(playerid, 0.0);
  1437. ForceClassSelection(playerid);
  1438. SendClientMessage(playerid, -1,"Select your new Team!");
  1439. return 1;
  1440. }
  1441.  
  1442. //--------------------------------------------
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451. stock CaptureZoneMessage(playerid, messageid)
  1452. {
  1453.     switch(messageid)
  1454.     {
  1455.        case 1:
  1456.        {
  1457.            SendClientMessage(playerid, -1,"*You cannot capture while in vehicle!");
  1458.        }
  1459.        case 2:
  1460.        {
  1461.            SendClientMessage(playerid, -1,"*Zone is already underattack!");
  1462.        }
  1463.        case 3:
  1464.        {
  1465.            SendClientMessage(playerid, -1,"You cannot capture areas");
  1466.        }
  1467.     }
  1468.     return 1;
  1469. }
  1470.  
  1471. stock Name(playerid)
  1472. {
  1473.   new name[MAX_PLAYER_NAME];
  1474.   GetPlayerName(playerid, name, sizeof(name));
  1475.   return name;
  1476. }
  1477. stock GivePlayerScore(playerid, score)
  1478. {
  1479.         SetPlayerScore(playerid, GetPlayerScore(playerid)+score);
  1480.         return 1;
  1481. }
  1482.  
  1483.  
  1484.  
  1485.  
  1486. //Capture Zones
  1487.  
  1488. stock ActiveSnake(playerid)
  1489. {
  1490.     if(PlayerInfo[playerid][OnDuty] == 0)
  1491.     {
  1492.         if(UnderAttack[SNAKE] == 0)
  1493.         {
  1494.             if(!IsPlayerInAnyVehicle(playerid))
  1495.             {
  1496.                 UnderAttack[SNAKE] = 1;
  1497.                 timer[playerid][SNAKE] = SetTimerEx("BigSnake", 25000, false,"i",playerid);
  1498.                 Captured[playerid][SNAKE] = 0;
  1499.                 SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
  1500.                 PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
  1501.                 FlashZone(playerid, Zone[SNAKE]);
  1502.                 //------Message-----
  1503.                 if(tCP[SNAKE] == TEAM_GERMANY)
  1504.                 {
  1505.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
  1506.                   SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Big Snake is under attack!");
  1507.                 }
  1508.                 else if(tCP[SNAKE] == TEAM_USA)
  1509.                 {
  1510.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
  1511.                   SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Big Snake is under attack!");
  1512.                 }
  1513.                 else if(tCP[SNAKE] == TEAM_NONE)
  1514.                 {
  1515.                   SendClientMessage(playerid, -1,"This flag is not controlled by any team");
  1516.                 }
  1517.                 //---------loop-------//
  1518.                 for(new i = 0; i < MAX_PLAYERS; i ++)
  1519.                 {
  1520.                    IsPlayerCapturing[i][SNAKE] = 1;
  1521.                 }
  1522.             }
  1523.             else return CaptureZoneMessage(playerid, 1);
  1524.         }
  1525.         else return CaptureZoneMessage(playerid, 2);
  1526.     }
  1527.     else return CaptureZoneMessage(playerid, 3);
  1528.     return 1;
  1529. }
  1530. stock SnakeCaptured(playerid)
  1531. {
  1532.     Captured[playerid][SNAKE] = 1;
  1533.     UnderAttack[SNAKE] = 0;
  1534.     KillTimer(timer[playerid][SNAKE]);
  1535.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1536.     CountVar[playerid][SNAKE] = 25;
  1537.     GivePlayerScore(playerid, 5);
  1538.     GivePlayerMoney(playerid, 5000);
  1539.     SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Big Snake\" you received +5 scores and +$5000 cash!");
  1540.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
  1541.     //==========================================================================
  1542.     for(new i = 0; i < MAX_PLAYERS; i++)
  1543.     {
  1544.        IsPlayerCapturing[i][SNAKE] = 0;
  1545.        if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
  1546.        {
  1547.            SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Big Snake"#COL_WHITE"! You received +1 score for it!");
  1548.            GivePlayerScore(i, 1);
  1549.        }
  1550.     }
  1551.     //==========================================================================
  1552.     tCP[SNAKE] = gTeam[playerid];
  1553.     GangZoneStopFlashForAll(Zone[SNAKE]);
  1554.     //==========================================================================
  1555.     SetZoneColor(playerid, Zone[SNAKE]);
  1556.     //==========================================================================
  1557.     new str[128];
  1558.     format(str, sizeof(str),"%s has captured \"Big Snake\" for team %s", Name(playerid), GetTeam(playerid));
  1559.     SendClientMessageToAll(-1, str);
  1560.     return 1;
  1561. }
  1562.  
  1563. stock LeavingSnake(playerid)
  1564. {
  1565.     Captured[playerid][SNAKE] = 1;
  1566.     UnderAttack[SNAKE] = 0;
  1567.     KillTimer(timer[playerid][SNAKE]);
  1568.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1569.     CountVar[playerid][SNAKE] = 25;
  1570.     GangZoneStopFlashForAll(Zone[SNAKE]);
  1571.     for(new i = 0; i < MAX_PLAYERS; i++)
  1572.     {
  1573.        IsPlayerCapturing[i][SNAKE] = 0;
  1574.     }
  1575.     SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
  1576.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
  1577.     return 1;
  1578. }
  1579. forward BigSnake(playerid);
  1580. public BigSnake(playerid)
  1581. {
  1582.     SnakeCaptured(playerid);
  1583.     return 1;
  1584. }
  1585.  
  1586. stock ActiveBay(playerid)
  1587. {
  1588.     if(PlayerInfo[playerid][OnDuty] == 0)
  1589.     {
  1590.         if(UnderAttack[BAY] == 0)
  1591.         {
  1592.             if(!IsPlayerInAnyVehicle(playerid))
  1593.             {
  1594.                 UnderAttack[BAY] = 1;
  1595.                 timer[playerid][BAY] = SetTimerEx("BigBay", 25000, false,"i",playerid);
  1596.                 Captured[playerid][BAY] = 0;
  1597.                 SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
  1598.                 PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
  1599.                 FlashZone(playerid, Zone[BAY]);
  1600.                 //------Message-----
  1601.                 if(tCP[BAY] == TEAM_GERMANY)
  1602.                 {
  1603.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
  1604.                   SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Big Bay is under attack!");
  1605.                 }
  1606.                 else if(tCP[BAY] == TEAM_USA)
  1607.                 {
  1608.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
  1609.                   SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Big Bay is under attack!");
  1610.                 }
  1611.                 else if(tCP[BAY] == TEAM_NONE)
  1612.                 {
  1613.                   SendClientMessage(playerid, -1,"This flag is not controlled by any team");
  1614.                 }
  1615.                 //---------loop-------//
  1616.                 for(new i = 0; i < MAX_PLAYERS; i ++)
  1617.                 {
  1618.                    IsPlayerCapturing[i][BAY] = 1;
  1619.                 }
  1620.             }
  1621.             else return CaptureZoneMessage(playerid, 1);
  1622.         }
  1623.         else return CaptureZoneMessage(playerid, 2);
  1624.     }
  1625.     else return CaptureZoneMessage(playerid, 3);
  1626.     return 1;
  1627. }
  1628. stock BayCaptured(playerid)
  1629. {
  1630.     Captured[playerid][BAY] = 1;
  1631.     UnderAttack[BAY] = 0;
  1632.     KillTimer(timer[playerid][BAY]);
  1633.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1634.     CountVar[playerid][BAY] = 25;
  1635.     GivePlayerScore(playerid, 5);
  1636.     GivePlayerMoney(playerid, 5000);
  1637.     SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Big Bay\" you received +5 scores and +$5000 cash!");
  1638.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
  1639.     //==========================================================================
  1640.     for(new i = 0; i < MAX_PLAYERS; i++)
  1641.     {
  1642.        IsPlayerCapturing[i][BAY] = 0;
  1643.        if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
  1644.        {
  1645.            SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Big Bay"#COL_WHITE"! You received +1 score for it!");
  1646.            GivePlayerScore(i, 1);
  1647.        }
  1648.     }
  1649.     //==========================================================================
  1650.     tCP[BAY] = gTeam[playerid];
  1651.     GangZoneStopFlashForAll(Zone[BAY]);
  1652.     //==========================================================================
  1653.     SetZoneColor(playerid, Zone[BAY]);
  1654.     //==========================================================================
  1655.     new str[128];
  1656.     format(str, sizeof(str),"%s has captured \"Big Bay\" for team %s", Name(playerid), GetTeam(playerid));
  1657.     SendClientMessageToAll(-1, str);
  1658.     return 1;
  1659. }
  1660.  
  1661. stock LeavingBay(playerid)
  1662. {
  1663.     Captured[playerid][BAY] = 1;
  1664.     UnderAttack[BAY] = 0;
  1665.     KillTimer(timer[playerid][BAY]);
  1666.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1667.     CountVar[playerid][BAY] = 25;
  1668.     GangZoneStopFlashForAll(Zone[BAY]);
  1669.     for(new i = 0; i < MAX_PLAYERS; i++)
  1670.     {
  1671.        IsPlayerCapturing[i][BAY] = 0;
  1672.     }
  1673.     SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
  1674.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
  1675.     return 1;
  1676. }
  1677. forward BigBay(playerid);
  1678. public BigBay(playerid)
  1679. {
  1680.     BayCaptured(playerid);
  1681.     return 1;
  1682. }
  1683. stock ActiveBig(playerid)
  1684. {
  1685.     if(PlayerInfo[playerid][OnDuty] == 0)
  1686.     {
  1687.         if(UnderAttack[BIG] == 0)
  1688.         {
  1689.             if(!IsPlayerInAnyVehicle(playerid))
  1690.             {
  1691.                 UnderAttack[BIG] = 1;
  1692.                 timer[playerid][BIG] = SetTimerEx("BigBig", 25000, false,"i",playerid);
  1693.                 Captured[playerid][BIG] = 0;
  1694.                 SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
  1695.                 PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
  1696.                 FlashZone(playerid, Zone[BIG]);
  1697.                 //------Message-----
  1698.                 if(tCP[BIG] == TEAM_GERMANY)
  1699.                 {
  1700.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
  1701.                   SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Big Big is under attack!");
  1702.                 }
  1703.                 else if(tCP[BIG] == TEAM_USA)
  1704.                 {
  1705.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
  1706.                   SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Big Big is under attack!");
  1707.                 }
  1708.                 else if(tCP[BIG] == TEAM_NONE)
  1709.                 {
  1710.                   SendClientMessage(playerid, -1,"This flag is not controlled by any team");
  1711.                 }
  1712.                 //---------loop-------//
  1713.                 for(new i = 0; i < MAX_PLAYERS; i ++)
  1714.                 {
  1715.                    IsPlayerCapturing[i][BIG] = 1;
  1716.                 }
  1717.             }
  1718.             else return CaptureZoneMessage(playerid, 1);
  1719.         }
  1720.         else return CaptureZoneMessage(playerid, 2);
  1721.     }
  1722.     else return CaptureZoneMessage(playerid, 3);
  1723.     return 1;
  1724. }
  1725. stock BigCaptured(playerid)
  1726. {
  1727.     Captured[playerid][BIG] = 1;
  1728.     UnderAttack[BIG] = 0;
  1729.     KillTimer(timer[playerid][BIG]);
  1730.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1731.     CountVar[playerid][BIG] = 25;
  1732.     GivePlayerScore(playerid, 5);
  1733.     GivePlayerMoney(playerid, 5000);
  1734.     SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Big Big\" you received +5 scores and +$5000 cash!");
  1735.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
  1736.     //==========================================================================
  1737.     for(new i = 0; i < MAX_PLAYERS; i++)
  1738.     {
  1739.        IsPlayerCapturing[i][BIG] = 0;
  1740.        if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
  1741.        {
  1742.            SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Big Big"#COL_WHITE"! You received +1 score for it!");
  1743.            GivePlayerScore(i, 1);
  1744.        }
  1745.     }
  1746.     //==========================================================================
  1747.     tCP[BIG] = gTeam[playerid];
  1748.     GangZoneStopFlashForAll(Zone[BIG]);
  1749.     //==========================================================================
  1750.     SetZoneColor(playerid, Zone[BIG]);
  1751.     //==========================================================================
  1752.     new str[128];
  1753.     format(str, sizeof(str),"%s has captured \"Big Big\" for team %s", Name(playerid), GetTeam(playerid));
  1754.     SendClientMessageToAll(-1, str);
  1755.     return 1;
  1756. }
  1757.  
  1758. stock LeavingBig(playerid)
  1759. {
  1760.     Captured[playerid][BIG] = 1;
  1761.     UnderAttack[BIG] = 0;
  1762.     KillTimer(timer[playerid][BIG]);
  1763.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1764.     CountVar[playerid][BIG] = 25;
  1765.     GangZoneStopFlashForAll(Zone[BIG]);
  1766.     for(new i = 0; i < MAX_PLAYERS; i++)
  1767.     {
  1768.        IsPlayerCapturing[i][BIG] = 0;
  1769.     }
  1770.     SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
  1771.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
  1772.     return 1;
  1773. }
  1774. forward BigBig(playerid);
  1775. public BigBig(playerid)
  1776. {
  1777.     BigCaptured(playerid);
  1778.     return 1;
  1779. }
  1780.  
  1781. stock ActiveArmy(playerid)
  1782. {
  1783.     if(PlayerInfo[playerid][OnDuty] == 0)
  1784.     {
  1785.         if(UnderAttack[ARMY] == 0)
  1786.         {
  1787.             if(!IsPlayerInAnyVehicle(playerid))
  1788.             {
  1789.                 UnderAttack[ARMY] = 1;
  1790.                 timer[playerid][ARMY] = SetTimerEx("ArmyArmy", 25000, false,"i",playerid);
  1791.                 Captured[playerid][ARMY] = 0;
  1792.                 SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
  1793.                 PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
  1794.                 FlashZone(playerid, Zone[ARMY]);
  1795.                 //------Message-----
  1796.                 if(tCP[ARMY] == TEAM_GERMANY)
  1797.                 {
  1798.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
  1799.                   SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Army Army is under attack!");
  1800.                 }
  1801.                 else if(tCP[ARMY] == TEAM_USA)
  1802.                 {
  1803.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
  1804.                   SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Army Army is under attack!");
  1805.                 }
  1806.                 else if(tCP[ARMY] == TEAM_NONE)
  1807.                 {
  1808.                   SendClientMessage(playerid, -1,"This flag is not controlled by any team");
  1809.                 }
  1810.                 //---------loop-------//
  1811.                 for(new i = 0; i < MAX_PLAYERS; i ++)
  1812.                 {
  1813.                    IsPlayerCapturing[i][ARMY] = 1;
  1814.                 }
  1815.             }
  1816.             else return CaptureZoneMessage(playerid, 1);
  1817.         }
  1818.         else return CaptureZoneMessage(playerid, 2);
  1819.     }
  1820.     else return CaptureZoneMessage(playerid, 3);
  1821.     return 1;
  1822. }
  1823. stock ArmyCaptured(playerid)
  1824. {
  1825.     Captured[playerid][ARMY] = 1;
  1826.     UnderAttack[ARMY] = 0;
  1827.     KillTimer(timer[playerid][ARMY]);
  1828.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1829.     CountVar[playerid][ARMY] = 25;
  1830.     GivePlayerScore(playerid, 5);
  1831.     GivePlayerMoney(playerid, 5000);
  1832.     SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Army Army\" you received +5 scores and +$5000 cash!");
  1833.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
  1834.     //==========================================================================
  1835.     for(new i = 0; i < MAX_PLAYERS; i++)
  1836.     {
  1837.        IsPlayerCapturing[i][ARMY] = 0;
  1838.        if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
  1839.        {
  1840.            SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Army Army"#COL_WHITE"! You received +1 score for it!");
  1841.            GivePlayerScore(i, 1);
  1842.        }
  1843.     }
  1844.     //==========================================================================
  1845.     tCP[ARMY] = gTeam[playerid];
  1846.     GangZoneStopFlashForAll(Zone[ARMY]);
  1847.     //==========================================================================
  1848.     SetZoneColor(playerid, Zone[ARMY]);
  1849.     //==========================================================================
  1850.     new str[128];
  1851.     format(str, sizeof(str),"%s has captured \"Army Army\" for team %s", Name(playerid), GetTeam(playerid));
  1852.     SendClientMessageToAll(-1, str);
  1853.     return 1;
  1854. }
  1855.  
  1856. stock LeavingArmy(playerid)
  1857. {
  1858.     Captured[playerid][ARMY] = 1;
  1859.     UnderAttack[ARMY] = 0;
  1860.     KillTimer(timer[playerid][ARMY]);
  1861.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1862.     CountVar[playerid][ARMY] = 25;
  1863.     GangZoneStopFlashForAll(Zone[ARMY]);
  1864.     for(new i = 0; i < MAX_PLAYERS; i++)
  1865.     {
  1866.        IsPlayerCapturing[i][ARMY] = 0;
  1867.     }
  1868.     SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
  1869.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
  1870.     return 1;
  1871. }
  1872. forward ArmyArmy(playerid);
  1873. public ArmyArmy(playerid)
  1874. {
  1875.     ArmyCaptured(playerid);
  1876.     return 1;
  1877. }
  1878. stock ActivePetrol(playerid)
  1879. {
  1880.     if(PlayerInfo[playerid][OnDuty] == 0)
  1881.     {
  1882.         if(UnderAttack[PETROL] == 0)
  1883.         {
  1884.             if(!IsPlayerInAnyVehicle(playerid))
  1885.             {
  1886.                 UnderAttack[PETROL] = 1;
  1887.                 timer[playerid][PETROL] = SetTimerEx("PetrolPetrol", 25000, false,"i",playerid);
  1888.                 Captured[playerid][PETROL] = 0;
  1889.                 SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
  1890.                 PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
  1891.                 FlashZone(playerid, Zone[PETROL]);
  1892.                 //------Message-----
  1893.                 if(tCP[PETROL] == TEAM_GERMANY)
  1894.                 {
  1895.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
  1896.                   SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Petrol Petrol is under attack!");
  1897.                 }
  1898.                 else if(tCP[PETROL] == TEAM_USA)
  1899.                 {
  1900.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
  1901.                   SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Petrol Petrol is under attack!");
  1902.                 }
  1903.                 else if(tCP[PETROL] == TEAM_NONE)
  1904.                 {
  1905.                   SendClientMessage(playerid, -1,"This flag is not controlled by any team");
  1906.                 }
  1907.                 //---------loop-------//
  1908.                 for(new i = 0; i < MAX_PLAYERS; i ++)
  1909.                 {
  1910.                    IsPlayerCapturing[i][PETROL] = 1;
  1911.                 }
  1912.             }
  1913.             else return CaptureZoneMessage(playerid, 1);
  1914.         }
  1915.         else return CaptureZoneMessage(playerid, 2);
  1916.     }
  1917.     else return CaptureZoneMessage(playerid, 3);
  1918.     return 1;
  1919. }
  1920. stock PetrolCaptured(playerid)
  1921. {
  1922.     Captured[playerid][PETROL] = 1;
  1923.     UnderAttack[PETROL] = 0;
  1924.     KillTimer(timer[playerid][PETROL]);
  1925.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1926.     CountVar[playerid][PETROL] = 25;
  1927.     GivePlayerScore(playerid, 5);
  1928.     GivePlayerMoney(playerid, 5000);
  1929.     SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Petrol Petrol\" you received +5 scores and +$5000 cash!");
  1930.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
  1931.     //==========================================================================
  1932.     for(new i = 0; i < MAX_PLAYERS; i++)
  1933.     {
  1934.        IsPlayerCapturing[i][PETROL] = 0;
  1935.        if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
  1936.        {
  1937.            SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Petrol Petrol"#COL_WHITE"! You received +1 score for it!");
  1938.            GivePlayerScore(i, 1);
  1939.        }
  1940.     }
  1941.     //==========================================================================
  1942.     tCP[PETROL] = gTeam[playerid];
  1943.     GangZoneStopFlashForAll(Zone[PETROL]);
  1944.     //==========================================================================
  1945.     SetZoneColor(playerid, Zone[PETROL]);
  1946.     //==========================================================================
  1947.     new str[128];
  1948.     format(str, sizeof(str),"%s has captured \"Petrol Petrol\" for team %s", Name(playerid), GetTeam(playerid));
  1949.     SendClientMessageToAll(-1, str);
  1950.     return 1;
  1951. }
  1952.  
  1953. stock LeavingPetrol(playerid)
  1954. {
  1955.     Captured[playerid][PETROL] = 1;
  1956.     UnderAttack[PETROL] = 0;
  1957.     KillTimer(timer[playerid][PETROL]);
  1958.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  1959.     CountVar[playerid][PETROL] = 25;
  1960.     GangZoneStopFlashForAll(Zone[PETROL]);
  1961.     for(new i = 0; i < MAX_PLAYERS; i++)
  1962.     {
  1963.        IsPlayerCapturing[i][PETROL] = 0;
  1964.     }
  1965.     SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
  1966.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
  1967.     return 1;
  1968. }
  1969. forward PetrolPetrol(playerid);
  1970. public PetrolPetrol(playerid)
  1971. {
  1972.     PetrolCaptured(playerid);
  1973.     return 1;
  1974. }
  1975. stock ActiveOil(playerid)
  1976. {
  1977.     if(PlayerInfo[playerid][OnDuty] == 0)
  1978.     {
  1979.         if(UnderAttack[OIL] == 0)
  1980.         {
  1981.             if(!IsPlayerInAnyVehicle(playerid))
  1982.             {
  1983.                 UnderAttack[OIL] = 1;
  1984.                 timer[playerid][OIL] = SetTimerEx("OilOil", 25000, false,"i",playerid);
  1985.                 Captured[playerid][OIL] = 0;
  1986.                 SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
  1987.                 PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
  1988.                 FlashZone(playerid, Zone[OIL]);
  1989.                 //------Message-----
  1990.                 if(tCP[OIL] == TEAM_GERMANY)
  1991.                 {
  1992.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
  1993.                   SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Oil Oil is under attack!");
  1994.                 }
  1995.                 else if(tCP[OIL] == TEAM_USA)
  1996.                 {
  1997.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
  1998.                   SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Oil Oil is under attack!");
  1999.                 }
  2000.                 else if(tCP[OIL] == TEAM_NONE)
  2001.                 {
  2002.                   SendClientMessage(playerid, -1,"This flag is not controlled by any team");
  2003.                 }
  2004.                 //---------loop-------//
  2005.                 for(new i = 0; i < MAX_PLAYERS; i ++)
  2006.                 {
  2007.                    IsPlayerCapturing[i][OIL] = 1;
  2008.                 }
  2009.             }
  2010.             else return CaptureZoneMessage(playerid, 1);
  2011.         }
  2012.         else return CaptureZoneMessage(playerid, 2);
  2013.     }
  2014.     else return CaptureZoneMessage(playerid, 3);
  2015.     return 1;
  2016. }
  2017. stock OilCaptured(playerid)
  2018. {
  2019.     Captured[playerid][OIL] = 1;
  2020.     UnderAttack[OIL] = 0;
  2021.     KillTimer(timer[playerid][OIL]);
  2022.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  2023.     CountVar[playerid][OIL] = 25;
  2024.     GivePlayerScore(playerid, 5);
  2025.     GivePlayerMoney(playerid, 5000);
  2026.     SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Oil Oil\" you received +5 scores and +$5000 cash!");
  2027.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
  2028.     //==========================================================================
  2029.     for(new i = 0; i < MAX_PLAYERS; i++)
  2030.     {
  2031.        IsPlayerCapturing[i][OIL] = 0;
  2032.        if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
  2033.        {
  2034.            SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Oil Oil"#COL_WHITE"! You received +1 score for it!");
  2035.            GivePlayerScore(i, 1);
  2036.        }
  2037.     }
  2038.     //==========================================================================
  2039.     tCP[OIL] = gTeam[playerid];
  2040.     GangZoneStopFlashForAll(Zone[OIL]);
  2041.     //==========================================================================
  2042.     SetZoneColor(playerid, Zone[OIL]);
  2043.     //==========================================================================
  2044.     new str[128];
  2045.     format(str, sizeof(str),"%s has captured \"Oil Oil\" for team %s", Name(playerid), GetTeam(playerid));
  2046.     SendClientMessageToAll(-1, str);
  2047.     return 1;
  2048. }
  2049.  
  2050. stock LeavingOil(playerid)
  2051. {
  2052.     Captured[playerid][OIL] = 1;
  2053.     UnderAttack[OIL] = 0;
  2054.     KillTimer(timer[playerid][OIL]);
  2055.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  2056.     CountVar[playerid][OIL] = 25;
  2057.     GangZoneStopFlashForAll(Zone[OIL]);
  2058.     for(new i = 0; i < MAX_PLAYERS; i++)
  2059.     {
  2060.        IsPlayerCapturing[i][OIL] = 0;
  2061.     }
  2062.     SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
  2063.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
  2064.     return 1;
  2065. }
  2066. forward OilOil(playerid);
  2067. public OilOil(playerid)
  2068. {
  2069.     OilCaptured(playerid);
  2070.     return 1;
  2071. }
  2072. stock ActiveDesert(playerid)
  2073. {
  2074.     if(PlayerInfo[playerid][OnDuty] == 0)
  2075.     {
  2076.         if(UnderAttack[DESERT] == 0)
  2077.         {
  2078.             if(!IsPlayerInAnyVehicle(playerid))
  2079.             {
  2080.                 UnderAttack[DESERT] = 1;
  2081.                 timer[playerid][DESERT] = SetTimerEx("DesertDesert", 25000, false,"i",playerid);
  2082.                 Captured[playerid][DESERT] = 0;
  2083.                 SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
  2084.                 PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
  2085.                 FlashZone(playerid, Zone[DESERT]);
  2086.                 //------Message-----
  2087.                 if(tCP[DESERT] == TEAM_GERMANY)
  2088.                 {
  2089.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
  2090.                   SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Desert Desert is under attack!");
  2091.                 }
  2092.                 else if(tCP[DESERT] == TEAM_USA)
  2093.                 {
  2094.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
  2095.                   SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Desert Desert is under attack!");
  2096.                 }
  2097.                 else if(tCP[DESERT] == TEAM_NONE)
  2098.                 {
  2099.                   SendClientMessage(playerid, -1,"This flag is not controlled by any team");
  2100.                 }
  2101.                 //---------loop-------//
  2102.                 for(new i = 0; i < MAX_PLAYERS; i ++)
  2103.                 {
  2104.                    IsPlayerCapturing[i][DESERT] = 1;
  2105.                 }
  2106.             }
  2107.             else return CaptureZoneMessage(playerid, 1);
  2108.         }
  2109.         else return CaptureZoneMessage(playerid, 2);
  2110.     }
  2111.     else return CaptureZoneMessage(playerid, 3);
  2112.     return 1;
  2113. }
  2114. stock DesertCaptured(playerid)
  2115. {
  2116.     Captured[playerid][DESERT] = 1;
  2117.     UnderAttack[DESERT] = 0;
  2118.     KillTimer(timer[playerid][DESERT]);
  2119.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  2120.     CountVar[playerid][DESERT] = 25;
  2121.     GivePlayerScore(playerid, 5);
  2122.     GivePlayerMoney(playerid, 5000);
  2123.     SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Desert Desert\" you received +5 scores and +$5000 cash!");
  2124.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
  2125.     //==========================================================================
  2126.     for(new i = 0; i < MAX_PLAYERS; i++)
  2127.     {
  2128.        IsPlayerCapturing[i][DESERT] = 0;
  2129.        if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
  2130.        {
  2131.            SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Desert Desert"#COL_WHITE"! You received +1 score for it!");
  2132.            GivePlayerScore(i, 1);
  2133.        }
  2134.     }
  2135.     //==========================================================================
  2136.     tCP[DESERT] = gTeam[playerid];
  2137.     GangZoneStopFlashForAll(Zone[DESERT]);
  2138.     //==========================================================================
  2139.     SetZoneColor(playerid, Zone[DESERT]);
  2140.     //==========================================================================
  2141.     new str[128];
  2142.     format(str, sizeof(str),"%s has captured \"Desert Desert\" for team %s", Name(playerid), GetTeam(playerid));
  2143.     SendClientMessageToAll(-1, str);
  2144.     return 1;
  2145. }
  2146.  
  2147. stock LeavingDesert(playerid)
  2148. {
  2149.     Captured[playerid][DESERT] = 1;
  2150.     UnderAttack[DESERT] = 0;
  2151.     KillTimer(timer[playerid][DESERT]);
  2152.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  2153.     CountVar[playerid][DESERT] = 25;
  2154.     GangZoneStopFlashForAll(Zone[DESERT]);
  2155.     for(new i = 0; i < MAX_PLAYERS; i++)
  2156.     {
  2157.        IsPlayerCapturing[i][DESERT] = 0;
  2158.     }
  2159.     SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
  2160.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
  2161.     return 1;
  2162. }
  2163. forward DesertDesert(playerid);
  2164. public DesertDesert(playerid)
  2165. {
  2166.     DesertCaptured(playerid);
  2167.     return 1;
  2168. }
  2169. stock ActiveQuarry(playerid)
  2170. {
  2171.     if(PlayerInfo[playerid][OnDuty] == 0)
  2172.     {
  2173.         if(UnderAttack[QUARRY] == 0)
  2174.         {
  2175.             if(!IsPlayerInAnyVehicle(playerid))
  2176.             {
  2177.                 UnderAttack[QUARRY] = 1;
  2178.                 timer[playerid][QUARRY] = SetTimerEx("QuarryQuarry", 25000, false,"i",playerid);
  2179.                 Captured[playerid][QUARRY] = 0;
  2180.                 SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
  2181.                 PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
  2182.                 FlashZone(playerid, Zone[QUARRY]);
  2183.                 //------Message-----
  2184.                 if(tCP[QUARRY] == TEAM_GERMANY)
  2185.                 {
  2186.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
  2187.                   SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Quarry Quarry is under attack!");
  2188.                 }
  2189.                 else if(tCP[QUARRY] == TEAM_USA)
  2190.                 {
  2191.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
  2192.                   SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Quarry Quarry is under attack!");
  2193.                 }
  2194.                 else if(tCP[QUARRY] == TEAM_NONE)
  2195.                 {
  2196.                   SendClientMessage(playerid, -1,"This flag is not controlled by any team");
  2197.                 }
  2198.                 //---------loop-------//
  2199.                 for(new i = 0; i < MAX_PLAYERS; i ++)
  2200.                 {
  2201.                    IsPlayerCapturing[i][QUARRY] = 1;
  2202.                 }
  2203.             }
  2204.             else return CaptureZoneMessage(playerid, 1);
  2205.         }
  2206.         else return CaptureZoneMessage(playerid, 2);
  2207.     }
  2208.     else return CaptureZoneMessage(playerid, 3);
  2209.     return 1;
  2210. }
  2211. stock QuarryCaptured(playerid)
  2212. {
  2213.     Captured[playerid][QUARRY] = 1;
  2214.     UnderAttack[QUARRY] = 0;
  2215.     KillTimer(timer[playerid][QUARRY]);
  2216.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  2217.     CountVar[playerid][QUARRY] = 25;
  2218.     GivePlayerScore(playerid, 5);
  2219.     GivePlayerMoney(playerid, 5000);
  2220.     SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Quarry Quarry\" you received +5 scores and +$5000 cash!");
  2221.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
  2222.     //==========================================================================
  2223.     for(new i = 0; i < MAX_PLAYERS; i++)
  2224.     {
  2225.        IsPlayerCapturing[i][QUARRY] = 0;
  2226.        if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
  2227.        {
  2228.            SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Quarry Quarry"#COL_WHITE"! You received +1 score for it!");
  2229.            GivePlayerScore(i, 1);
  2230.        }
  2231.     }
  2232.     //==========================================================================
  2233.     tCP[QUARRY] = gTeam[playerid];
  2234.     GangZoneStopFlashForAll(Zone[QUARRY]);
  2235.     //==========================================================================
  2236.     SetZoneColor(playerid, Zone[QUARRY]);
  2237.     //==========================================================================
  2238.     new str[128];
  2239.     format(str, sizeof(str),"%s has captured \"Quarry Quarry\" for team %s", Name(playerid), GetTeam(playerid));
  2240.     SendClientMessageToAll(-1, str);
  2241.     return 1;
  2242. }
  2243.  
  2244. stock LeavingQuarry(playerid)
  2245. {
  2246.     Captured[playerid][QUARRY] = 1;
  2247.     UnderAttack[QUARRY] = 0;
  2248.     KillTimer(timer[playerid][QUARRY]);
  2249.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  2250.     CountVar[playerid][QUARRY] = 25;
  2251.     GangZoneStopFlashForAll(Zone[QUARRY]);
  2252.     for(new i = 0; i < MAX_PLAYERS; i++)
  2253.     {
  2254.        IsPlayerCapturing[i][QUARRY] = 0;
  2255.     }
  2256.     SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
  2257.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
  2258.     return 1;
  2259. }
  2260. forward QuarryQuarry(playerid);
  2261. public QuarryQuarry(playerid)
  2262. {
  2263.     QuarryCaptured(playerid);
  2264.     return 1;
  2265. }
  2266. stock ActiveGuest(playerid)
  2267. {
  2268.     if(PlayerInfo[playerid][OnDuty] == 0)
  2269.     {
  2270.         if(UnderAttack[GUEST] == 0)
  2271.         {
  2272.             if(!IsPlayerInAnyVehicle(playerid))
  2273.             {
  2274.                 UnderAttack[GUEST] = 1;
  2275.                 timer[playerid][GUEST] = SetTimerEx("GuestGuest", 25000, false,"i",playerid);
  2276.                 Captured[playerid][GUEST] = 0;
  2277.                 SendClientMessage(playerid, 0xFFFFFFFF,"| - Stay in this checkpoint for 25 seconds to capture! - |");
  2278.                 PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/capturing.MP3");
  2279.                 FlashZone(playerid, Zone[GUEST]);
  2280.                 //------Message-----
  2281.                 if(tCP[GUEST] == TEAM_GERMANY)
  2282.                 {
  2283.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<Germany>");
  2284.                   SendTeamMessage(TEAM_GERMANY, COLOR_GREEN,"*Guest Guest is under attack!");
  2285.                 }
  2286.                 else if(tCP[GUEST] == TEAM_USA)
  2287.                 {
  2288.                   SendClientMessage(playerid, -1,"This flag is controlled by team "#COL_RED"<USA>");
  2289.                   SendTeamMessage(TEAM_USA, COLOR_GREEN,"*Guest Guest is under attack!");
  2290.                 }
  2291.                 else if(tCP[GUEST] == TEAM_NONE)
  2292.                 {
  2293.                   SendClientMessage(playerid, -1,"This flag is not controlled by any team");
  2294.                 }
  2295.                 //---------loop-------//
  2296.                 for(new i = 0; i < MAX_PLAYERS; i ++)
  2297.                 {
  2298.                    IsPlayerCapturing[i][GUEST] = 1;
  2299.                 }
  2300.             }
  2301.             else return CaptureZoneMessage(playerid, 1);
  2302.         }
  2303.         else return CaptureZoneMessage(playerid, 2);
  2304.     }
  2305.     else return CaptureZoneMessage(playerid, 3);
  2306.     return 1;
  2307. }
  2308. stock GuestCaptured(playerid)
  2309. {
  2310.     Captured[playerid][GUEST] = 1;
  2311.     UnderAttack[GUEST] = 0;
  2312.     KillTimer(timer[playerid][GUEST]);
  2313.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  2314.     CountVar[playerid][GUEST] = 25;
  2315.     GivePlayerScore(playerid, 5);
  2316.     GivePlayerMoney(playerid, 5000);
  2317.     SendClientMessage(playerid, COLOR_GREEN,"Congratulations! You have captured \"Guest Guest\" you received +5 scores and +$5000 cash!");
  2318.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/Captured%20success.MP3");
  2319.     //==========================================================================
  2320.     for(new i = 0; i < MAX_PLAYERS; i++)
  2321.     {
  2322.        IsPlayerCapturing[i][GUEST] = 0;
  2323.        if(gTeam[i] == gTeam[playerid] && i != playerid && PlayerInfo[i][OnDuty] == 0)
  2324.        {
  2325.            SendClientMessage(i, 0xFFFFFFFF,"*Your team has captured "#COL_RED"Guest Guest"#COL_WHITE"! You received +1 score for it!");
  2326.            GivePlayerScore(i, 1);
  2327.        }
  2328.     }
  2329.     //==========================================================================
  2330.     tCP[GUEST] = gTeam[playerid];
  2331.     GangZoneStopFlashForAll(Zone[GUEST]);
  2332.     //==========================================================================
  2333.     SetZoneColor(playerid, Zone[GUEST]);
  2334.     //==========================================================================
  2335.     new str[128];
  2336.     format(str, sizeof(str),"%s has captured \"Guest Guest\" for team %s", Name(playerid), GetTeam(playerid));
  2337.     SendClientMessageToAll(-1, str);
  2338.     return 1;
  2339. }
  2340.  
  2341. stock LeavingGuest(playerid)
  2342. {
  2343.     Captured[playerid][GUEST] = 1;
  2344.     UnderAttack[GUEST] = 0;
  2345.     KillTimer(timer[playerid][GUEST]);
  2346.     TextDrawHideForPlayer(playerid, CountText[playerid]);
  2347.     CountVar[playerid][GUEST] = 25;
  2348.     GangZoneStopFlashForAll(Zone[GUEST]);
  2349.     for(new i = 0; i < MAX_PLAYERS; i++)
  2350.     {
  2351.        IsPlayerCapturing[i][GUEST] = 0;
  2352.     }
  2353.     SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
  2354.     PlayAudioStreamForPlayer(playerid, "http://files.mboxdrive.com/100000435279790/failed%20capture.MP3");
  2355.     return 1;
  2356. }
  2357. forward GuestGuest(playerid);
  2358. public GuestGuest(playerid)
  2359. {
  2360.     GuestCaptured(playerid);
  2361.     return 1;
  2362. }
  2363. forward CountDown();
  2364. public CountDown()
  2365. {
  2366.     for(new playerid; playerid < MAX_PLAYERS; playerid++)
  2367.     {
  2368.         if(IsPlayerInDynamicCP(playerid, CP[SNAKE]) && UnderAttack[SNAKE] == 1 && IsPlayerCapturing[playerid][SNAKE] == 1)
  2369.         {
  2370.             CountVar[playerid][SNAKE]--;
  2371.             new str1[124];
  2372.             TextDrawShowForPlayer(playerid, CountText[playerid]);
  2373.             format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][SNAKE]);
  2374.             TextDrawSetString(CountText[playerid], str1);
  2375.         }
  2376.         if(IsPlayerInDynamicCP(playerid, CP[BAY]) && UnderAttack[BAY] == 1 && IsPlayerCapturing[playerid][BAY] == 1)
  2377.         {
  2378.             CountVar[playerid][BAY]--;
  2379.             new str1[124];
  2380.             TextDrawShowForPlayer(playerid, CountText[playerid]);
  2381.             format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][BAY]);
  2382.             TextDrawSetString(CountText[playerid], str1);
  2383.         }
  2384.         if(IsPlayerInDynamicCP(playerid, CP[BIG]) && UnderAttack[BIG] == 1 && IsPlayerCapturing[playerid][BIG] == 1)
  2385.         {
  2386.             CountVar[playerid][BIG]--;
  2387.             new str1[124];
  2388.             TextDrawShowForPlayer(playerid, CountText[playerid]);
  2389.             format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][BIG]);
  2390.             TextDrawSetString(CountText[playerid], str1);
  2391.         }
  2392.         if(IsPlayerInDynamicCP(playerid, CP[ARMY]) && UnderAttack[ARMY] == 1 && IsPlayerCapturing[playerid][ARMY] == 1)
  2393.         {
  2394.             CountVar[playerid][ARMY]--;
  2395.             new str1[124];
  2396.             TextDrawShowForPlayer(playerid, CountText[playerid]);
  2397.             format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][ARMY]);
  2398.             TextDrawSetString(CountText[playerid], str1);
  2399.         }
  2400.         if(IsPlayerInDynamicCP(playerid, CP[PETROL]) && UnderAttack[PETROL] == 1 && IsPlayerCapturing[playerid][PETROL] == 1)
  2401.         {
  2402.             CountVar[playerid][PETROL]--;
  2403.             new str1[124];
  2404.             TextDrawShowForPlayer(playerid, CountText[playerid]);
  2405.             format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][PETROL]);
  2406.             TextDrawSetString(CountText[playerid], str1);
  2407.         }
  2408.         if(IsPlayerInDynamicCP(playerid, CP[OIL]) && UnderAttack[OIL] == 1 && IsPlayerCapturing[playerid][OIL] == 1)
  2409.         {
  2410.             CountVar[playerid][OIL]--;
  2411.             new str1[124];
  2412.             TextDrawShowForPlayer(playerid, CountText[playerid]);
  2413.             format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][OIL]);
  2414.             TextDrawSetString(CountText[playerid], str1);
  2415.         }
  2416.         if(IsPlayerInDynamicCP(playerid, CP[DESERT]) && UnderAttack[DESERT] == 1 && IsPlayerCapturing[playerid][DESERT] == 1)
  2417.         {
  2418.             CountVar[playerid][DESERT]--;
  2419.             new str1[124];
  2420.             TextDrawShowForPlayer(playerid, CountText[playerid]);
  2421.             format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][DESERT]);
  2422.             TextDrawSetString(CountText[playerid], str1);
  2423.         }
  2424.         if(IsPlayerInDynamicCP(playerid, CP[QUARRY]) && UnderAttack[QUARRY] == 1 && IsPlayerCapturing[playerid][QUARRY] == 1)
  2425.         {
  2426.             CountVar[playerid][QUARRY]--;
  2427.             new str1[124];
  2428.             TextDrawShowForPlayer(playerid, CountText[playerid]);
  2429.             format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][QUARRY]);
  2430.             TextDrawSetString(CountText[playerid], str1);
  2431.         }
  2432.         if(IsPlayerInDynamicCP(playerid, CP[GUEST]) && UnderAttack[GUEST] == 1 && IsPlayerCapturing[playerid][GUEST] == 1)
  2433.         {
  2434.             CountVar[playerid][GUEST]--;
  2435.             new str1[124];
  2436.             TextDrawShowForPlayer(playerid, CountText[playerid]);
  2437.             format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][GUEST]);
  2438.             TextDrawSetString(CountText[playerid], str1);
  2439.         }
  2440.         if(IsPlayerInDynamicCP(playerid, CP[EAR]) && UnderAttack[EAR] == 1 && IsPlayerCapturing[playerid][EAR] == 1)
  2441.         {
  2442.             CountVar[playerid][EAR]--;
  2443.             new str1[124];
  2444.             TextDrawShowForPlayer(playerid, CountText[playerid]);
  2445.             format(str1, sizeof(str1),"~r~%d/~y~25 ~w~seconds left ~g~to capture", CountVar[playerid][EAR]);
  2446.             TextDrawSetString(CountText[playerid], str1);
  2447.         }
  2448.     }
  2449.     return 1;
  2450. }
  2451.  
  2452. // stock login
  2453. stock UserPath(playerid)
  2454. {
  2455.     new string[128],playername[MAX_PLAYER_NAME];
  2456.     GetPlayerName(playerid,playername,sizeof(playername));
  2457.     format(string,sizeof(string),PATH,playername);
  2458.     return string;
  2459. }
  2460. stock udb_hash(buf[]) {
  2461.     new length=strlen(buf);
  2462.     new s1 = 1;
  2463.     new s2 = 0;
  2464.     new n;
  2465.     for (n=0; n<length; n++)
  2466.     {
  2467.        s1 = (s1 + buf[n]) % 65521;
  2468.        s2 = (s2 + s1)     % 65521;
  2469.     }
  2470.     return (s2 << 16) + s1;
  2471. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement