SHARE
TWEET

Untitled

a guest Jan 22nd, 2015 448 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3.         CHANGELOG
  4.         v1.01
  5.         - added /nextmap,/cl[clear log](rcon only) - /help updated
  6.         - small bugs fixed
  7.         - new map: TDM Island
  8.         - small textdraw log(3 lines)
  9.         v1.02
  10.         - added team score textdraw
  11.         - /rs(rcon only) - resets team scores
  12.  
  13. */
  14.  
  15. #include <a_samp>
  16.  
  17. #define VERSION "1.02"
  18.  
  19. #define ROUND_MINUTES 10
  20.  
  21. #define TEAM_GROVE_COLOR 0x00FF00AA
  22. #define TEAM_BALLA_COLOR 0xFF00FFAA
  23.  
  24. new Text:Timeleft;
  25. new Text:CurrentMap;
  26. new Text:Log;
  27. new Text:TeamScore;
  28.  
  29. new timeleft = ROUND_MINUTES;
  30. new roundtimer;
  31. new seconds=0;
  32. new MAP = 0;
  33. new maptimer;
  34. new line1[128] = "~w~-";
  35. new line2[128] = "~w~-";
  36. new line3[128] = "~w~-";
  37. new bool:a=true;
  38.  
  39. new fc[MAX_PLAYERS];
  40. new SPAWNED[MAX_PLAYERS];
  41. new Float:HEALTH[MAX_PLAYERS];
  42. new ALLOWCHAT[MAX_PLAYERS];
  43. new CHECKSPAM[MAX_PLAYERS];
  44.  
  45. new GROVEKILLS=0;
  46. new BALLAKILS=0;
  47.  
  48. forward Second();
  49. forward ChangeMap();
  50. forward FloodCheck(playerid);
  51.  
  52. main()
  53. {
  54.         print("\n------------------------------------------");
  55.         print("Grove Street vs Ballas by Remba031 loaded.");
  56.         print(VERSION);
  57.         print("------------------------------------------\n");
  58. }
  59.  
  60.  
  61. public OnGameModeInit()
  62. {
  63.         roundtimer = SetTimer("Second",1000,true);
  64.  
  65.         DisableInteriorEnterExits();
  66.         UsePlayerPedAnims();
  67.         SetGameModeText("TDM");
  68.         SendRconCommand("mapname RC Battlefield");
  69.  
  70.         ShowPlayerMarkers(PLAYER_MARKERS_MODE_OFF);
  71.  
  72.         AddPlayerClass(105,-1132.0251,1041.6741,1345.7401,271.0460,31,500,24,200,0,0); // G
  73.     AddPlayerClass(106,-1132.0251,1041.6741,1345.7401,271.0460,31,500,24,200,0,0); // G
  74.     AddPlayerClass(107,-1132.0251,1041.6741,1345.7401,271.0460,31,500,24,200,0,0); // G
  75.  
  76.     AddPlayerClass(102,-973.3190,1077.4526,1344.9951,90.9010,31,500,24,200,0,0); // B
  77.     AddPlayerClass(103,-973.3190,1077.4526,1344.9951,90.9010,31,500,24,200,0,0); // B
  78.     AddPlayerClass(104,-973.3190,1077.4526,1344.9951,90.9010,31,500,24,200,0,0); // B
  79.  
  80.     Timeleft = TextDrawCreate(550.0,100.0,"00:00");
  81.     TextDrawFont(Timeleft,2);
  82.     TextDrawUseBox(Timeleft,1);
  83.     TextDrawBoxColor(Timeleft,0x000000AA);
  84.     TextDrawTextSize(Timeleft,1.0,60.0);
  85.     TextDrawAlignment(Timeleft,2);
  86.  
  87.     CurrentMap = TextDrawCreate(550.0,80.0,"RC Battlefield");
  88.     TextDrawFont(CurrentMap,2);
  89.     TextDrawUseBox(CurrentMap,1);
  90.     TextDrawBoxColor(CurrentMap,0x000000FF);
  91.     TextDrawTextSize(CurrentMap,1.0,110.0);
  92.     TextDrawAlignment(CurrentMap,2);
  93.     TextDrawLetterSize(CurrentMap,0.25,1.75);
  94.    
  95.     Log = TextDrawCreate(100.0,415.0,"-~n~-~n~-");
  96.     TextDrawFont(Log,1);
  97.     TextDrawUseBox(Log,1);
  98.     TextDrawBoxColor(Log,0x000000FF);
  99.     TextDrawTextSize(Log,1.0,225.0);
  100.     TextDrawAlignment(Log,2);
  101.     TextDrawLetterSize(Log,0.17,1.25);
  102.    
  103.     TeamScore = TextDrawCreate(540.0,40.0,"~g~Grove Street: ~w~0~n~~p~Ballas: ~w~0");
  104.     TextDrawFont(TeamScore,2);
  105.     TextDrawSetShadow(TeamScore,0);
  106.         TextDrawSetOutline(TeamScore,1);
  107.         TextDrawLetterSize(TeamScore,0.17,1.25);
  108.    
  109. //*********************OBJECTS**************************************************
  110.  
  111.         CreateObject(12814,3082.8999000,-1649.0000000,0.7000000,0.0000000,0.0000000,0.0000000); //object(cuntyeland04) (1)
  112.         CreateObject(12814,3112.8999000,-1648.9000000,0.7000000,0.0000000,0.0000000,0.0000000); //object(cuntyeland04) (2)
  113.         CreateObject(12814,3112.6001000,-1698.4000000,0.7000000,0.0000000,0.0000000,0.0000000); //object(cuntyeland04) (3)
  114.         CreateObject(12814,3083.1001000,-1697.2000000,0.7000000,0.0000000,0.0000000,0.0000000); //object(cuntyeland04) (4)
  115.         CreateObject(12814,3142.3999000,-1698.4000000,0.7000000,0.0000000,0.0000000,0.0000000); //object(cuntyeland04) (5)
  116.         CreateObject(12814,3142.5000000,-1648.6000000,0.7000000,0.0000000,0.0000000,0.0000000); //object(cuntyeland04) (6)
  117.         CreateObject(12814,3172.5000000,-1649.1000000,0.7000000,0.0000000,0.0000000,0.0000000); //object(cuntyeland04) (7)
  118.         CreateObject(12814,3171.8000000,-1698.4000000,0.7000000,0.0000000,0.0000000,0.0000000); //object(cuntyeland04) (8)
  119.         CreateObject(744,3152.1001000,-1621.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (1)
  120.         CreateObject(744,3155.1001000,-1621.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (2)
  121.         CreateObject(744,3159.2000000,-1622.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (3)
  122.         CreateObject(744,3164.0000000,-1621.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (4)
  123.         CreateObject(744,3168.8999000,-1622.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (5)
  124.         CreateObject(744,3173.8000000,-1622.5000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (6)
  125.         CreateObject(744,3178.2000000,-1622.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (7)
  126.         CreateObject(744,3181.2000000,-1623.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (8)
  127.         CreateObject(744,3185.1001000,-1624.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (9)
  128.         CreateObject(744,3188.3000000,-1628.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (10)
  129.         CreateObject(744,3188.8000000,-1631.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (11)
  130.         CreateObject(744,3189.3999000,-1634.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (12)
  131.         CreateObject(744,3188.2000000,-1637.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (13)
  132.         CreateObject(744,3188.8999000,-1641.6000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (14)
  133.         CreateObject(744,3188.7000000,-1644.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (15)
  134.         CreateObject(744,3188.6001000,-1648.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (16)
  135.         CreateObject(744,3189.2000000,-1651.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (17)
  136.         CreateObject(744,3189.0000000,-1655.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (18)
  137.         CreateObject(744,3189.8000000,-1659.4000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (19)
  138.         CreateObject(744,3189.5000000,-1661.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (20)
  139.         CreateObject(744,3190.3000000,-1665.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (21)
  140.         CreateObject(744,3189.8999000,-1668.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (22)
  141.         CreateObject(744,3190.3999000,-1672.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (23)
  142.         CreateObject(744,3190.3999000,-1676.6000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (24)
  143.         CreateObject(744,3190.0000000,-1680.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (25)
  144.         CreateObject(744,3189.6001000,-1683.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (26)
  145.         CreateObject(744,3189.8999000,-1688.6000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (27)
  146.         CreateObject(744,3190.2000000,-1693.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (28)
  147.         CreateObject(744,3189.7000000,-1697.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (29)
  148.         CreateObject(744,3188.0000000,-1692.4000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (30)
  149.         CreateObject(744,3187.3999000,-1685.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (31)
  150.         CreateObject(744,3187.3999000,-1678.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (32)
  151.         CreateObject(744,3187.8000000,-1673.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (33)
  152.         CreateObject(744,3186.8999000,-1667.4000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (34)
  153.         CreateObject(744,3187.7000000,-1700.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (35)
  154.         CreateObject(744,3189.3999000,-1703.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (36)
  155.         CreateObject(744,3187.3999000,-1703.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (37)
  156.         CreateObject(744,3187.3000000,-1707.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (38)
  157.         CreateObject(744,3187.6001000,-1708.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (39)
  158.         CreateObject(744,3187.8999000,-1711.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (40)
  159.         CreateObject(744,3187.8000000,-1713.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (41)
  160.         CreateObject(744,3187.6001000,-1715.5000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (42)
  161.         CreateObject(744,3188.1001000,-1718.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (43)
  162.         CreateObject(744,3187.7000000,-1720.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (44)
  163.         CreateObject(744,3186.8000000,-1723.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (45)
  164.         CreateObject(744,3187.8000000,-1722.4000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (46)
  165.         CreateObject(744,3183.1001000,-1724.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (47)
  166.         CreateObject(744,3179.8999000,-1725.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (48)
  167.         CreateObject(744,3176.5000000,-1724.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (49)
  168.         CreateObject(744,3173.3999000,-1724.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (50)
  169.         CreateObject(744,3169.5000000,-1723.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (51)
  170.         CreateObject(744,3166.6001000,-1724.4000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (52)
  171.         CreateObject(744,3162.8999000,-1724.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (53)
  172.         CreateObject(744,3160.7000000,-1724.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (54)
  173.         CreateObject(744,3157.2000000,-1723.6000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (55)
  174.         CreateObject(744,3153.6001000,-1723.4000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (56)
  175.         CreateObject(744,3150.2000000,-1723.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (57)
  176.         CreateObject(744,3146.8000000,-1724.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (58)
  177.         CreateObject(744,3141.8999000,-1723.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (59)
  178.         CreateObject(744,3137.3000000,-1724.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (60)
  179.         CreateObject(744,3132.8999000,-1723.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (61)
  180.         CreateObject(744,3128.5000000,-1723.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (62)
  181.         CreateObject(744,3123.7000000,-1724.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (63)
  182.         CreateObject(744,3119.8000000,-1723.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (64)
  183.         CreateObject(744,3117.5000000,-1723.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (65)
  184.         CreateObject(744,3114.1001000,-1723.6000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (66)
  185.         CreateObject(744,3111.0000000,-1724.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (67)
  186.         CreateObject(744,3107.3999000,-1724.4000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (68)
  187.         CreateObject(744,3104.3999000,-1724.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (69)
  188.         CreateObject(744,3101.2000000,-1724.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (70)
  189.         CreateObject(744,3097.8000000,-1723.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (71)
  190.         CreateObject(744,3094.6001000,-1723.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (72)
  191.         CreateObject(744,3091.1001000,-1723.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (73)
  192.         CreateObject(744,3088.3000000,-1723.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (74)
  193.         CreateObject(744,3085.1001000,-1723.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (75)
  194.         CreateObject(744,3082.3000000,-1723.5000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (76)
  195.         CreateObject(744,3079.5000000,-1723.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (77)
  196.         CreateObject(744,3077.3000000,-1723.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (78)
  197.         CreateObject(744,3074.6001000,-1722.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (79)
  198.         CreateObject(744,3071.6001000,-1722.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (80)
  199.         CreateObject(744,3069.7000000,-1722.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (81)
  200.         CreateObject(744,3068.5000000,-1719.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (82)
  201.         CreateObject(744,3068.2000000,-1715.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (83)
  202.         CreateObject(744,3068.3000000,-1712.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (84)
  203.         CreateObject(744,3068.3000000,-1710.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (85)
  204.         CreateObject(744,3068.3000000,-1707.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (86)
  205.         CreateObject(744,3068.2000000,-1703.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (87)
  206.         CreateObject(744,3068.0000000,-1700.6000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (88)
  207.         CreateObject(744,3068.3000000,-1697.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (89)
  208.         CreateObject(744,3068.3000000,-1694.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (90)
  209.         CreateObject(744,3067.7000000,-1690.6000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (91)
  210.         CreateObject(744,3068.1001000,-1686.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (92)
  211.         CreateObject(744,3068.0000000,-1684.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (93)
  212.         CreateObject(744,3068.0000000,-1681.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (94)
  213.         CreateObject(744,3068.3000000,-1678.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (95)
  214.         CreateObject(744,3069.0000000,-1675.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (96)
  215.         CreateObject(744,3068.7000000,-1672.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (97)
  216.         CreateObject(744,3068.0000000,-1669.2000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (98)
  217.         CreateObject(744,3068.7000000,-1665.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (99)
  218.         CreateObject(744,3068.8999000,-1661.6000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (100)
  219.         CreateObject(744,3068.5000000,-1658.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (101)
  220.         CreateObject(744,3068.3999000,-1654.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (102)
  221.         CreateObject(744,3068.5000000,-1651.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (103)
  222.         CreateObject(744,3068.1001000,-1647.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (104)
  223.         CreateObject(744,3068.2000000,-1643.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (105)
  224.         CreateObject(744,3067.8000000,-1639.5000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (106)
  225.         CreateObject(744,3068.3000000,-1636.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (107)
  226.         CreateObject(744,3068.8000000,-1631.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (108)
  227.         CreateObject(744,3068.2000000,-1627.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (109)
  228.         CreateObject(744,3070.2000000,-1624.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (110)
  229.         CreateObject(744,3073.3000000,-1624.4000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (111)
  230.         CreateObject(744,3076.3999000,-1624.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (112)
  231.         CreateObject(744,3079.0000000,-1625.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (113)
  232.         CreateObject(744,3082.6001000,-1625.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (114)
  233.         CreateObject(744,3085.7000000,-1625.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (115)
  234.         CreateObject(744,3089.6001000,-1625.5000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (116)
  235.         CreateObject(744,3093.7000000,-1625.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (117)
  236.         CreateObject(744,3097.8000000,-1625.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (118)
  237.         CreateObject(744,3101.0000000,-1625.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (119)
  238.         CreateObject(744,3105.8000000,-1625.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (120)
  239.         CreateObject(744,3110.0000000,-1625.3000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (121)
  240.         CreateObject(744,3114.3000000,-1625.0000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (122)
  241.         CreateObject(744,3118.5000000,-1623.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (123)
  242.         CreateObject(744,3122.0000000,-1623.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (124)
  243.         CreateObject(744,3125.0000000,-1623.7000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (125)
  244.         CreateObject(744,3128.8000000,-1623.6000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (126)
  245.         CreateObject(744,3131.8999000,-1624.4000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (127)
  246.         CreateObject(744,3135.3000000,-1622.8000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (128)
  247.         CreateObject(744,3139.3000000,-1622.6000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (129)
  248.         CreateObject(744,3143.1001000,-1622.5000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (130)
  249.         CreateObject(744,3147.8000000,-1622.5000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (131)
  250.         CreateObject(3402,3135.0000000,-1703.9000000,0.7000000,0.0000000,0.0000000,0.0000000); //object(sw_tempbarn01) (1)
  251.         CreateObject(3402,3105.2000000,-1703.9000000,0.7000000,0.0000000,0.0000000,0.0000000); //object(sw_tempbarn01) (2)
  252.         CreateObject(3419,3143.6001000,-1689.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(ce_logbarn02) (1)
  253.         CreateObject(3419,3113.6001000,-1689.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(ce_logbarn02) (2)
  254.         CreateObject(3361,3085.2000000,-1703.7000000,2.2000000,0.0000000,0.0000000,180.0000000); //object(cxref_woodstair) (1)
  255.         CreateObject(3361,3153.7000000,-1703.9000000,2.2000000,0.0000000,0.0000000,0.0000000); //object(cxref_woodstair) (2)
  256.         CreateObject(3749,3147.8999000,-1638.4000000,6.6000000,0.0000000,0.0000000,90.0000000); //object(clubgate01_lax) (1)
  257.         CreateObject(3749,3100.3999000,-1638.5000000,6.6000000,0.0000000,0.0000000,90.0000000); //object(clubgate01_lax) (2)
  258.         CreateObject(10841,3133.8000000,-1646.5000000,8.6000000,0.0000000,0.0000000,0.0000000); //object(drydock1_sfse01) (1)
  259.         CreateObject(10841,3111.3000000,-1646.5000000,8.6000000,0.0000000,0.0000000,0.0000000); //object(drydock1_sfse01) (2)
  260.         CreateObject(10841,3135.3999000,-1629.9000000,8.6000000,0.0000000,0.0000000,0.0000000); //object(drydock1_sfse01) (3)
  261.         CreateObject(10841,3113.5000000,-1629.9000000,8.6000000,0.0000000,0.0000000,0.0000000); //object(drydock1_sfse01) (4)
  262.         CreateObject(10841,3149.1001000,-1680.5000000,8.6000000,0.0000000,0.0000000,90.0000000); //object(drydock1_sfse01) (6)
  263.         CreateObject(10841,3149.0000000,-1685.7000000,8.6000000,0.0000000,0.0000000,90.0000000); //object(drydock1_sfse01) (7)
  264.         CreateObject(10841,3099.5000000,-1659.1000000,8.6000000,0.0000000,0.0000000,90.0000000); //object(drydock1_sfse01) (8)
  265.         CreateObject(3502,3114.3999000,-1654.2000000,2.6000000,0.0000000,0.0000000,90.0000000); //object(vgsn_con_tube) (1)
  266.         CreateObject(3502,3136.8999000,-1667.5000000,2.6000000,0.0000000,0.0000000,90.0000000); //object(vgsn_con_tube) (2)
  267.         CreateObject(3502,3128.2000000,-1668.1000000,2.6000000,0.0000000,0.0000000,100.0000000); //object(vgsn_con_tube) (3)
  268.         CreateObject(3502,3120.8000000,-1670.7000000,2.6000000,0.0000000,0.0000000,120.0000000); //object(vgsn_con_tube) (4)
  269.         CreateObject(3502,3126.6001000,-1657.7000000,2.6000000,0.0000000,0.0000000,119.9980000); //object(vgsn_con_tube) (5)
  270.         CreateObject(3643,3139.3999000,-1653.8000000,6.6000000,0.0000000,0.0000000,0.0000000); //object(la_chem_piping) (1)
  271.         CreateObject(942,3124.5000000,-1712.7000000,3.2000000,0.0000000,0.0000000,0.0000000); //object(cj_df_unit_2) (1)
  272.         CreateObject(942,3094.5000000,-1712.8000000,3.2000000,0.0000000,0.0000000,0.0000000); //object(cj_df_unit_2) (7)
  273.         CreateObject(3378,3152.8000000,-1680.7000000,1.9000000,0.0000000,0.0000000,0.0000000); //object(ce_beerpile01) (1)
  274.         CreateObject(3378,3095.7000000,-1659.5000000,1.9000000,0.0000000,0.0000000,0.0000000); //object(ce_beerpile01) (2)
  275.         CreateObject(16322,3132.3999000,-1712.4000000,4.8000000,0.0000000,0.0000000,0.0000000); //object(a51_plat) (1)
  276.         CreateObject(16322,3103.2000000,-1712.5000000,4.8000000,0.0000000,0.0000000,180.0000000); //object(a51_plat) (2)
  277.         CreateObject(744,3152.2000000,-1627.1000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (132)
  278.         CreateObject(744,3149.2000000,-1626.9000000,0.0000000,0.0000000,0.0000000,0.0000000); //object(sm_scrub_rock4) (133)
  279.         //168 objects
  280.  
  281. //******************************************************************************
  282.         return 1;
  283. }
  284.  
  285. public OnGameModeExit()
  286. {
  287.         print("\n-------------------------------------------");
  288.         print("Grove Street vs Ballas by Remba031 unloaded.");
  289.         print("-------------------------------------------\n");
  290.         return 1;
  291. }
  292.  
  293. public OnPlayerRequestClass(playerid, classid)
  294. {
  295.     SPAWNED[playerid] = 0;
  296.         TextDrawShowForPlayer(playerid,Timeleft);
  297.         TextDrawShowForPlayer(playerid,CurrentMap);
  298.         TextDrawShowForPlayer(playerid,Log);
  299.         TextDrawShowForPlayer(playerid,TeamScore);
  300.  
  301.         SetPlayerInterior(playerid,1);
  302.         SetPlayerPos(playerid,292.9160,-30.6521,1001.5156);
  303.         SetPlayerCameraPos(playerid,293.1492,-37.2610,1001.5156);
  304.         SetPlayerCameraLookAt(playerid,292.9160,-30.6521,1001.5156);
  305.         SetPlayerFacingAngle(playerid,177.3484);
  306.  
  307.         switch(classid)
  308.         {
  309.             case 0,1,2:
  310.             {
  311.                 SetPlayerTeam(playerid,1);
  312.                 GameTextForPlayer(playerid,"~g~GROVE STREET",3000,4);
  313.                 SetPlayerColor(playerid,TEAM_GROVE_COLOR);
  314.                 }
  315.                 case 3,4,5:
  316.                 {
  317.                         SetPlayerTeam(playerid,2);
  318.                 GameTextForPlayer(playerid,"~p~BALLAS",3000,4);
  319.                 SetPlayerColor(playerid,TEAM_BALLA_COLOR);
  320.                 }
  321.         }
  322.  
  323.         return 1;
  324. }
  325.  
  326. public OnPlayerConnect(playerid)
  327. {
  328.         new str[128];
  329.         SetPlayerColor(playerid,-1);
  330.         SPAWNED[playerid] = 0;
  331.         ALLOWCHAT[playerid] = 1;
  332.         CHECKSPAM[playerid] = 0;
  333.         fc[playerid] = SetTimerEx("FloodCheck",3000,true,"i",playerid);
  334.         format(str,sizeof(str),"~w~%s ~g~connected.~w~",GetPName(playerid));
  335.         UpdateLog(str);
  336.         return 1;
  337. }
  338.  
  339. public OnPlayerDisconnect(playerid, reason)
  340. {
  341.     new str[128];
  342.     SetPlayerColor(playerid,-1);
  343.         SPAWNED[playerid] = 0;
  344.         ALLOWCHAT[playerid] = 1;
  345.         CHECKSPAM[playerid] = 0;
  346.         KillTimer(fc[playerid]);
  347.         switch(reason)
  348.         {
  349.            case 0: format(str,sizeof(str),"~w~%s ~r~disconnected(Timeout/Crash).~w~",GetPName(playerid));
  350.            case 1: format(str,sizeof(str),"~w~%s ~r~disconnected(Quit).~w~",GetPName(playerid));
  351.            case 2: format(str,sizeof(str),"~w~%s ~r~disconnected(Kicked/Banned).~w~",GetPName(playerid));
  352.         }
  353.         UpdateLog(str);
  354.         return 1;
  355. }
  356.  
  357. public OnPlayerSpawn(playerid)
  358. {
  359.         new str[128];
  360.         if(MAP == 0) // Default map(RC Battlefield)
  361.         {
  362.                 SetPlayerInterior(playerid,10);
  363.         }
  364.         else if(MAP == 1) // Jefferson Motel
  365.         {
  366.             SetPlayerInterior(playerid,15);
  367.             if(GetPlayerTeam(playerid) == 1)
  368.             {
  369.                 SetPlayerPos(playerid,2217.5869,-1151.1071,1025.7969);
  370.                 SetPlayerFacingAngle(playerid,272.2993);
  371.             }
  372.             else if(GetPlayerTeam(playerid) == 2)
  373.             {
  374.                 SetPlayerPos(playerid,2195.3025,-1143.9893,1029.7969);
  375.                 SetPlayerFacingAngle(playerid,181.1184);
  376.                 }
  377.         }
  378.         else if(MAP == 2) //Liberty City
  379.         {
  380.                 SetPlayerInterior(playerid,1);
  381.             if(GetPlayerTeam(playerid) == 1)
  382.             {
  383.                 SetPlayerPos(playerid,-795.0522,495.1387,1376.1953);
  384.                 SetPlayerFacingAngle(playerid,356.2731);
  385.             }
  386.             else if(GetPlayerTeam(playerid) == 2)
  387.             {
  388.                 SetPlayerPos(playerid,-830.9671,515.4208,1357.6854);
  389.                 SetPlayerFacingAngle(playerid,182.6851);
  390.                 }
  391.         }
  392.         else if(MAP == 3) //Pleasure Domes
  393.         {
  394.             SetPlayerInterior(playerid,3);
  395.             if(GetPlayerTeam(playerid) == 1)
  396.             {
  397.                 SetPlayerPos(playerid,-2647.0217,1423.9025,906.4609);
  398.                 SetPlayerFacingAngle(playerid,127.1440);
  399.             }
  400.             else if(GetPlayerTeam(playerid) == 2)
  401.             {
  402.                 SetPlayerPos(playerid,-2667.2332,1426.8282,906.4609);
  403.                 SetPlayerFacingAngle(playerid,179.7845);
  404.                 }
  405.         }
  406.         else if(MAP == 4) // Planning Department
  407.         {
  408.                 SetPlayerInterior(playerid,3);
  409.             if(GetPlayerTeam(playerid) == 1)
  410.             {
  411.                 SetPlayerPos(playerid,349.0134,163.6172,1025.7891);
  412.                 SetPlayerFacingAngle(playerid,271.4312);
  413.             }
  414.             else if(GetPlayerTeam(playerid) == 2)
  415.             {
  416.                 SetPlayerPos(playerid,-372.1458,180.4995,1008.3828);
  417.                 SetPlayerFacingAngle(playerid,179.8669);
  418.                 }
  419.         }
  420.         else if(MAP == 5) // TDM Island
  421.         {
  422.             SetPlayerInterior(playerid,0);
  423.             if(GetPlayerTeam(playerid) == 1)
  424.             {
  425.                 SetPlayerPos(playerid,3152.9175,-1681.9788,4.0809);
  426.                 SetPlayerFacingAngle(playerid,268.6894);
  427.                 }
  428.                 else if(GetPlayerTeam(playerid) == 2)
  429.             {
  430.                 SetPlayerPos(playerid,3096.5420,-1661.9691,4.0809);
  431.                 SetPlayerFacingAngle(playerid,92.6178);
  432.                 }
  433.         }
  434.         SetPlayerHP(playerid,100.0);
  435.         SPAWNED[playerid] = 1;
  436.         format(str,sizeof(str),"%s ~b~spawned.~w~",GetPName(playerid));
  437.         UpdateLog(str);
  438.         return 1;
  439. }
  440.  
  441. public OnPlayerDeath(playerid, killerid, reason)
  442. {
  443.         new str[128];
  444.         if(killerid != INVALID_PLAYER_ID) // Valid kill
  445.     {
  446.         SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  447.         SetPlayerScore(playerid,GetPlayerScore(playerid)-1);
  448.        
  449.                 if(reason == 31)
  450.                 {
  451.                     format(str,sizeof(str),"%s ~r~killed ~w~%s(M4)",GetPName(killerid),GetPName(playerid));
  452.                     UpdateLog(str);
  453.                 }
  454.                 else if(reason == 24)
  455.                 {
  456.                     format(str,sizeof(str),"%s ~r~killed ~w~%s(Deagle)",GetPName(killerid),GetPName(playerid));
  457.                     UpdateLog(str);
  458.                 }
  459.                 else if(reason == 0)
  460.                 {
  461.                     format(str,sizeof(str),"%s ~r~killed ~w~%s(Fists)",GetPName(killerid),GetPName(playerid));
  462.                     UpdateLog(str);
  463.                 }
  464.         else if(reason == 34)
  465.         {
  466.             BanEx(killerid,"Cheat");
  467.             SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
  468.         }
  469.         else if(reason == 35)
  470.         {
  471.             BanEx(killerid,"Cheat");
  472.             SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
  473.         }
  474.         else if(reason == 36)
  475.         {
  476.             BanEx(killerid,"Cheat");
  477.             SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
  478.                 }
  479.                 else if(reason == 36)
  480.         {
  481.             BanEx(killerid,"Cheat");
  482.             SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
  483.                 }
  484.                 else  if(reason == 38)
  485.         {
  486.             BanEx(killerid,"Cheat");
  487.             SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
  488.         }
  489.  
  490.     }
  491.     else
  492.     {
  493.         SetPlayerScore(playerid,GetPlayerScore(playerid)-1);
  494.         format(str,sizeof(str),"%s ~r~died.~w~",GetPName(playerid));
  495.                 UpdateLog(str);
  496.     }
  497.         if(GetPlayerTeam(killerid) == 1) GROVEKILLS++;
  498.         else if(GetPlayerTeam(killerid) == 2) BALLAKILS++;
  499.         UpdateTeamScore();
  500.         return 1;
  501. }
  502.  
  503. public OnPlayerText(playerid, text[])
  504. {
  505.         if(ALLOWCHAT[playerid] == 1)
  506.         {
  507.                 new sendername[MAX_PLAYER_NAME];
  508.                 GetPlayerName(playerid,sendername,sizeof(sendername));
  509.                 new string[256];
  510.                 if(GetPlayerTeam(playerid) == 1)
  511.                 {
  512.                     if(SPAWNED[playerid] == 1)
  513.                     {
  514.                         format(string,sizeof(string),"{FFFFFF}[MAIN CHAT] {6EF83C}%s: {FFFFFF}%s",sendername,text);
  515.                         SendClientMessageToAll(-1,string);
  516.                         CHECKSPAM[playerid]++;
  517.                         }
  518.                 }
  519.                 else if(GetPlayerTeam(playerid) == 2)
  520.                 {
  521.                         if(SPAWNED[playerid] == 1)
  522.                 {
  523.                         format(string,sizeof(string),"{FFFFFF}[MAIN CHAT] {B700FF}%s: {FFFFFF}%s",sendername,text);
  524.                         SendClientMessageToAll(-1,string);
  525.                         CHECKSPAM[playerid]++;
  526.                         }
  527.                 }
  528.         }
  529.         return 0;
  530. }
  531.  
  532. public OnPlayerCommandText(playerid, cmdtext[])
  533. {
  534.         new str[128];
  535.         if (strcmp("/help", cmdtext, true, 5) == 0)
  536.         {
  537.             if(SPAWNED[playerid] == 1)
  538.             {
  539.                         SendClientMessage(playerid,-1,"{F9E8B7}COMMANDS: {FFFFFF}/help, /resetscore");
  540.                         if(IsPlayerAdmin(playerid)) SendClientMessage(playerid,-1,"{F9E8B7}RCON COMMANDS: {FFFFFF}/nextmap,/cl,/suicide,/rst");
  541.                 }
  542.                 format(str,sizeof(str),"~w~%s:~y~ /help~w~",GetPName(playerid));
  543.                 UpdateLog(str);
  544.                 CHECKSPAM[playerid]++;
  545.                 return 1;
  546.         }
  547.         if (strcmp("/resetscore", cmdtext, true, 11) == 0)
  548.         {
  549.             if(SPAWNED[playerid] == 1)
  550.             {
  551.                 SetPlayerScore(playerid,0);
  552.                 SendClientMessage(playerid,-1,"{F9E8B7}Your score is set back to {FFFFFF}0{F9E8B7}.");
  553.                 }
  554.                 format(str,sizeof(str),"~w~%s:~y~ /resetscore~w~",GetPName(playerid));
  555.                 UpdateLog(str);
  556.                 CHECKSPAM[playerid]++;
  557.                 return 1;
  558.         }
  559. //*********************************RCON*****************************************
  560.         if (strcmp("/nextmap", cmdtext, true, 8) == 0)
  561.         {
  562.                 if(IsPlayerAdmin(playerid))
  563.                 {
  564.                         ChangeMap();
  565.         }
  566.         else
  567.         {
  568.                 SendClientMessage(playerid,-1,"SERVER: You are not logged in to RCON.");
  569.         }
  570.         return 1;
  571.         }
  572.         if (strcmp("/cl", cmdtext, true, 3) == 0)
  573.         {
  574.                 if(IsPlayerAdmin(playerid))
  575.                 {
  576.                         ClearLog();
  577.         }
  578.         else
  579.         {
  580.                 SendClientMessage(playerid,-1,"SERVER: You are not logged in to RCON.");
  581.         }
  582.         return 1;
  583.         }
  584.         if (strcmp("/suicide", cmdtext, true, 8) == 0)
  585.         {
  586.                 if(IsPlayerAdmin(playerid))
  587.                 {
  588.                     SetPlayerHealth(playerid,0.0);
  589.                 }
  590.                 else
  591.         {
  592.                 SendClientMessage(playerid,-1,"SERVER: You are not logged in to RCON.");
  593.         }
  594.         return 1;
  595.         }
  596.         if (strcmp("/rst", cmdtext, true, 3) == 0)
  597.         {
  598.                 if(IsPlayerAdmin(playerid))
  599.                 {
  600.                     GROVEKILLS=0;
  601.                     BALLAKILS=0;
  602.                     UpdateTeamScore();
  603.                 }
  604.                 else
  605.                 {
  606.                     SendClientMessage(playerid,-1,"SERVER: You are not logged in to RCON.");
  607.                 }
  608.                 return 1;
  609.         }
  610.         return 0;
  611. }
  612.  
  613. public OnPlayerUpdate(playerid)
  614. {
  615.         if(SPAWNED[playerid] == 1)
  616.         {
  617.                 if(GetPlayerWeapon(playerid) == 44) BanEx(playerid,"Cheat");
  618.                 else if(GetPlayerWeapon(playerid) == 45) BanEx(playerid,"Cheat");
  619.                 else if(GetPlayerWeapon(playerid) == 16) BanEx(playerid,"Cheat");
  620.  
  621.                 if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK) BanEx(playerid,"Cheat");
  622.             if(GetPlayerMoney(playerid) > 0) BanEx(playerid,"Cheat");
  623.  
  624.             new Float:pHealth;
  625.                 GetPlayerHealth(playerid,pHealth);
  626.  
  627.                 new Float:pArmor;
  628.                 GetPlayerArmour(playerid,pArmor);
  629.  
  630.                 if(pHealth != HEALTH[playerid])
  631.                 {
  632.                     if(pHealth > HEALTH[playerid])
  633.                         {
  634.                             BanEx(playerid,"Cheat");
  635.                     }
  636.                     else
  637.                     {
  638.  
  639.                     }
  640.                 }
  641.  
  642.                 else if(pArmor >= 1.0)
  643.                 {
  644.                     if(SPAWNED[playerid] == 1)
  645.                     {
  646.                         BanEx(playerid,"Cheat");
  647.                         }
  648.                 }
  649.                
  650.                 if(GetPlayerAnimationIndex(playerid))
  651.         {
  652.             new animlib[32];
  653.                 new animname[32];
  654.                 GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
  655.                 if(strcmp(animlib, "SWIM", true) == 0)
  656.                 {
  657.                     Slap(playerid);
  658.                 }
  659.         }
  660.         }
  661.         return 1;
  662. }
  663.  
  664. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
  665. {
  666.         HEALTH[playerid] -= amount;
  667.         return 1;
  668. }
  669.  
  670. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  671. {
  672.     if(IsPlayerAdmin(playerid)) return AdminTeleport(playerid,Float:fX, Float:fY, Float:fZ);
  673.     else return 0;
  674. }
  675. //==============================================================================
  676. public Second()
  677. {
  678.         new timestr[32];
  679.         seconds--;
  680.         if(seconds <= 0)
  681.         {
  682.                 if(timeleft <= 0)
  683.                 {
  684.                         KillTimer(roundtimer);
  685.                         seconds = 0;
  686.                         timeleft = 0;
  687.                         FreezeAll();
  688.                         SendClientMessageToAll(-1,"SERVER: {F9E8B7}Changing map...");
  689.                         maptimer = SetTimer("ChangeMap",5000,false);
  690.                 }
  691.                 else
  692.                 {
  693.                 seconds = 59;
  694.                         timeleft--;
  695.                 }
  696.         }
  697.         format(timestr,sizeof(timestr),"%02d:%02d",timeleft,seconds);
  698.         TextDrawSetString(Timeleft,timestr);
  699.         return 1;
  700. }
  701.  
  702. public ChangeMap()
  703. {
  704.         KillTimer(maptimer);
  705.         KillTimer(roundtimer);
  706.         seconds = 0;
  707.         GROVEKILLS=0;
  708.         BALLAKILS=0;
  709.         UpdateTeamScore();
  710.         if(MAP == 0)
  711.         {
  712.             MAP = 1;
  713.             timeleft = ROUND_MINUTES;
  714.         roundtimer = SetTimer("Second",1000,true);
  715.         RespawnAll();
  716.         UnFreezeAll();
  717.                 TextDrawSetString(CurrentMap,"Jefferson Motel");
  718.                 SendRconCommand("mapname Jefferson Motel");
  719.                 SendClientMessageToAll(-1,"SERVER: {F9E8B7}Map changed.");
  720.         }
  721.         else if(MAP == 1)
  722.         {
  723.                 MAP = 2;
  724.                 timeleft = ROUND_MINUTES;
  725.         roundtimer = SetTimer("Second",1000,true);
  726.         RespawnAll();
  727.         UnFreezeAll();
  728.                 TextDrawSetString(CurrentMap,"Liberty City");
  729.                 SendRconCommand("mapname Liberty City");
  730.                 SendClientMessageToAll(-1,"SERVER: {F9E8B7}Map changed.");
  731.         }
  732.         else if(MAP == 2)
  733.         {
  734.                 MAP = 3;
  735.                 timeleft = ROUND_MINUTES;
  736.         roundtimer = SetTimer("Second",1000,true);
  737.         RespawnAll();
  738.         UnFreezeAll();
  739.                 TextDrawSetString(CurrentMap,"Pleasure Domes");
  740.                 SendRconCommand("mapname Pleasure Domes");
  741.                 SendClientMessageToAll(-1,"SERVER: {F9E8B7}Map changed.");
  742.         }
  743.         else if(MAP == 3)
  744.         {
  745.             MAP = 4;
  746.                 timeleft = ROUND_MINUTES;
  747.         roundtimer = SetTimer("Second",1000,true);
  748.         RespawnAll();
  749.         UnFreezeAll();
  750.                 TextDrawSetString(CurrentMap,"Planning Dept.");
  751.                 SendRconCommand("mapname Planning Department");
  752.                 SendClientMessageToAll(-1,"SERVER: {F9E8B7}Map changed.");
  753.         }
  754.         else if(MAP == 4)
  755.         {
  756.                 MAP = 5;
  757.                 timeleft = ROUND_MINUTES;
  758.         roundtimer = SetTimer("Second",1000,true);
  759.         RespawnAll();
  760.         UnFreezeAll();
  761.                 TextDrawSetString(CurrentMap,"TDM Island");
  762.                 SendRconCommand("mapname TDM Island");
  763.                 SendClientMessageToAll(-1,"SERVER: {F9E8B7}Map changed.");
  764.         }
  765.         else if(MAP == 5)
  766.         {
  767.                 MAP = 0;
  768.                 timeleft = ROUND_MINUTES;
  769.         roundtimer = SetTimer("Second",1000,true);
  770.         RespawnAll();
  771.         UnFreezeAll();
  772.                 TextDrawSetString(CurrentMap,"RC Battlefield");
  773.                 SendRconCommand("mapname RC Battlefield");
  774.                 SendClientMessageToAll(-1,"SERVER: {F9E8B7}Map changed.");
  775.         }
  776.         UnFreezeAll();
  777. }
  778.  
  779. public FloodCheck(playerid)
  780. {
  781.         if(IsPlayerFlooding(playerid)) return Kick(playerid);
  782.         else return 0;
  783. }
  784. //==============================================================================
  785. stock FreezeAll()
  786. {
  787.         for(new i=0; i<MAX_PLAYERS; i++)
  788.         {
  789.             TogglePlayerControllable(i,0);
  790.         }
  791. }
  792.  
  793. stock UnFreezeAll()
  794. {
  795.         for(new i=0; i<MAX_PLAYERS; i++)
  796.         {
  797.             TogglePlayerControllable(i,1);
  798.         }
  799. }
  800.  
  801. stock RespawnAll()
  802. {
  803.         for(new i=0; i<MAX_PLAYERS; i++)
  804.         {
  805.             TogglePlayerSpectating(i,1);
  806.             SPAWNED[i] = 0;
  807.             TogglePlayerSpectating(i,0);
  808.         }
  809. }
  810.  
  811. stock IsPlayerFlooding(playerid)
  812. {
  813.         if(CHECKSPAM[playerid] >= 3) return 1;
  814.         else return CHECKSPAM[playerid] = 0;
  815. }
  816.  
  817. stock SetPlayerHP(playerid,Float:amount)
  818. {
  819.         HEALTH[playerid] = amount;
  820.         SetPlayerHealth(playerid,amount);
  821. }
  822.  
  823. stock AdminTeleport(playerid,Float:fX, Float:fY, Float:fZ)
  824. {
  825.     SetPlayerInterior(playerid,0);
  826.     SetPlayerPos(playerid, fX, fY, fZ);
  827.     return 1;
  828. }
  829.  
  830. stock Slap(playerid)
  831. {
  832.         new Float:X,Float:Y,Float:Z;
  833.         GetPlayerPos(playerid,X,Y,Z);
  834.         SetPlayerPos(playerid,X,Y,Z+5.5);
  835.         return 1;
  836. }
  837.  
  838. stock UpdateLog(str[])
  839. {
  840.         new string[128];
  841.         if(a == true)
  842.         {
  843.             format(line3,sizeof(line3),line2);
  844.                 format(line2,sizeof(line2),line1);
  845.                 format(line1,sizeof(line1),"%s",str);
  846.                 a--;
  847.         }
  848.         else if(a == false)
  849.         {
  850.                 format(line3,sizeof(line3),line2);
  851.                 format(line2,sizeof(line2),"%s",line1);
  852.                 format(line1,sizeof(line1),"%s",str);
  853.                 a++;
  854.         }
  855.         format(string,sizeof(string),"%s~n~%s~n~%s",line1,line2,line3);
  856.         TextDrawSetString(Log,string);
  857.         return 1;
  858. }
  859.  
  860. stock ClearLog()
  861. {
  862.         UpdateLog("~w~-");
  863.         UpdateLog("~w~-");
  864.         UpdateLog("~w~-");
  865. }
  866.  
  867. stock GetPName(playerid)
  868. {
  869.         new pName[MAX_PLAYER_NAME];
  870.         GetPlayerName(playerid,pName,sizeof(pName));
  871.         return pName;
  872. }
  873.  
  874. stock UpdateTeamScore()
  875. {
  876.         new score[128];
  877.         if(GROVEKILLS >= BALLAKILS)
  878.         {
  879.                 format(score,sizeof(score),"~g~Grove Street: ~w~%d~n~~p~Ballas: ~w~%d",GROVEKILLS,BALLAKILS);
  880.                 TextDrawSetString(TeamScore,score);
  881.         }
  882.         else
  883.         {
  884.                 format(score,sizeof(score),"~p~Ballas: ~w~%d~n~~g~Grove Street: ~w~%d",BALLAKILS,GROVEKILLS);
  885.                 TextDrawSetString(TeamScore,score);
  886.         }
  887. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top