Guest User

Untitled

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