Advertisement
Breno_Arthur

[GAMEMODE] Arena 51 DM

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