SHARE
TWEET

Grove Street vs Ballas v1.01

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