Joker_Tricker

Untitled

Sep 14th, 2011
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.66 KB | None | 0 0
  1. //___________________________________________
  2. //DO NOT Delete credits!! |
  3. //By [HiC]Thekiller & [HiC]Cam! |
  4. //============================================
  5. //------ includes
  6. #include <a_samp>
  7. #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  8. //-------levels!
  9. new LVL[MAX_PLAYERS], Score[MAX_PLAYERS];
  10. //-------Vehicles
  11. new hydra1,hydra2,hunter1,hunter2,rhyno,ss1,ss2,ss3;
  12. //-------Gang defines
  13. #define TEAM_Gangsta 1 //gang
  14. #define TEAM_Cops 2 //cops
  15. #define TEAM_Gangsta_COLOR 0x33AA33AA // Green
  16. #define TEAM_Cops_COLOR 0x0000FFAA //Blue
  17. new gTeam[MAX_PLAYERS];
  18. //-------Timers
  19. new tm1,tm2;
  20. //--------Renegede!
  21. new renegade;
  22. //--------Textdraw
  23. new Text:TextGa,Text:TextCp,Scop,Sgangsta;
  24. new Text:Textdraw2, Text:Textdraw3;
  25. //---------Area 51!
  26. new area51,Area51C,Area51G;
  27. new Float:Checkpoint ,Float:Checkpoint1, Float:Checkpoint2;
  28. //-------Special Spawn!
  29. new SpecialSpawn[MAX_PLAYERS];
  30. //-------spwan
  31. new Float:RandomSpawnGang[][4] =
  32. {
  33. {316.446594, 2530.556884, 16.378942, 69.271392},
  34. {278.986999, 2536.393798, 16.374141, 347.296722},
  35. {425.062469, 2436.829833, 16.065370, 237.485900}
  36. };
  37.  
  38. new Float:RandomSpawnCops[][4] =
  39. {
  40. {-545.548706, 2586.130615, 53.515625, 170.062301},
  41. {-567.794860, 2575.760253, 53.934780, 77.668151},
  42. {-576.641967, 2613.563964, 53.515625, 18.763990}
  43. };
  44. //-------------Random Scores
  45. new RandomKill[][1] =
  46. {
  47. {8},
  48. {9},
  49. {10},
  50. {11},
  51. {12},
  52. {13},
  53. {15}
  54. };
  55.  
  56. new RandomKillR[][1] =
  57. {
  58. {16},
  59. {18},
  60. {20},
  61. {22},
  62. {24},
  63. {26},
  64. {30}
  65. };
  66.  
  67. //--------------Random Checkpoints
  68. new Float:CPS[][3] =
  69. {
  70. {245.858047, 1859.469238, 14.084012},
  71. {249.504058, 1799.019165, 7.414062},
  72. {219.404113, 1822.623291, 7.522557},
  73. {267.119537, 1856.765136, 8.757812},
  74. {268.536376, 1883.993408, -30.093750}
  75. };
  76.  
  77. //=====================================
  78.  
  79. main()
  80. {
  81.  
  82. SetGameModeText("Area 51 DM!");
  83. //-----------------------------------------------
  84. print("\n----------------------------------");
  85. print(" Area 51 DM By [HiC]TheKiller ");
  86. print("----------------------------------\n");
  87. }
  88.  
  89. public OnGameModeInit()
  90. {
  91.  
  92. //--------Cars!
  93. hydra1=AddStaticVehicle(520,398.4401,2444.2346,17.2233,357.3300,0,0); //
  94. hydra2=AddStaticVehicle(520,408.1099,2443.8965,17.2293,358.5307,0,0); //
  95. AddStaticVehicle(548,364.9654,2534.3472,18.2595,359.7653,1,1); //
  96. hunter2=AddStaticVehicle(425,349.1158,2538.5947,17.3162,0.3601,43,0); //
  97. hunter1=AddStaticVehicle(425,381.0984,2538.3628,17.1197,357.6414,43,0); //
  98. rhyno=AddStaticVehicle(432,374.0586,2462.6494,16.4970,358.9620,43,0); //
  99. AddStaticVehicle(433,321.9156,2551.7671,17.2449,179.8232,43,0); //
  100. AddStaticVehicle(433,328.7147,2552.0676,17.2415,180.8896,43,0); //
  101. AddStaticVehicle(433,329.0340,2531.4309,17.2385,180.8802,43,0); //
  102. AddStaticVehicle(433,321.5755,2531.5159,17.2424,179.1689,43,0); //
  103. AddStaticVehicle(470,297.2685,2534.6160,16.8105,1.4194,43,0); //
  104. AddStaticVehicle(470,297.0826,2542.1182,16.8127,1.4168,43,0); //
  105. AddStaticVehicle(470,297.2028,2550.3567,16.8128,358.7809,43,0); //
  106. AddStaticVehicle(470,290.1027,2531.7046,16.8109,178.6389,43,0); //
  107. AddStaticVehicle(470,290.2718,2538.8044,16.8119,178.6365,43,0); //
  108. AddStaticVehicle(470,290.4342,2545.6152,16.8135,178.6346,43,0); //
  109. AddStaticVehicle(470,290.5776,2551.6213,16.8135,178.6324,43,0); //
  110. AddStaticVehicle(455,283.3560,2552.2463,17.2575,359.8944,84,58); //
  111. AddStaticVehicle(455,283.3209,2531.7029,17.2505,359.8981,84,58); //
  112. AddStaticVehicle(497,-574.9012,2625.0830,53.5886,271.8229,0,1); //
  113. AddStaticVehicle(596,-520.8088,2582.2642,53.1339,89.9921,0,1); //
  114. AddStaticVehicle(596,-520.8108,2576.9492,53.1354,88.1579,0,1); //
  115. AddStaticVehicle(596,-521.0120,2571.8594,53.1345,88.5019,0,1); //
  116. AddStaticVehicle(596,-521.3567,2566.8269,53.1354,88.9090,0,1); //
  117. AddStaticVehicle(596,-521.4574,2561.7126,53.1350,90.8526,0,1); //
  118. AddStaticVehicle(596,-521.5957,2556.5986,53.1350,89.4514,0,1); //
  119. AddStaticVehicle(523,-539.3915,2603.2832,52.9810,87.2383,0,0); //
  120. AddStaticVehicle(523,-540.3836,2606.3867,52.9812,90.7301,0,0); //
  121. AddStaticVehicle(523,-540.2418,2609.0022,52.9796,90.6848,0,0); //
  122. AddStaticVehicle(523,-540.4328,2611.3677,52.9801,88.8680,0,0); //
  123. AddStaticVehicle(523,-539.9841,2613.7148,52.9852,86.8997,0,0); //
  124. AddStaticVehicle(490,-526.6431,2607.0732,53.5427,177.4171,0,0); //
  125. AddStaticVehicle(490,-526.2021,2616.8582,53.5421,177.4168,0,0); //
  126. AddStaticVehicle(490,-527.8973,2579.2708,53.5405,177.4180,0,0); //
  127. AddStaticVehicle(490,-528.3642,2568.9075,53.5420,177.4182,0,0); //
  128. AddStaticVehicle(528,-540.7623,2548.3965,53.4596,270.0656,0,0); //
  129. AddStaticVehicle(555,-234.7445,2595.2427,62.3899,1.2786,13,1); //
  130. AddStaticVehicle(555,-237.4528,2595.1685,62.3878,357.3091,13,1); //
  131. AddStaticVehicle(415,-198.3344,2608.8669,62.4754,358.1694,75,1); //
  132. AddStaticVehicle(415,-204.3017,2608.4463,62.4780,1.7810,75,1); //
  133. AddStaticVehicle(411,-213.4360,2609.1538,62.4302,3.3195,112,1); //
  134. AddStaticVehicle(411,-228.1968,2607.9126,62.4302,3.3262,112,1); //
  135. AddStaticVehicle(603,-240.2451,2608.3728,62.5418,356.7434,75,77); //
  136. AddStaticVehicle(603,-244.0009,2595.9663,62.5782,6.4424,75,77); //
  137. ss1=AddStaticVehicle(447,-252.7227,2620.1201,62.9064,0.0074,75,2); //
  138. ss2=AddStaticVehicle(447,-234.0194,2620.5742,63.8802,346.5994,75,2); //
  139. ss3=AddStaticVehicle(447,-208.6853,2624.0674,63.1131,359.0009,75,2); //
  140. //--------Gangsta's
  141. AddPlayerClass(0,0,0,0,0,12,1,23,150,0,0);
  142. AddPlayerClass(105,0,0,0,0,12,1,23,150,0,0);
  143. AddPlayerClass(106,0,0,0,0,12,1,23,150,0,0);
  144. AddPlayerClass(107,0,0,0,0,12,1,23,150,0,0);
  145. //---------Cops
  146. AddPlayerClass(280,0,0,0,0,22,150,10,1,0,0);
  147. AddPlayerClass(282,0,0,0,0,22,150,10,1,0,0);
  148. AddPlayerClass(285,0,0,0,0,22,150,10,1,0,0);
  149. AddPlayerClass(286,0,0,0,0,22,150,10,1,0,0);
  150. //----- Other GM related stuff
  151. for(new i=0; i < MAX_PLAYERS; i++)
  152. TogglePlayerClock(i,false);
  153. SetTimer("timer",500000,true);
  154. SetTimer("level",500,true);
  155. area51=0;
  156. //======TEXTDRAW!
  157. TextCp = TextDrawCreate(544.000000,415.000000,"50");
  158. TextGa = TextDrawCreate(465.000000,416.000000,"50");
  159. Textdraw2 = TextDrawCreate(549.000000,401.000000,"Cops!");
  160. Textdraw3 = TextDrawCreate(459.000000,401.000000,"Gangsta's!");
  161. TextDrawAlignment(TextCp,0);
  162. TextDrawAlignment(TextGa,0);
  163. TextDrawAlignment(Textdraw2,0);
  164. TextDrawAlignment(Textdraw3,0);
  165. TextDrawBackgroundColor(TextCp,0x000000ff);
  166. TextDrawBackgroundColor(TextGa,0x000000ff);
  167. TextDrawBackgroundColor(Textdraw2,0x000000ff);
  168. TextDrawBackgroundColor(Textdraw3,0x000000ff);
  169. TextDrawFont(TextCp,1);
  170. TextDrawLetterSize(TextCp,0.899999,2.699999);
  171. TextDrawFont(TextGa,1);
  172. TextDrawLetterSize(TextGa,0.899999,2.499999);
  173. TextDrawFont(Textdraw2,3);
  174. TextDrawLetterSize(Textdraw2,0.499999,1.100000);
  175. TextDrawFont(Textdraw3,3);
  176. TextDrawLetterSize(Textdraw3,0.399999,1.100000);
  177. TextDrawColor(TextCp,0x0000ff99);
  178. TextDrawColor(TextGa,0x00ff0099);
  179. TextDrawColor(Textdraw2,0x0000ff99);
  180. TextDrawColor(Textdraw3,0x00ff0099);
  181. TextDrawSetOutline(TextCp,1);
  182. TextDrawSetOutline(TextGa,1);
  183. TextDrawSetOutline(Textdraw2,1);
  184. TextDrawSetOutline(Textdraw3,1);
  185. TextDrawSetProportional(TextCp,1);
  186. TextDrawSetProportional(TextGa,1);
  187. TextDrawSetProportional(Textdraw2,1);
  188. TextDrawSetProportional(Textdraw3,1);
  189. TextDrawSetShadow(TextCp,1);
  190. TextDrawSetShadow(TextGa,1);
  191. TextDrawSetShadow(Textdraw2,1);
  192. TextDrawSetShadow(Textdraw3,1);
  193. Scop=50;
  194. Sgangsta=50;
  195. print("The GM has started");
  196. return 1;
  197. }
  198.  
  199. //====================================
  200. public OnPlayerRequestClass(playerid, classid)
  201. {
  202. if (classid == 0 || classid == 1 || classid == 2 || classid == 3)
  203. {
  204. GameTextForPlayer(playerid, "~g~Gangsta's", 500, 3);
  205. SetPlayerInterior(playerid,0);
  206. SetPlayerPos(playerid,308.261749, 2528.727783, 16.816020);
  207. SetPlayerFacingAngle(playerid, 179.004608);
  208. SetPlayerCameraPos(playerid, 308.124847, 2523.134033, 16.750083);
  209. SetPlayerCameraLookAt(playerid, 308.261749, 2528.727783, 16.816020);
  210. gTeam[playerid] = TEAM_Gangsta;
  211. SetPlayerTeam(playerid,1);
  212. }
  213. else if (classid == 4 || classid == 5 || classid == 6 || classid == 7)
  214. {
  215. GameTextForPlayer(playerid, "~b~Cops", 500, 3);
  216. SetPlayerInterior(playerid,0);
  217. SetPlayerPos(playerid,-540.319152, 2594.131347, 53.415424);
  218. SetPlayerFacingAngle(playerid, 267.393981);
  219. SetPlayerCameraPos(playerid, -533.715393, 2593.737548, 53.415424);
  220. SetPlayerCameraLookAt(playerid, -540.319152, 2594.131347, 53.415424);
  221. gTeam[playerid] = TEAM_Cops;
  222. SetPlayerTeam(playerid,1);
  223. }
  224. return 1;
  225. }
  226.  
  227. //-------Team Colors
  228. SetPlayerToTeamColor(playerid)
  229. {
  230. if (gTeam[playerid] == TEAM_Gangsta)
  231. {
  232. SetPlayerTeam(playerid,1);
  233. SetPlayerColor(playerid, TEAM_Gangsta_COLOR);
  234. }
  235. else if (gTeam[playerid] == TEAM_Cops)
  236. {
  237. SetPlayerTeam(playerid,2);
  238. SetPlayerColor(playerid, TEAM_Cops_COLOR);
  239. }
  240. }
  241.  
  242. public OnPlayerConnect(playerid)
  243. {
  244. //-------- Connect message
  245. SendClientMessage(playerid, 0x0ED0FF, "Welcome thsi server is currently running Area 51 DM 0.1 created by [HiC]TheKiller.");
  246. SendClientMessage(playerid, 0xFFFFF7FF, "This is a Gamemode where you have to kill people to earn points and gain levels. /levels to check the points for each level");
  247. SendClientMessage(playerid, 0xFFFFF7FF, "/Commands is our current server commands!");
  248. //--------------World bounds
  249. SetPlayerWorldBounds(playerid, 817.4513, -735.7062, 2849.402, 513.8265);
  250. LVL[playerid] = 0;
  251. Score[playerid] = 0;
  252. TextDrawShowForAll(TextCp); TextDrawShowForAll(TextGa); TextDrawShowForAll(Textdraw2); TextDrawShowForAll(Textdraw3);
  253. if (area51==1)
  254. {
  255. for(new i=0; i < MAX_PLAYERS; i++)
  256. {
  257. SetPlayerCheckpoint(i,Checkpoint,Checkpoint1,Checkpoint2,3);
  258. }
  259. }
  260. return 1;
  261. }
  262.  
  263. public OnPlayerDisconnect(playerid)
  264. {
  265.  
  266. return 1;
  267. }
  268.  
  269.  
  270. public OnPlayerSpawn(playerid)
  271. {
  272. TextDrawShowForAll(TextCp); TextDrawShowForAll(TextGa); TextDrawShowForAll(Textdraw2); TextDrawShowForAll(Textdraw3);
  273. //===== Levels
  274. if(GetPlayerScore(playerid) >= 50)
  275. {
  276. LVL[playerid] = 1;
  277. }
  278.  
  279. if(GetPlayerScore(playerid) >= 110)
  280. {
  281. LVL[playerid] = 2;
  282. }
  283.  
  284. if(GetPlayerScore(playerid) >= 180)
  285. {
  286. LVL[playerid] = 3;
  287. }
  288.  
  289. if(GetPlayerScore(playerid) >= 260)
  290. {
  291. LVL[playerid] = 4;
  292. }
  293.  
  294. if(GetPlayerScore(playerid) >= 340)
  295. {
  296. LVL[playerid] = 5;
  297. }
  298.  
  299. if(GetPlayerScore(playerid) >= 450)
  300. {
  301. LVL[playerid] = 6;
  302. }
  303.  
  304. if(GetPlayerScore(playerid) >= 590)
  305. {
  306. LVL[playerid] = 7;
  307. }
  308.  
  309. if(GetPlayerScore(playerid) >= 730)
  310. {
  311. LVL[playerid] = 8;
  312. }
  313.  
  314. if(GetPlayerScore(playerid) >= 890)
  315. {
  316. LVL[playerid] = 9;
  317. }
  318.  
  319. if(GetPlayerScore(playerid) >= 1200)
  320. {
  321. LVL[playerid] = 10;
  322. }
  323.  
  324. //=====Vehicle locks!
  325. if (LVL[playerid]==10)
  326. {
  327. SetVehicleParamsForPlayer(hydra1,playerid,0,0);
  328. SetVehicleParamsForPlayer(hydra2,playerid,0,0);
  329. }
  330. else
  331. {
  332. SetVehicleParamsForPlayer(hydra1,playerid,0,1);
  333. SetVehicleParamsForPlayer(hydra2,playerid,0,1);
  334. }
  335. if (LVL[playerid]==9 || LVL[playerid]==10)
  336. {
  337. SetVehicleParamsForPlayer(hunter1,playerid,0,0);
  338. SetVehicleParamsForPlayer(hunter2,playerid,0,0);
  339. }
  340. else
  341. {
  342. SetVehicleParamsForPlayer(hunter1,playerid,0,1);
  343. SetVehicleParamsForPlayer(hunter2,playerid,0,1);
  344. }
  345.  
  346. if (LVL[playerid]==6 || LVL[playerid]==7 || LVL[playerid]==8|| LVL[playerid]==9|| LVL[playerid]==10)
  347. {
  348. SetVehicleParamsForPlayer(rhyno,playerid,0,0);
  349. }
  350. else
  351. {
  352. SetVehicleParamsForPlayer(rhyno,playerid,0,1);
  353. }
  354.  
  355. if (SpecialSpawn[playerid]==1)
  356. {
  357. SetVehicleParamsForPlayer(ss2,playerid,0,0);
  358. SetVehicleParamsForPlayer(ss3,playerid,0,0);
  359. SetVehicleParamsForPlayer(ss1,playerid,0,0);
  360. }
  361. else
  362. {
  363. SetVehicleParamsForPlayer(ss2,playerid,0,1);
  364. SetVehicleParamsForPlayer(ss3,playerid,0,1);
  365. SetVehicleParamsForPlayer(ss1,playerid,0,1);
  366. }
  367.  
  368. SetPlayerToTeamColor(playerid);
  369. SetPlayerHealth(playerid,50);
  370.  
  371. //=====Spwans!
  372. if (gTeam[playerid] == TEAM_Gangsta && SpecialSpawn[playerid]==0)
  373. {
  374. new iRandom = random(3);
  375. SetPlayerPos(playerid, RandomSpawnGang[iRandom][0], RandomSpawnGang[iRandom][1],
  376. RandomSpawnGang[iRandom][2]);
  377. SetPlayerFacingAngle(playerid, RandomSpawnGang[iRandom][3]);
  378. }
  379.  
  380. if (gTeam[playerid] == TEAM_Cops && SpecialSpawn[playerid]==0)
  381. {
  382. new iRandom = random(3);
  383. SetPlayerPos(playerid, RandomSpawnCops[iRandom][0], RandomSpawnCops[iRandom][1],
  384. RandomSpawnCops[iRandom][2]);
  385. SetPlayerFacingAngle(playerid, RandomSpawnCops[iRandom][3]);
  386. }
  387.  
  388. if(SpecialSpawn[playerid]==1)
  389. {
  390. SetPlayerPos(playerid,-253.7227,2620.1201,62.9064);
  391. }
  392.  
  393. //-------ARea 51 spawn
  394. if (area51==1&&Area51G==1)
  395. {
  396. if(gTeam[playerid]==TEAM_Gangsta)
  397. {
  398. SetPlayerPos(playerid,254.884613, 1912.585937, 245.541671);
  399. GivePlayerWeapon(playerid,46,1);
  400. }
  401.  
  402.  
  403. if (area51==1&&Area51C==1)
  404. {
  405. if(gTeam[playerid]==TEAM_Cops)
  406. {
  407. SetPlayerPos(playerid,254.884613, 1912.585937, 245.541671);
  408. GivePlayerWeapon(playerid,46,1);
  409. }
  410. }
  411. }
  412.  
  413. //-------Weapons and armour
  414. if (LVL[playerid]==2&& gTeam[playerid] == TEAM_Cops)
  415. {
  416. GivePlayerWeapon(playerid,4,1);
  417. GivePlayerWeapon(playerid,42,1000);
  418. SetPlayerHealth(playerid,75);
  419. }
  420.  
  421. if (LVL[playerid]==2&& gTeam[playerid] == TEAM_Gangsta)
  422. {
  423. GivePlayerWeapon(playerid,4,1);
  424. GivePlayerWeapon(playerid,41,1000);
  425. SetPlayerHealth(playerid,75);
  426. }
  427.  
  428. if (LVL[playerid]==1&& gTeam[playerid] == TEAM_Gangsta)
  429. {
  430. GivePlayerWeapon(playerid,41,1000);
  431. SetPlayerHealth(playerid,65);
  432. }
  433.  
  434. if (LVL[playerid]==1&& gTeam[playerid] == TEAM_Cops)
  435. {
  436. GivePlayerWeapon(playerid,42,1000);
  437. SetPlayerHealth(playerid,65);
  438. }
  439.  
  440. if (LVL[playerid]==3&& gTeam[playerid] == TEAM_Gangsta)
  441. {
  442. GivePlayerWeapon(playerid,24,300);
  443. GivePlayerWeapon(playerid,25,1);
  444. GivePlayerWeapon(playerid,41,1000);
  445. SetPlayerHealth(playerid,85);
  446. }
  447.  
  448. if (LVL[playerid]==3&& gTeam[playerid] == TEAM_Cops)
  449. {
  450. GivePlayerWeapon(playerid,24,300);
  451. GivePlayerWeapon(playerid,29,1);
  452. GivePlayerWeapon(playerid,42,1000);
  453. SetPlayerHealth(playerid,85);
  454. }
  455.  
  456.  
  457. if (LVL[playerid]==4&& gTeam[playerid] == TEAM_Gangsta)
  458. {
  459. GivePlayerWeapon(playerid,33,300);
  460. GivePlayerWeapon(playerid,24,300);
  461. GivePlayerWeapon(playerid,25,1);
  462. GivePlayerWeapon(playerid,41,1000);
  463. SetPlayerHealth(playerid,100);
  464. }
  465.  
  466. if (LVL[playerid]==4&& gTeam[playerid] == TEAM_Cops)
  467. {
  468. GivePlayerWeapon(playerid,27,300);
  469. GivePlayerWeapon(playerid,24,300);
  470. GivePlayerWeapon(playerid,29,1);
  471. GivePlayerWeapon(playerid,42,1000);
  472. SetPlayerHealth(playerid,100);
  473. }
  474.  
  475. if (LVL[playerid]==5&& gTeam[playerid] == TEAM_Gangsta)
  476. {
  477. GivePlayerWeapon(playerid,26,800);
  478. GivePlayerWeapon(playerid,33,300);
  479. GivePlayerWeapon(playerid,24,300);
  480. GivePlayerWeapon(playerid,25,1);
  481. GivePlayerWeapon(playerid,41,1000);
  482. SetPlayerHealth(playerid,100);
  483. SetPlayerArmour(playerid,10);
  484. }
  485.  
  486. if (LVL[playerid]==5&& gTeam[playerid] == TEAM_Cops)
  487. {
  488. GivePlayerWeapon(playerid,26,800);
  489. GivePlayerWeapon(playerid,27,300);
  490. GivePlayerWeapon(playerid,24,300);
  491. GivePlayerWeapon(playerid,29,1);
  492. GivePlayerWeapon(playerid,42,1000);
  493. SetPlayerHealth(playerid,100);
  494. SetPlayerArmour(playerid,10);
  495. }
  496.  
  497. if (LVL[playerid]==6&& gTeam[playerid] == TEAM_Gangsta)
  498. {
  499. GivePlayerWeapon(playerid,28,3000);
  500. GivePlayerWeapon(playerid,26,800);
  501. GivePlayerWeapon(playerid,33,300);
  502. GivePlayerWeapon(playerid,24,300);
  503. GivePlayerWeapon(playerid,25,1);
  504. GivePlayerWeapon(playerid,41,1000);
  505. SetPlayerHealth(playerid,100);
  506. SetPlayerArmour(playerid,30);
  507. }
  508.  
  509. if (LVL[playerid]==6&& gTeam[playerid] == TEAM_Cops)
  510. {
  511. GivePlayerWeapon(playerid,32,3000);
  512. GivePlayerWeapon(playerid,26,800);
  513. GivePlayerWeapon(playerid,27,300);
  514. GivePlayerWeapon(playerid,24,300);
  515. GivePlayerWeapon(playerid,29,1);
  516. GivePlayerWeapon(playerid,42,1000);
  517. SetPlayerHealth(playerid,100);
  518. SetPlayerArmour(playerid,30);
  519. }
  520.  
  521. if (LVL[playerid]==7&& gTeam[playerid] == TEAM_Gangsta)
  522. {
  523. GivePlayerWeapon(playerid,30,1000);
  524. GivePlayerWeapon(playerid,28,3000);
  525. GivePlayerWeapon(playerid,26,800);
  526. GivePlayerWeapon(playerid,33,300);
  527. GivePlayerWeapon(playerid,24,300);
  528. GivePlayerWeapon(playerid,25,1);
  529. GivePlayerWeapon(playerid,41,1000);
  530. SetPlayerHealth(playerid,100);
  531. SetPlayerArmour(playerid,40);
  532. }
  533.  
  534. if (LVL[playerid]==7&& gTeam[playerid] == TEAM_Cops)
  535. {
  536. GivePlayerWeapon(playerid,31,1000);
  537. GivePlayerWeapon(playerid,32,3000);
  538. GivePlayerWeapon(playerid,26,800);
  539. GivePlayerWeapon(playerid,27,300);
  540. GivePlayerWeapon(playerid,24,300);
  541. GivePlayerWeapon(playerid,29,1);
  542. GivePlayerWeapon(playerid,42,1000);
  543. SetPlayerHealth(playerid,100);
  544. SetPlayerArmour(playerid,40);
  545. }
  546.  
  547. if (LVL[playerid]==8&& gTeam[playerid] == TEAM_Gangsta)
  548. {
  549. GivePlayerWeapon(playerid,34,300);
  550. GivePlayerWeapon(playerid,30,1000);
  551. GivePlayerWeapon(playerid,28,3000);
  552. GivePlayerWeapon(playerid,26,800);
  553. GivePlayerWeapon(playerid,33,300);
  554. GivePlayerWeapon(playerid,24,300);
  555. GivePlayerWeapon(playerid,25,1);
  556. GivePlayerWeapon(playerid,41,1000);
  557. SetPlayerHealth(playerid,100);
  558. SetPlayerArmour(playerid,70);
  559. }
  560.  
  561. if (LVL[playerid]==8&& gTeam[playerid] == TEAM_Cops)
  562. {
  563. GivePlayerWeapon(playerid,34,300);
  564. GivePlayerWeapon(playerid,31,1000);
  565. GivePlayerWeapon(playerid,32,3000);
  566. GivePlayerWeapon(playerid,26,800);
  567. GivePlayerWeapon(playerid,27,300);
  568. GivePlayerWeapon(playerid,24,300);
  569. GivePlayerWeapon(playerid,29,1);
  570. GivePlayerWeapon(playerid,42,1000);
  571. GivePlayerWeapon(playerid,16,100);
  572. SetPlayerHealth(playerid,100);
  573. SetPlayerArmour(playerid,70);
  574. }
  575.  
  576. if (LVL[playerid]==9&& gTeam[playerid] == TEAM_Gangsta)
  577. {
  578. GivePlayerWeapon(playerid,37,500);
  579. GivePlayerWeapon(playerid,34,300);
  580. GivePlayerWeapon(playerid,30,1000);
  581. GivePlayerWeapon(playerid,28,3000);
  582. GivePlayerWeapon(playerid,26,800);
  583. GivePlayerWeapon(playerid,33,300);
  584. GivePlayerWeapon(playerid,24,300);
  585. GivePlayerWeapon(playerid,25,1);
  586. GivePlayerWeapon(playerid,41,1000);
  587. GivePlayerWeapon(playerid,18,100);
  588. SetPlayerHealth(playerid,100);
  589. SetPlayerArmour(playerid,80);
  590. }
  591.  
  592. if (LVL[playerid]==9&& gTeam[playerid] == TEAM_Cops)
  593. {
  594. GivePlayerWeapon(playerid,37,500);
  595. GivePlayerWeapon(playerid,34,300);
  596. GivePlayerWeapon(playerid,31,1000);
  597. GivePlayerWeapon(playerid,32,3000);
  598. GivePlayerWeapon(playerid,26,800);
  599. GivePlayerWeapon(playerid,27,300);
  600. GivePlayerWeapon(playerid,24,300);
  601. GivePlayerWeapon(playerid,29,1);
  602. GivePlayerWeapon(playerid,42,1000);
  603. SetPlayerHealth(playerid,100);
  604. SetPlayerArmour(playerid,80);
  605. }
  606.  
  607. if (LVL[playerid]==10&& gTeam[playerid] == TEAM_Gangsta)
  608. {
  609. GivePlayerWeapon(playerid,37,500);
  610. GivePlayerWeapon(playerid,34,300);
  611. GivePlayerWeapon(playerid,30,1000);
  612. GivePlayerWeapon(playerid,28,3000);
  613. GivePlayerWeapon(playerid,26,800);
  614. GivePlayerWeapon(playerid,33,300);
  615. GivePlayerWeapon(playerid,24,300);
  616. GivePlayerWeapon(playerid,25,1);
  617. GivePlayerWeapon(playerid,41,1000);
  618. GivePlayerWeapon(playerid,35,100);
  619. SetPlayerHealth(playerid,100);
  620. SetPlayerArmour(playerid,100);
  621. }
  622.  
  623. if (LVL[playerid]==10&& gTeam[playerid] == TEAM_Cops)
  624. {
  625.  
  626. GivePlayerWeapon(playerid,37,500);
  627. GivePlayerWeapon(playerid,34,300);
  628. GivePlayerWeapon(playerid,31,1000);
  629. GivePlayerWeapon(playerid,32,3000);
  630. GivePlayerWeapon(playerid,26,800);
  631. GivePlayerWeapon(playerid,27,300);
  632. GivePlayerWeapon(playerid,24,300);
  633. GivePlayerWeapon(playerid,29,1);
  634. GivePlayerWeapon(playerid,42,1000);
  635. GivePlayerWeapon(playerid,35,100);
  636. SetPlayerHealth(playerid,100);
  637. SetPlayerArmour(playerid,100);
  638. }
  639. return 1;
  640. }
  641.  
  642. forward timer();
  643.  
  644. public timer()
  645. {
  646. SetTimer("timer2",60000,false);
  647. renegade =1;
  648. GameTextForAll("~B~RENEGADE!! (Double Points!)",5000,1);
  649. return 1;
  650. }
  651.  
  652. forward timer2();
  653.  
  654. public timer2()
  655. {
  656. GameTextForAll("~B~Renegade Finished!",5000,1);
  657. renegade=0;
  658. return 1;
  659. }
  660.  
  661. forward level();
  662. public level()
  663. {
  664. for(new i=0; i < MAX_PLAYERS; i++)
  665. {
  666. if(GetPlayerScore(i) >= 50 && LVL[i] == 0)
  667. {
  668. GameTextForPlayer(i, "~b~Leveling!", 500, 3);
  669. SendClientMessage(i,0x0660FF,"You are now level 1 You will get new weapons next spawn!");
  670. LVL[i] = 1;
  671. }
  672.  
  673. if(GetPlayerScore(i) >= 110 && LVL[i] == 1)
  674. {
  675. GameTextForPlayer(i, "~b~Leveling!", 500, 3);
  676. SendClientMessage(i,0x0660FF,"You are now level 2 You will get new weapons next spawn!");
  677. LVL[i] = 2;
  678. }
  679.  
  680. if(GetPlayerScore(i) >= 180 && LVL[i] == 2)
  681. {
  682. GameTextForPlayer(i, "~b~Leveling!", 500, 3);
  683. SendClientMessage(i,0x0660FF,"You are now level 3 You will get new weapons next spawn!");
  684. LVL[i] = 3;
  685. }
  686.  
  687. if(GetPlayerScore(i) >= 260 && LVL[i] == 3)
  688. {
  689. GameTextForPlayer(i, "~b~Leveling!", 500, 3);
  690. SendClientMessage(i,0x0660FF,"You are now level 4 You will get new weapons next spawn!");
  691. LVL[i] = 4;
  692. }
  693.  
  694. if(GetPlayerScore(i) >= 340 && LVL[i] == 4)
  695. {
  696. GameTextForPlayer(i, "~b~Leveling!", 500, 3);
  697. SendClientMessage(i,0x0660FF,"You are now level 5 You will get new weapons next spawn!");
  698. LVL[i] = 5;
  699. }
  700.  
  701. if(GetPlayerScore(i) >= 450 && LVL[i] == 5)
  702. {
  703. GameTextForPlayer(i, "~b~Leveling!", 500, 3);
  704. SendClientMessage(i,0x0660FF,"You are now level 6 You will get new weapons next spawn!");
  705. LVL[i] = 6;
  706. }
  707.  
  708. if(GetPlayerScore(i) >= 590 && LVL[i] == 6)
  709. {
  710. GameTextForPlayer(i, "~b~Leveling!", 500, 3);
  711. SendClientMessage(i,0x0660FF,"You are now level 7 You will get new weapons next spawn!");
  712. LVL[i] = 7;
  713. }
  714.  
  715. if(GetPlayerScore(i) >= 730 && LVL[i] == 7)
  716. {
  717. GameTextForPlayer(i, "~b~Leveling!", 500, 3);
  718. SendClientMessage(i,0x0660FF,"You are now level 8 You will get new weapons next spawn!");
  719. LVL[i] = 8;
  720. }
  721.  
  722. if(GetPlayerScore(i) >= 890 && LVL[i] == 8)
  723. {
  724. GameTextForPlayer(i, "~b~Leveling!", 500, 3);
  725. SendClientMessage(i,0x0660FF,"You are now level 9 You will get new weapons next spawn!");
  726. LVL[i] = 9;
  727. }
  728.  
  729. if(GetPlayerScore(i) >= 1200 && LVL[i] == 9)
  730. {
  731. GameTextForPlayer(i, "~b~Leveling!", 500, 3);
  732. SendClientMessage(i,0x0660FF,"You are now level 10 You will get new weapons next spawn!");
  733. LVL[i] = 10;
  734. }
  735.  
  736. if(!IsPlayerInCheckpoint(i))
  737. {
  738. KillTimer(tm1);
  739. KillTimer(tm2);
  740. }
  741. }
  742. return 1;
  743. }
  744.  
  745. public OnPlayerDeath(playerid, killerid, reason)
  746. {
  747. if (gTeam[playerid]==TEAM_Cops)
  748. {
  749. Scop--;
  750. }
  751. if(gTeam[playerid]==TEAM_Gangsta)
  752. {
  753. Sgangsta --;
  754. }
  755. SendDeathMessage(killerid, playerid, reason);
  756. new string1[5], string[5];
  757. valstr(string, Scop);
  758. TextDrawSetString(TextCp, string);
  759. valstr(string1, Sgangsta);
  760. TextDrawSetString(TextGa, string1);
  761.  
  762. if(Scop==0 && area51==0)
  763. {
  764. for(new i=0; i < MAX_PLAYERS; i++)
  765. {
  766. SendClientMessage(i,0x0660FF,"Gangsta's have WON the round! Cops spawn at area51!");
  767. GameTextForAll("~r~Area51!",5000,3);
  768. Scop=51;
  769. Sgangsta=51;
  770. new string2[5];
  771. valstr(string2, Scop);
  772. TextDrawSetString(TextCp, string2);
  773. valstr(string2, Sgangsta);
  774. TextDrawSetString(TextGa, string2);
  775. new iRandom = random(5);
  776. DisablePlayerCheckpoint(i);
  777. Checkpoint = CPS[iRandom][0] ,Checkpoint1 = CPS[iRandom][1], Checkpoint2 = CPS[iRandom][2];
  778. SetPlayerCheckpoint(i,Checkpoint,Checkpoint1,Checkpoint2,3);
  779. area51=1;
  780. Area51C=1;
  781. }
  782. }
  783.  
  784. if(Sgangsta==0 && area51==0)
  785. {
  786. for(new i=0; i < MAX_PLAYERS; i++)
  787. {
  788. SendClientMessage(i,0x0660FF,"Cops have WON! Gangsta's spawn at area51");
  789. GameTextForAll("~r~Area51!",5000,3);
  790. Scop=51;
  791. Sgangsta=51;
  792. new string3[5];
  793. valstr(string3, Scop);
  794. TextDrawSetString(TextCp, string3);
  795. valstr(string3, Sgangsta);
  796. TextDrawSetString(TextGa, string3);
  797. new iRandom = random(5);
  798. DisablePlayerCheckpoint(i);
  799. Checkpoint = CPS[iRandom][0] ,Checkpoint1 = CPS[iRandom][1], Checkpoint2 = CPS[iRandom][2];
  800. SetPlayerCheckpoint(i,Checkpoint,Checkpoint1,Checkpoint2,3);
  801. area51=1;
  802. Area51G=1;
  803. }
  804. }
  805.  
  806. if(Scop==0 && area51==1)
  807. {
  808. for(new i=0; i < MAX_PLAYERS; i++)
  809. {
  810. SendClientMessage(i,0x0660FF,"Gangsta's has WON!");
  811. GameTextForAll("~G~Gangsta's Have Won!!!",4000,3);
  812. Scop=51;
  813. Sgangsta=51;
  814. new string4[5];
  815. valstr(string4, Scop);
  816. TextDrawSetString(TextCp, string4);
  817. valstr(string4, Sgangsta);
  818. TextDrawSetString(TextGa, string4);
  819. SpawnPlayer(i);
  820. DisablePlayerCheckpoint(i);
  821. KillTimer(tm2);
  822. KillTimer(tm1);
  823. Area51G=0;
  824. Area51C=0;
  825. area51=0;
  826. if(gTeam[i]==TEAM_Gangsta)
  827. {
  828. SetPlayerScore(i, GetPlayerScore(i)+5);
  829. SendClientMessage(i,0x0660FF,"Everyone in team Gangsta has been given 5 points!");
  830. }
  831. }
  832. }
  833.  
  834. if(Sgangsta==0 && area51==1)
  835. {
  836. for(new i=0; i < MAX_PLAYERS; i++)
  837. {
  838. SendClientMessage(i,0x0660FF,"Cops have WON!");
  839. GameTextForAll("~b~Cops Have Won!!!",4000,3);
  840. Scop=51;
  841. Sgangsta=51;
  842. new string5[5];
  843. valstr(string5, Scop);
  844. TextDrawSetString(TextCp, string5);
  845. valstr(string5, Sgangsta);
  846. TextDrawSetString(TextGa, string5);
  847. SpawnPlayer(i);
  848. DisablePlayerCheckpoint(i);
  849. KillTimer(tm2);
  850. KillTimer(tm1);
  851. Area51G=0;
  852. Area51C=0;
  853. area51=0;
  854. if(gTeam[i]==TEAM_Cops)
  855. {
  856. SetPlayerScore(i, GetPlayerScore(i)+5);
  857. SendClientMessage(i,0x0660FF,"Everyone in team Cops has been given 5 points!");
  858. }
  859. }
  860. return 1;
  861. }
  862.  
  863. // Kills!
  864. if(killerid != INVALID_PLAYER_ID)
  865. {
  866. new iRandom = random(6);
  867. SetPlayerScore(killerid, GetPlayerScore(killerid)+RandomKill[iRandom][0]);
  868.  
  869. if (renegade==1)
  870. {
  871. new iRandom2 = random(6);
  872. SetPlayerScore(killerid, GetPlayerScore(killerid)+RandomKillR[iRandom2][0]);
  873. }
  874. else if (area51==1)
  875. {
  876. new iRandom2 = random(6);
  877. SetPlayerScore(killerid, GetPlayerScore(killerid)+RandomKillR[iRandom2][0]);
  878. }
  879. }
  880. return 1;
  881. }
  882.  
  883.  
  884. public OnPlayerCommandText(playerid, cmdtext[])
  885. {
  886. if (strcmp("/kill", cmdtext, true, 10) == 0)
  887. {
  888. SetPlayerHealth(playerid,0);
  889. return 1;
  890. }
  891.  
  892. #define SCMP SendClientMessage(playerid,
  893. if (strcmp("/Levels", cmdtext, true, 10) == 0)
  894. {
  895. SCMP 0xF4FFFFFF,"Level 1: [50 Score] \n Level 2: [110 Score]");
  896. SCMP 0xF4FFFFFF,"Level 3: [180 Score] \n Level 4: [260 Score]");
  897. SCMP 0xF4FFFFFF,"Level 5: [340 Score] \n Level 6: [450 Score]");
  898. SCMP 0xF4FFFFFF,"Level 7: [590 Score] \n Level 8: [730 Score]");
  899. SCMP 0xF4FFFFFF,"Level 9: [890 Score] \n Level 10: [1200 Score]");
  900. return 1;
  901. }
  902.  
  903. if (strcmp("/Commands", cmdtext, true, 10) == 0)
  904. {
  905. SCMP 0x0660FF,"Commands:");
  906. SCMP 0xF4FFFFFF,"/Level [ID] -Shows the players level! ");
  907. SCMP 0xF4FFFFFF,"/Levels -Is a list of the scores for leveling!");
  908. SCMP 0xF4FFFFFF,"/Commands - Its a list of commands!");
  909. SCMP 0xF4FFFFFF,"/Kill - Kills yourself!");
  910. if(IsPlayerAdmin(playerid))
  911. {
  912. SCMP 0x0660FF,"Admin Commands:");
  913. SCMP 0xF414FFFF,"/LevelSet [playerid] [Level] -Sets a playes level!");
  914. SCMP 0xF414FFFF,"/Area51 - Starts area51! /Renegade - Starts renegade!");
  915. SCMP 0xF414FFFF,"/CopsScore [Score]- Changes the cops score on the score board!");
  916. SCMP 0xF414FFFF,"/GangScore [Score]- Changes the Gang's score on the score board!");
  917. SCMP 0xF414FFFF,"/TakeScore [playerid] [Score]- Takes the score off the player!");
  918. SCMP 0xF414FFFF,"/GiveScore [playerid] [Score]- Gives the player the score!");
  919. SCMP 0xF414FFFF,"/SetScore [playerid] [Score]- Sets the players score!");
  920. SCMP 0xF414FFFF,"/SpecialSpawn [playerid]- Gives the player special spawn privlages!");
  921. }
  922. return 1;
  923. }
  924.  
  925. //------DCMD Commands
  926. dcmd(level, 5, cmdtext);
  927. dcmd(LevelSet, 8, cmdtext);
  928. dcmd(Area51, 6, cmdtext);
  929. dcmd(Renegade, 8, cmdtext);
  930. dcmd(CopsScore, 9, cmdtext);
  931. dcmd(GangScore, 9, cmdtext);
  932. dcmd(TakeScore, 9, cmdtext);
  933. dcmd(GiveScore, 9, cmdtext);
  934. dcmd(SetScore, 8, cmdtext);
  935. dcmd(SpecialSpawn, 12, cmdtext);
  936. return 0;
  937. }
  938.  
  939. dcmd_level(playerid, params[])
  940. {
  941. new id, pname[24] ,string[256];
  942. if (sscanf(params, "d", id))
  943. return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/Level <playerid>\"");
  944. else if (!IsPlayerConnected(id))
  945. return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  946. else
  947. {
  948. GetPlayerName(id,pname,24);
  949. format(string, sizeof (string), "%s is level %d",pname,LVL[id]);
  950. SendClientMessage(playerid,0x0660FF,string);
  951. }
  952. return 1;
  953. }
  954.  
  955. dcmd_Area51(playerid, params[]) //Starts Area51
  956. {
  957. #pragma unused params
  958. if (!IsPlayerAdmin(playerid))
  959. return SendClientMessage(playerid, 0xFF0000AA, "You are not admin");
  960. else
  961. {
  962. for(new i=0; i < MAX_PLAYERS; i++)
  963. {
  964. new iRandom = random(5);
  965. GameTextForAll("~r~Area51!",5000,3);
  966. KillTimer(tm2);
  967. KillTimer(tm1);
  968. DisablePlayerCheckpoint(i);
  969. Checkpoint = CPS[iRandom][0] ,Checkpoint1 = CPS[iRandom][1], Checkpoint2 = CPS[iRandom][2];
  970. SetPlayerCheckpoint(i,Checkpoint,Checkpoint1,Checkpoint2,3);
  971. area51=1;
  972. }
  973. }
  974. return 1;
  975. }
  976.  
  977. dcmd_Renegade(playerid, params[]) //Starts Renegade
  978. {
  979. #pragma unused params
  980. if (!IsPlayerAdmin(playerid))
  981. return SendClientMessage(playerid, 0xFF0000AA, "You are not admin");
  982. else
  983. {
  984. SetTimer("timer2",60000,false);
  985. renegade =1;
  986. GameTextForAll("RENEGADE!! (Double Points!)",5000,1);
  987. }
  988. return 1;
  989. }
  990.  
  991. dcmd_SetScore(playerid, params[])
  992. {
  993. new score1,id,string[256],Pname[24];
  994. GetPlayerName(playerid,Pname,24);
  995. if (sscanf(params, "d,i", id,score1))
  996. return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/SetScore <Playerid> <Score>\"");
  997. if (!IsPlayerAdmin(playerid))
  998. return SendClientMessage(playerid, 0xFF0000AA, "You are not admin");
  999. else if (!IsPlayerConnected(id))
  1000. return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  1001. else
  1002. {
  1003. SetPlayerScore(id,score1);
  1004. format(string, sizeof (string), "%s has set your score to %d",Pname,score1);
  1005. SendClientMessage(id,0x0660FF,string);
  1006. }
  1007. return 1;
  1008. }
  1009.  
  1010. dcmd_SpecialSpawn(playerid, params[])
  1011. {
  1012. new id,Pname[24],string[256];
  1013. GetPlayerName(playerid,Pname,24);
  1014. if (sscanf(params, "d", id))
  1015. return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/SpecialSpawn <Playerid>\"");
  1016. if (!IsPlayerAdmin(playerid))
  1017. return SendClientMessage(playerid, 0xFF0000AA, "You are not admin");
  1018. else if (!IsPlayerConnected(id))
  1019. return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  1020. else
  1021. {
  1022. SpecialSpawn[id]=1;
  1023. format(string, sizeof (string), "%s has given you special spawn privlages!",Pname);
  1024. SendClientMessage(id,0x0660FF,string);
  1025. }
  1026. return 1;
  1027. }
  1028.  
  1029. dcmd_GiveScore(playerid, params[])
  1030. {
  1031. new score1,id,string[256],Pname[24];
  1032. GetPlayerName(playerid,Pname,24);
  1033. if (sscanf(params, "d,i", id,score1))
  1034. return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/GiveScore <Playerid> <Score>\"");
  1035. else if (!IsPlayerConnected(id))
  1036. return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  1037. if (!IsPlayerAdmin(playerid))
  1038. return SendClientMessage(playerid, 0xFF0000AA, "You are not admin");
  1039. else
  1040. {
  1041. SetPlayerScore(id,GetPlayerScore(id)+score1);
  1042. format(string, sizeof (string), "%s has given you %i score",Pname,score1);
  1043. SendClientMessage(id,0x0660FF,string);
  1044. }
  1045. return 1;
  1046. }
  1047.  
  1048. dcmd_TakeScore(playerid, params[])
  1049. {
  1050. new score1,id,string[256],Pname[24];
  1051. GetPlayerName(playerid,Pname,24);
  1052. if (sscanf(params, "d,i", id,score1))
  1053. return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/TakeScore <Playerid> <Score>\"");
  1054. if (!IsPlayerAdmin(playerid))
  1055. return SendClientMessage(playerid, 0xFF0000AA, "You are not admin");
  1056. else if (!IsPlayerConnected(id))
  1057. return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  1058. else
  1059. {
  1060. SetPlayerScore(id,GetPlayerScore(id)-score1);
  1061. format(string, sizeof (string), "%s has taken %s score off you!",Pname,score1);
  1062. SendClientMessage(id,0x0660FF,string);
  1063. }
  1064. return 1;
  1065. }
  1066.  
  1067. dcmd_LevelSet(playerid, params[])
  1068. {
  1069. new id,LVL2 ,string[256],name[24],Pname[24];
  1070. GetPlayerName(playerid,name,24);
  1071. GetPlayerName(id,Pname,24);
  1072. if (sscanf(params, "d,i", id,LVL2))
  1073. return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/LevelSet <playerid> <level>\"");
  1074. else if (!IsPlayerConnected(id))
  1075. return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  1076. else if (!IsPlayerAdmin(playerid))
  1077. return SendClientMessage(playerid, 0xFF0000AA, "You are not admin");
  1078. else if (LVL2>10&&LVL2<0)
  1079. return SendClientMessage(playerid, 0xFF0000AA, "Levels are between 0-10!");
  1080. else if (LVL2==0)
  1081. {
  1082. LVL[id] =0;
  1083. format(string, sizeof (string), "%s has set you to level 0",name);
  1084. SetPlayerScore(id,0);
  1085. SendClientMessage(id,0x0660FF,string);
  1086. }
  1087. else if (LVL2==1)
  1088. {
  1089. LVL[id] =1;
  1090. format(string, sizeof (string), "%s has set you to level 1",name);
  1091. SendClientMessage(id,0x0660FF,string);
  1092. SetPlayerScore(id,50);
  1093. }
  1094. else if (LVL2==2)
  1095. {
  1096. LVL[id] =2;
  1097. format(string, sizeof (string), "%s has set you to level 2",name);
  1098. SendClientMessage(id,0x0660FF,string);
  1099. SetPlayerScore(id,110);
  1100. }
  1101. else if (LVL2==3){
  1102. LVL[id] =3;
  1103. format(string, sizeof (string), "%s has set you to level 3",name);
  1104. SendClientMessage(id,0x0660FF,string);
  1105. SetPlayerScore(id,180);
  1106. }
  1107. else if (LVL2==4)
  1108. {
  1109. LVL[id] =4;
  1110. format(string, sizeof (string), "%s has set you to level 4",name);
  1111. SendClientMessage(id,0x0660FF,string);
  1112. SetPlayerScore(id,260);
  1113.  
  1114. }
  1115. else if (LVL2==5)
  1116. {
  1117. LVL[id] =5;
  1118. format(string, sizeof (string), "%s has set you to level 5",name);
  1119. SendClientMessage(id,0x0660FF,string);
  1120. SetPlayerScore(id,340);
  1121. }
  1122. else if (LVL2==6)
  1123. {
  1124. LVL[id] =6;
  1125. format(string, sizeof (string), "%s has set you to level 6",name);
  1126. SendClientMessage(id,0x0660FF,string);
  1127. SetPlayerScore(id,450);
  1128. }
  1129. else if (LVL2==7)
  1130. {
  1131. LVL[id] =7;
  1132. format(string, sizeof (string), "%s has set you to level 7",name);
  1133. SendClientMessage(id,0x0660FF,string);
  1134. SetPlayerScore(id,590);
  1135. }
  1136. else if (LVL2==8)
  1137. {
  1138. LVL[id] =8;
  1139. format(string, sizeof (string), "%s has set you to level 8",name);
  1140. SendClientMessage(id,0x0660FF,string);
  1141. SetPlayerScore(id,730);
  1142. }
  1143. else if (LVL2==9)
  1144. {
  1145. LVL[id] =9;
  1146. format(string, sizeof (string), "%s has set you to level 9",name);
  1147. SendClientMessage(id,0x0660FF,string);
  1148. SetPlayerScore(id,890);
  1149. }
  1150. else if (LVL2==10)
  1151. {
  1152. LVL[id] =10;
  1153. format(string, sizeof (string), "%s has set you to level 10",name);
  1154. SendClientMessage(id,0x0660FF,string);
  1155. SetPlayerScore(id,1200);
  1156. }
  1157. return 1;
  1158. }
  1159.  
  1160. dcmd_CopsScore(playerid, params[])
  1161. {
  1162.  
  1163. new CopScore;
  1164. if (sscanf(params, "i", CopScore))
  1165. return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/CopsScore <Score>\"");
  1166. else if (!IsPlayerAdmin(playerid))
  1167. return SendClientMessage(playerid, 0xFF0000AA, "You are not admin");
  1168. else if (CopScore<0||CopScore>500)
  1169. return SendClientMessage(playerid, 0xFF0000AA, "Please choose a score between 0 and 500!");
  1170. else
  1171. {
  1172. Scop=CopScore;
  1173. new string[5];
  1174. valstr(string, Scop);
  1175. TextDrawSetString(TextCp, string);
  1176. }
  1177. return 1;
  1178. }
  1179.  
  1180. dcmd_GangScore(playerid, params[])
  1181. {
  1182.  
  1183. new GangScore;
  1184. if (sscanf(params, "i", GangScore))
  1185. return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/GangScore <Score>\"");
  1186. else if (!IsPlayerAdmin(playerid))
  1187. return SendClientMessage(playerid, 0xFF0000AA, "You are not admin");
  1188. else if (GangScore<0||GangScore>500)
  1189. return SendClientMessage(playerid, 0xFF0000AA, "Please choose a score between 0 and 500!");
  1190. else
  1191. {
  1192. Sgangsta=GangScore;
  1193. new string[5];
  1194. valstr(string, Sgangsta);
  1195. TextDrawSetString(TextGa, string);
  1196. }
  1197. return 1;
  1198. }
  1199.  
  1200. forward cops();
  1201.  
  1202. public cops()
  1203. {
  1204. for(new i=0; i < MAX_PLAYERS; i++)
  1205. {
  1206. GameTextForAll("~b~Cops have won!",2500,3);
  1207. SpawnPlayer(i);
  1208. DisablePlayerCheckpoint(i);
  1209. area51=0;
  1210. KillTimer(tm2);
  1211. KillTimer(tm1);
  1212. //============
  1213. if(gTeam[i]==TEAM_Cops)
  1214. {
  1215. SetPlayerScore(i, GetPlayerScore(i)+5);
  1216. SendClientMessage(i,0x0660FF,"Everyone in team Cops has been given 5 points!");
  1217. }
  1218. Scop=50;
  1219. Sgangsta=50;
  1220. Area51G=0;
  1221. Area51C=0;
  1222. }
  1223. return 1;
  1224. }
  1225.  
  1226. forward gangsta();
  1227.  
  1228. public gangsta()
  1229. {
  1230. for(new i=0; i < MAX_PLAYERS; i++)
  1231. {
  1232. GameTextForAll("~g~Gangsta's have won!",2500,3);
  1233. DisablePlayerCheckpoint(i);
  1234. SpawnPlayer(i);
  1235. area51=0;
  1236. KillTimer(tm2);
  1237. KillTimer(tm1);
  1238. //============
  1239. if(gTeam[i]==TEAM_Gangsta)
  1240. {
  1241. SetPlayerScore(i, GetPlayerScore(i)+5);
  1242. SendClientMessage(i,0x0660FF,"Everyone in team Gangsta has been given 5 points!");
  1243. }
  1244. Scop=50;
  1245. Sgangsta=50;
  1246. Area51G=0;
  1247. Area51C=0;
  1248. }
  1249. return 1;
  1250. }
  1251.  
  1252.  
  1253. public OnPlayerEnterCheckpoint(playerid)
  1254. {
  1255. //------Cops!
  1256. if (gTeam[playerid]==TEAM_Cops)
  1257. {
  1258. tm1=SetTimer("cops",120000,false);
  1259. KillTimer(tm2);
  1260. SendClientMessageToAll(0xFBFF0FF,"Cops are taking area 51!");
  1261. }
  1262. //------Gangsta's
  1263. if (gTeam[playerid]==TEAM_Gangsta)
  1264. {
  1265. tm2=SetTimer("gangsta",120000,false);
  1266. KillTimer(tm1);
  1267. SendClientMessageToAll(0xFBFF0FF,"Gangsta's are taking area 51!");
  1268. }
  1269. return 1;
  1270. }
  1271.  
  1272. public OnPlayerLeaveCheckpoint(playerid)
  1273. {
  1274. if (gTeam[playerid]==TEAM_Cops)
  1275. {
  1276. KillTimer(tm1);
  1277. KillTimer(tm2);
  1278. }
  1279. if (gTeam[playerid]==TEAM_Gangsta)
  1280. {
  1281. KillTimer(tm1);
  1282. KillTimer(tm2);
  1283. }
  1284. return 1;
  1285. }
  1286.  
  1287. //----------------------------------------------Sccanaf---------------------------------------------------
  1288. stock sscanf(string[], format[], {Float,_}:...)
  1289. {
  1290. new
  1291. formatPos = 0,
  1292. stringPos = 0,
  1293. paramPos = 2,
  1294. paramCount = numargs();
  1295. while (paramPos < paramCount && string[stringPos])
  1296. {
  1297. switch (format[formatPos++])
  1298. {
  1299. case '\0':
  1300. {
  1301. return 0;
  1302. }
  1303. case 'i', 'd':
  1304. {
  1305. new
  1306. neg = 1,
  1307. num = 0,
  1308. ch = string[stringPos];
  1309. if (ch == '-')
  1310. {
  1311. neg = -1;
  1312. ch = string[++stringPos];
  1313. }
  1314. do
  1315. {
  1316. stringPos++;
  1317. if (ch >= '0' && ch <= '9')
  1318. {
  1319. num = (num * 10) + (ch - '0');
  1320. }
  1321. else
  1322. {
  1323. return 1;
  1324. }
  1325. }
  1326. while ((ch = string[stringPos]) && ch != ' ');
  1327. setarg(paramPos, 0, num * neg);
  1328. }
  1329. case 'h', 'x':
  1330. {
  1331. new
  1332. ch,
  1333. num = 0;
  1334. while ((ch = string[stringPos++]))
  1335. {
  1336. switch (ch)
  1337. {
  1338. case 'x', 'X':
  1339. {
  1340. num = 0;
  1341. continue;
  1342. }
  1343. case '0' .. '9':
  1344. {
  1345. num = (num << 4) | (ch - '0');
  1346. }
  1347. case 'a' .. 'f':
  1348. {
  1349. num = (num << 4) | (ch - ('a' - 10));
  1350. }
  1351. case 'A' .. 'F':
  1352. {
  1353. num = (num << 4) | (ch - ('A' - 10));
  1354. }
  1355. case ' ':
  1356. {
  1357. break;
  1358. }
  1359. default:
  1360. {
  1361. return 1;
  1362. }
  1363. }
  1364. }
  1365. setarg(paramPos, 0, num);
  1366. }
  1367. case 'c':
  1368. {
  1369. setarg(paramPos, 0, string[stringPos++]);
  1370. }
  1371. case 'f':
  1372. {
  1373. new tmp[25];
  1374. strmid(tmp, string, stringPos, stringPos+sizeof(tmp)-2);
  1375. setarg(paramPos, 0, _:floatstr(tmp));
  1376. }
  1377. case 's', 'z':
  1378. {
  1379. new
  1380. i = 0,
  1381. ch;
  1382. if (format[formatPos])
  1383. {
  1384. while ((ch = string[stringPos++]) && ch != ' ')
  1385. {
  1386. setarg(paramPos, i++, ch);
  1387. }
  1388. if (!i) return 1;
  1389. }
  1390. else
  1391. {
  1392. while ((ch = string[stringPos++]))
  1393. {
  1394. setarg(paramPos, i++, ch);
  1395. }
  1396. }
  1397. stringPos--;
  1398. setarg(paramPos, i, '\0');
  1399. }
  1400. default:
  1401. {
  1402. continue;
  1403. }
  1404. }
  1405. while (string[stringPos] && string[stringPos] != ' ')
  1406. {
  1407. stringPos++;
  1408. }
  1409. while (string[stringPos] == ' ')
  1410. {
  1411. stringPos++;
  1412. }
  1413. paramPos++;
  1414. }
  1415. while (format[formatPos] == 'z') formatPos++;
  1416. return format[formatPos];
  1417. }
  1418. //////////////////////////////////////////////////////////////////////|
  1419. //-----------------------------END------------------------------------|
  1420. //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|
Advertisement
Add Comment
Please, Sign In to add comment