Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <utils>
- //--------------------------------------------------TEAMS------------------------------------------------------------------------------------------
- #define TEAM_LAWYER 0
- #define TEAM_COP 1
- #define TEAM_ARMY 2
- #define TEAM_MEDIC 3
- #define TEAM_MECHANIC 4
- #define TEAM_CASSEC 5
- #define TEAM_DRIVER 6
- #define TEAM_BISTRO 7
- #define TEAM_JAILTK 8
- #define TEAM_CIVIL 9
- #define TEAM_RAPIST 10
- #define TEAM_GUNDEALER 11
- #define TEAM_DRUGDEALER 12
- #define TEAM_HITMAN 13
- #define TEAM_PVTMED 14
- #define TEAM_BOUNTYHUNTER 15
- #define TEAM_CONARTIST 16
- #define TEAM_KIDNAPPER 17
- #define TEAM_PRIVLAYWER 18
- #define TEAM_TERRORIST 19
- #define TEAM_SALESMAN 20
- #define CIVILIAN_DIALOG 631
- //-----------------------------------------------------------COLORS--------------------------------------------------------------
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define RED 0xE60000FF
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_VERYPINK 0xffccccd0
- #define COLOR_RED 0xAA3333AA
- #define COLOR_LIME 0x10F441AA
- #define COLOR_MAGENTA 0xFF00FFFF
- #define COLOR_NAVY 0x000080AA
- #define COLOR_AQUA 0xF0F8FFAA
- #define COLOR_CRIMSON 0xDC143CAA
- #define COLOR_FLBLUE 0x6495EDAA
- #define COLOR_BISQUE 0xFFE4C4AA
- #define COLOR_BLACK 0x000000AA
- #define COLOR_CHARTREUSE 0x7FFF00AA
- #define COLOR_BROWN 0XA52A2AAA
- #define COLOR_CORAL 0xFF7F50AA
- #define COLOR_GOLD 0xB8860BAA
- #define COLOR_GREENYELLOW 0xADFF2FAA
- #define COLOR_INDIGO 0x4B00B0AA
- #define COLOR_IVORY 0xFFFF82AA
- #define COLOR_LAWNGREEN 0x7CFC00AA
- #define COLOR_SEAGREEN 0x20B2AAAA
- #define COLOR_LIMEGREEN 0x32CD32AA
- #define COLOR_MIDNIGHTBLUE 0x191970AA
- #define COLOR_MAROON 0x800000AA
- #define COLOR_OLIVE 0x808000AA
- #define COLOR_ORANGERED 0xFF4500AA
- #define COLOR_PINK 0xFFC0CBAA
- #define COLOR_SPRINGGREEN 0x00FF7FAA
- #define COLOR_TOMATO 0xFF6347AA
- #define COLOR_YELLOWGREEN 0x9ACD32AA
- #define COLOR_MEDIUMAQUA 0x83BFBFAA
- #define COLOR_MEDIUMMAGENTA 0x8B008BAA
- #define COLOR_BASIC 0x0066FFAA
- #define COLOR_SAY 0xFFFFFFAA
- #define COLOR_WHISPER 0xFFFFFFAA
- #define COLOR_SHOUT 0xFFFFFFAA
- #define COLOR_ERROR 0xFFFFFFAA
- #define COLOR_ARMY 0x990099ff
- #define COLOR_DODGERBLUE 0x1E90FFAA
- #define COLOR_ROYALBLUE 0x4169FFAA
- #define COLOR_PURPLE 0x800080AA
- #define COLOR_DARKOLIVEGREEN 0x556B2FAA
- #define COLOR_FORESTGREEN 0x228B22AA
- #define COLOR_BLUEVIOLET 0x8A2BE2AA
- #define COLOR_DEADCONNECT 0x808080AA
- #pragma unused ReturnUser
- //--------------------------------------------------------NEW----------------------------------------------------------------------------------
- new RapedPlyRecent[MAX_PLAYERS];
- new bool:TimerSet = false; // Prevents the timer from being set multiple times.
- new EchoConnection;
- new EchoChan[15] = "#your-channel"; // This is the channel you want your echo to be in, as well as the !say command.
- new Connections = 0;
- new gTeam[MAX_PLAYERS];
- new PlayerTazed[MAX_PLAYERS];
- new InBank[MAX_PLAYERS];
- new CanChooseSkill[MAX_PLAYERS];
- new Jailed[MAX_PLAYERS];
- new id;
- new oname[26];
- new szstring[100];
- new string[100];
- new cd_timer;
- new cd_sec;
- new pname[30];
- new mname[24];
- new oscore;
- new RecentAskedMechanic[MAX_PLAYERS];
- new LawEnforcementRadio[MAX_PLAYERS];
- new HasLawEnforcementRadio[MAX_PLAYERS];
- new ReqBkRecent[MAX_PLAYERS];
- new ReqBk[MAX_PLAYERS];
- new EscapedConvict[MAX_PLAYERS];
- new Taxipass[MAX_PLAYERS];
- new Driveronduty[MAX_PLAYERS];
- new IsSpawned[MAX_PLAYERS];
- new hastazer[MAX_PLAYERS];
- new Tazed[MAX_PLAYERS];
- // Text Draws
- //new Text:txtWebAddress;
- //new Text:txtScriptVers;
- new Text:txtTypeSkill1;
- new Text:txtTypeSkill3;
- new commitedcrimerecently[MAX_PLAYERS];
- new copshavevc[MAX_PLAYERS];
- new cuffed[MAX_PLAYERS];
- new CuffedTime[MAX_PLAYERS];
- new CasSecLastPlayerCuffed[MAX_PLAYERS];
- new LeftTwoFourSeven[MAX_PLAYERS];
- new TimeToMoveTwoFourSeven[MAX_PLAYERS];
- new InAlcatraz[MAX_PLAYERS];
- new JailTime[MAX_PLAYERS];
- new JailTimeServed[MAX_PLAYERS];
- new cannotescapejail[MAX_PLAYERS];
- new StoleCopCarRecent[MAX_PLAYERS];
- new triedtoescaperecent[MAX_PLAYERS];
- new fixedcarrecent[MAX_PLAYERS];
- new SandInEngine[MAX_VEHICLES];
- new lowwantedkiller[MAX_PLAYERS];
- new wantsheal[MAX_PLAYERS];
- new wantscure[MAX_PLAYERS];
- new InfectedPlyRecent[MAX_PLAYERS];
- new Chlamydia[MAX_PLAYERS];
- new Salmonella[MAX_PLAYERS];
- new VisitReq[MAX_PLAYERS];
- new VisitReqExpires[MAX_PLAYERS];
- new SpamStrings[MAX_PLAYERS];
- new Muted[MAX_PLAYERS];
- new RobbedPlyRecent[MAX_PLAYERS];
- new beenrobbedrecently[MAX_PLAYERS];
- new HasWallet[MAX_PLAYERS];
- new OldCash[MAX_PLAYERS];
- new PlayerAdminLevel[MAX_PLAYERS];
- new Kicking[MAX_PLAYERS];
- new PlayerName[32];
- enum zoneinfo {
- zone_name[27],
- Float:zone_minx,
- Float:zone_miny,
- Float:zone_minz,
- Float:zone_maxx,
- Float:zone_maxy,
- Float:zone_maxz
- }
- new Float:zones[][zoneinfo] = {
- { "LV Drug House (Int)", 2363.7732, -1135.5873, 1050.8750, 2366.7190, -1125.8083, 1050.8826},
- { "Alcatraz", 3539.1328, 382.3327, -5.0000, 4085.4063, 560.8972, 500.5000},
- { "Alcatraz (Int)", 240.3424, 107.4418, 998.0156, 260.3839, 119.8392, 1008.8303},
- { "Alcatraz (Int)", 213.9791, 107.4416, 999.0100, 229.0557, 116.0217, 999.0180},
- { "LV City Bank", 2333.6050, 1538.5920, 9.0184, 2420.1487, 1607.1777, 500.5000},
- { "LV City Bank (Int)", 2306.0767, -17.3174, 26.5496, 2317.1667, -0.1374, 26.7696},
- { "Regular Players Lounge", 2082.1758, 1203.3190, 6.0203, 2125.7268, 1278.4438, 500.5000},
- { "Casino", 2078.8538, 1306.0410, 9.0203, 2114.8035, 1364.4226, 500.5000},
- { "AutoBahn", 2087.7778, 1384.0966, 9.0203, 2203.1501, 1440.7141, 500.5000},
- { "AutoBahn Lane", 2184.8328, 1447.0826, 9.0203, 2195.3687, 1522.7858, 500.5000},
- { "LV MultiStory", 2257.6921, 1383.5364, 9.0203, 2357.7520, 1523.2224, 500.5000},
- { "LV Pyramid", 2237.4563, 1205.2041, 9.0203, 2416.4814, 1362.8427, 500.5000},
- { "LV City Hall", 2354.4023, 1079.9636, 9.0203, 2420.8870, 1186.4084, 500.5000},
- { "LV Transfender", 2352.2302, 956.4175, 9.0203, 2421.1843, 1066.9310, 500.5000},
- { "LV Gas Station", 2617.8508, 1062.8749, 9.0203, 2657.1074, 1142.5132, 500.5000},
- { "Casino Security HQ", 1878.7798, 944.3989, 9.0203, 1923.6537, 966.3892, 500.5000},
- { "Four Dragons Casino", 1878.7661, 970.0151, 9.0203, 2035.9320, 1082.8287, 500.5000},
- { "The Strip [South]", 2037.4653, 863.7079, 4.0203, 2076.8149, 1702.8253, 500.5000},
- { "Caligulas Casino", 2087.7002, 1543.7769, 9.8203, 2317.1528, 1763.7645, 500.5000},
- { "RPL (Int)", 956.4382, -61.9423, 1000.1172, 964.4373, -43.0153, 1003.5865},
- { "RPL Bar (Int)", 965.8417, -49.4062, 1000.1172, 971.5218, -43.1668, 1003.5865},
- { "Bedroom", 943.2505, -48.6990, 1000.1172, 948.3954, -40.9521, 1003.5865},
- { "LVPD HQ", 2234.2024, 2419.3340, -8.4531, 2360.7454, 2507.3718, 500.5000},
- { "LV Aircraft Carrier", 2782.5579, 441.7090, -5.0000, 3166.1729, 520.0420, 500.5000},
- { "24/7 store", -36.6344, -57.9175, 1003.3469, -17.3938, -48.9887, 1003.8469},
- { "The Big Ear", -410.00, 1403.30, -3.00, -137.90, 1681.20, 200.00},
- { "Aldea Malvada", -1372.10, 2498.50, 0.00, -1277.50, 2615.30, 200.00},
- { "Angel Pine", -2324.90, -2584.20, -6.10, -1964.20, -2212.10, 200.00},
- { "Arco del Oeste", -901.10, 2221.80, 0.00, -592.00, 2571.90, 200.00},
- { "Avispa Country Club", -2646.40, -355.40, 0.00, -2270.00, -222.50, 200.00},
- { "Avispa Country Club", -2831.80, -430.20, -6.10, -2646.40, -222.50, 200.00},
- { "Avispa Country Club", -2361.50, -417.10, 0.00, -2270.00, -355.40, 200.00},
- { "Avispa Country Club", -2667.80, -302.10, -28.80, -2646.40, -262.30, 71.10},
- { "Avispa Country Club", -2470.00, -355.40, 0.00, -2270.00, -318.40, 46.10},
- { "Avispa Country Club", -2550.00, -355.40, 0.00, -2470.00, -318.40, 39.70},
- { "Back o Beyond", -1166.90, -2641.10, 0.00, -321.70, -1856.00, 200.00},
- { "Battery Point", -2741.00, 1268.40, -4.50, -2533.00, 1490.40, 200.00},
- { "Bayside", -2741.00, 2175.10, 0.00, -2353.10, 2722.70, 200.00},
- { "Bayside Marina", -2353.10, 2275.70, 0.00, -2153.10, 2475.70, 200.00},
- { "Beacon Hill", -399.60, -1075.50, -1.40, -319.00, -977.50, 198.50},
- { "Blackfield", 964.30, 1203.20, -89.00, 1197.30, 1403.20, 110.90},
- { "Blackfield", 964.30, 1403.20, -89.00, 1197.30, 1726.20, 110.90},
- { "Blackfield Chapel", 1375.60, 596.30, -89.00, 1558.00, 823.20, 110.90},
- { "Blackfield Chapel", 1325.60, 596.30, -89.00, 1375.60, 795.00, 110.90},
- { "Blackfield Intersection", 1197.30, 1044.60, -89.00, 1277.00, 1163.30, 110.90},
- { "Blackfield Intersection", 1166.50, 795.00, -89.00, 1375.60, 1044.60, 110.90},
- { "Blackfield Intersection", 1277.00, 1044.60, -89.00, 1315.30, 1087.60, 110.90},
- { "Blackfield Intersection", 1375.60, 823.20, -89.00, 1457.30, 919.40, 110.90},
- { "Blueberry", 104.50, -220.10, 2.30, 349.60, 152.20, 200.00},
- { "Blueberry", 19.60, -404.10, 3.80, 349.60, -220.10, 200.00},
- { "Blueberry Acres", -319.60, -220.10, 0.00, 104.50, 293.30, 200.00},
- { "Calton Heights", -2274.10, 744.10, -6.10, -1982.30, 1358.90, 200.00},
- { "Chinatown", -2274.10, 578.30, -7.60, -2078.60, 744.10, 200.00},
- { "Commerce", 1323.90, -1842.20, -89.00, 1701.90, -1722.20, 110.90},
- { "Commerce", 1323.90, -1722.20, -89.00, 1440.90, -1577.50, 110.90},
- { "Commerce", 1370.80, -1577.50, -89.00, 1463.90, -1384.90, 110.90},
- { "Commerce", 1463.90, -1577.50, -89.00, 1667.90, -1430.80, 110.90},
- { "Commerce", 1583.50, -1722.20, -89.00, 1758.90, -1577.50, 110.90},
- { "Commerce", 1667.90, -1577.50, -89.00, 1812.60, -1430.80, 110.90},
- { "Conference Center", 1046.10, -1804.20, -89.00, 1323.90, -1722.20, 110.90},
- { "Conference Center", 1073.20, -1842.20, -89.00, 1323.90, -1804.20, 110.90},
- { "Cranberry Station", -2007.80, 56.30, 0.00, -1922.00, 224.70, 100.00},
- { "Class Selection", 942.5793, 0.2095, 1000.9295, 947.4127, 4.8616, 1000.9299},
- { "Creek", 2749.90, 1937.20, -89.00, 2921.60, 2669.70, 110.90},
- { "Dillimore", 580.70, -674.80, -9.50, 861.00, -404.70, 200.00},
- { "Doherty", -2270.00, -324.10, -0.00, -1794.90, -222.50, 200.00},
- { "Doherty", -2173.00, -222.50, -0.00, -1794.90, 265.20, 200.00},
- { "Downtown", -1982.30, 744.10, -6.10, -1871.70, 1274.20, 200.00},
- { "Downtown", -1871.70, 1176.40, -4.50, -1620.30, 1274.20, 200.00},
- { "Downtown", -1700.00, 744.20, -6.10, -1580.00, 1176.50, 200.00},
- { "Downtown", -1580.00, 744.20, -6.10, -1499.80, 1025.90, 200.00},
- { "Downtown", -2078.60, 578.30, -7.60, -1499.80, 744.20, 200.00},
- { "Downtown", -1993.20, 265.20, -9.10, -1794.90, 578.30, 200.00},
- { "Downtown Los Santos", 1463.90, -1430.80, -89.00, 1724.70, -1290.80, 110.90},
- { "Downtown Los Santos", 1724.70, -1430.80, -89.00, 1812.60, -1250.90, 110.90},
- { "Downtown Los Santos", 1463.90, -1290.80, -89.00, 1724.70, -1150.80, 110.90},
- { "Downtown Los Santos", 1370.80, -1384.90, -89.00, 1463.90, -1170.80, 110.90},
- { "Downtown Los Santos", 1724.70, -1250.90, -89.00, 1812.60, -1150.80, 110.90},
- { "Downtown Los Santos", 1370.80, -1170.80, -89.00, 1463.90, -1130.80, 110.90},
- { "Downtown Los Santos", 1378.30, -1130.80, -89.00, 1463.90, -1026.30, 110.90},
- { "Downtown Los Santos", 1391.00, -1026.30, -89.00, 1463.90, -926.90, 110.90},
- { "Downtown Los Santos", 1507.50, -1385.20, 110.90, 1582.50, -1325.30, 335.90},
- { "East Beach", 2632.80, -1852.80, -89.00, 2959.30, -1668.10, 110.90},
- { "East Beach", 2632.80, -1668.10, -89.00, 2747.70, -1393.40, 110.90},
- { "East Beach", 2747.70, -1668.10, -89.00, 2959.30, -1498.60, 110.90},
- { "East Beach", 2747.70, -1498.60, -89.00, 2959.30, -1120.00, 110.90},
- { "East Los Santos", 2421.00, -1628.50, -89.00, 2632.80, -1454.30, 110.90},
- { "East Los Santos", 2222.50, -1628.50, -89.00, 2421.00, -1494.00, 110.90},
- { "East Los Santos", 2266.20, -1494.00, -89.00, 2381.60, -1372.00, 110.90},
- { "East Los Santos", 2381.60, -1494.00, -89.00, 2421.00, -1454.30, 110.90},
- { "East Los Santos", 2281.40, -1372.00, -89.00, 2381.60, -1135.00, 110.90},
- { "East Los Santos", 2381.60, -1454.30, -89.00, 2462.10, -1135.00, 110.90},
- { "East Los Santos", 2462.10, -1454.30, -89.00, 2581.70, -1135.00, 110.90},
- { "Easter Basin", -1794.90, 249.90, -9.10, -1242.90, 578.30, 200.00},
- { "Easter Basin", -1794.90, -50.00, -0.00, -1499.80, 249.90, 200.00},
- { "Easter Bay Airport", -1499.80, -50.00, -0.00, -1242.90, 249.90, 200.00},
- { "Easter Bay Airport", -1794.90, -730.10, -3.00, -1213.90, -50.00, 200.00},
- { "Easter Bay Airport", -1213.90, -730.10, 0.00, -1132.80, -50.00, 200.00},
- { "Easter Bay Airport", -1242.90, -50.00, 0.00, -1213.90, 578.30, 200.00},
- { "Easter Bay Airport", -1213.90, -50.00, -4.50, -947.90, 578.30, 200.00},
- { "Easter Bay Airport", -1315.40, -405.30, 15.40, -1264.40, -209.50, 25.40},
- { "Easter Bay Airport", -1354.30, -287.30, 15.40, -1315.40, -209.50, 25.40},
- { "Easter Bay Airport", -1490.30, -209.50, 15.40, -1264.40, -148.30, 25.40},
- { "Easter Bay Chemicals", -1132.80, -768.00, 0.00, -956.40, -578.10, 200.00},
- { "Easter Bay Chemicals", -1132.80, -787.30, 0.00, -956.40, -768.00, 200.00},
- { "El Castillo del Diablo", -464.50, 2217.60, 0.00, -208.50, 2580.30, 200.00},
- { "El Castillo del Diablo", -208.50, 2123.00, -7.60, 114.00, 2337.10, 200.00},
- { "El Castillo del Diablo", -208.50, 2337.10, 0.00, 8.40, 2487.10, 200.00},
- { "El Corona", 1812.60, -2179.20, -89.00, 1970.60, -1852.80, 110.90},
- { "El Corona", 1692.60, -2179.20, -89.00, 1812.60, -1842.20, 110.90},
- { "El Quebrados", -1645.20, 2498.50, 0.00, -1372.10, 2777.80, 200.00},
- { "Esplanade East", -1620.30, 1176.50, -4.50, -1580.00, 1274.20, 200.00},
- { "Esplanade East", -1580.00, 1025.90, -6.10, -1499.80, 1274.20, 200.00},
- { "Esplanade East", -1499.80, 578.30, -79.60, -1339.80, 1274.20, 20.30},
- { "Esplanade North", -2533.00, 1358.90, -4.50, -1996.60, 1501.20, 200.00},
- { "Esplanade North", -1996.60, 1358.90, -4.50, -1524.20, 1592.50, 200.00},
- { "Esplanade North", -1982.30, 1274.20, -4.50, -1524.20, 1358.90, 200.00},
- { "Fallen Tree", -792.20, -698.50, -5.30, -452.40, -380.00, 200.00},
- { "Fallow Bridge", 434.30, 366.50, 0.00, 603.00, 555.60, 200.00},
- { "Fern Ridge", 508.10, -139.20, 0.00, 1306.60, 119.50, 200.00},
- { "Financial", -1871.70, 744.10, -6.10, -1701.30, 1176.40, 300.00},
- { "Fisher's Lagoon", 1916.90, -233.30, -100.00, 2131.70, 13.80, 200.00},
- { "Flint Intersection", -187.70, -1596.70, -89.00, 17.00, -1276.60, 110.90},
- { "Flint Range", -594.10, -1648.50, 0.00, -187.70, -1276.60, 200.00},
- { "Fort Carson", -376.20, 826.30, -3.00, 123.70, 1220.40, 200.00},
- { "Foster Valley", -2270.00, -430.20, -0.00, -2178.60, -324.10, 200.00},
- { "Foster Valley", -2178.60, -599.80, -0.00, -1794.90, -324.10, 200.00},
- { "Foster Valley", -2178.60, -1115.50, 0.00, -1794.90, -599.80, 200.00},
- { "Foster Valley", -2178.60, -1250.90, 0.00, -1794.90, -1115.50, 200.00},
- { "Frederick Bridge", 2759.20, 296.50, 0.00, 2774.20, 594.70, 200.00},
- { "Gant Bridge", -2741.40, 1659.60, -6.10, -2616.40, 2175.10, 200.00},
- { "Gant Bridge", -2741.00, 1490.40, -6.10, -2616.40, 1659.60, 200.00},
- { "Ganton", 2222.50, -1852.80, -89.00, 2632.80, -1722.30, 110.90},
- { "Ganton", 2222.50, -1722.30, -89.00, 2632.80, -1628.50, 110.90},
- { "Garcia", -2411.20, -222.50, -0.00, -2173.00, 265.20, 200.00},
- { "Garcia", -2395.10, -222.50, -5.30, -2354.00, -204.70, 200.00},
- { "Garver Bridge", -1339.80, 828.10, -89.00, -1213.90, 1057.00, 110.90},
- { "Garver Bridge", -1213.90, 950.00, -89.00, -1087.90, 1178.90, 110.90},
- { "Garver Bridge", -1499.80, 696.40, -179.60, -1339.80, 925.30, 20.30},
- { "Glen Park", 1812.60, -1449.60, -89.00, 1996.90, -1350.70, 110.90},
- { "Glen Park", 1812.60, -1100.80, -89.00, 1994.30, -973.30, 110.90},
- { "Glen Park", 1812.60, -1350.70, -89.00, 2056.80, -1100.80, 110.90},
- { "Green Palms", 176.50, 1305.40, -3.00, 338.60, 1520.70, 200.00},
- { "Greenglass College", 964.30, 1044.60, -89.00, 1197.30, 1203.20, 110.90},
- { "Greenglass College", 964.30, 930.80, -89.00, 1166.50, 1044.60, 110.90},
- { "Hampton Barns", 603.00, 264.30, 0.00, 761.90, 366.50, 200.00},
- { "Hankypanky Point", 2576.90, 62.10, 0.00, 2759.20, 385.50, 200.00},
- { "Harry Gold Parkway", 1777.30, 863.20, -89.00, 1817.30, 2342.80, 110.90},
- { "Hashbury", -2593.40, -222.50, -0.00, -2411.20, 54.70, 200.00},
- { "Hilltop Farm", 967.30, -450.30, -3.00, 1176.70, -217.90, 200.00},
- { "Hunter Quarry", 337.20, 710.80, -115.20, 860.50, 1031.70, 203.70},
- { "Idlewood", 1812.60, -1852.80, -89.00, 1971.60, -1742.30, 110.90},
- { "Idlewood", 1812.60, -1742.30, -89.00, 1951.60, -1602.30, 110.90},
- { "Idlewood", 1951.60, -1742.30, -89.00, 2124.60, -1602.30, 110.90},
- { "Idlewood", 1812.60, -1602.30, -89.00, 2124.60, -1449.60, 110.90},
- { "Idlewood", 2124.60, -1742.30, -89.00, 2222.50, -1494.00, 110.90},
- { "Idlewood", 1971.60, -1852.80, -89.00, 2222.50, -1742.30, 110.90},
- { "Jefferson", 1996.90, -1449.60, -89.00, 2056.80, -1350.70, 110.90},
- { "Jefferson", 2124.60, -1494.00, -89.00, 2266.20, -1449.60, 110.90},
- { "Jefferson", 2056.80, -1372.00, -89.00, 2281.40, -1210.70, 110.90},
- { "Jefferson", 2056.80, -1210.70, -89.00, 2185.30, -1126.30, 110.90},
- { "Jefferson", 2185.30, -1210.70, -89.00, 2281.40, -1154.50, 110.90},
- { "Jefferson", 2056.80, -1449.60, -89.00, 2266.20, -1372.00, 110.90},
- { "Julius Thruway East", 2623.10, 943.20, -89.00, 2749.90, 1055.90, 110.90},
- { "Julius Thruway East", 2685.10, 1055.90, -89.00, 2749.90, 2626.50, 110.90},
- { "Julius Thruway East", 2536.40, 2442.50, -89.00, 2685.10, 2542.50, 110.90},
- { "Julius Thruway East", 2625.10, 2202.70, -89.00, 2685.10, 2442.50, 110.90},
- { "Julius Thruway North", 2498.20, 2542.50, -89.00, 2685.10, 2626.50, 110.90},
- { "Julius Thruway North", 2237.40, 2542.50, -89.00, 2498.20, 2663.10, 110.90},
- { "Julius Thruway North", 2121.40, 2508.20, -89.00, 2237.40, 2663.10, 110.90},
- { "Julius Thruway North", 1938.80, 2508.20, -89.00, 2121.40, 2624.20, 110.90},
- { "Julius Thruway North", 1534.50, 2433.20, -89.00, 1848.40, 2583.20, 110.90},
- { "Julius Thruway North", 1848.40, 2478.40, -89.00, 1938.80, 2553.40, 110.90},
- { "Julius Thruway North", 1704.50, 2342.80, -89.00, 1848.40, 2433.20, 110.90},
- { "Julius Thruway North", 1377.30, 2433.20, -89.00, 1534.50, 2507.20, 110.90},
- { "Julius Thruway South", 1457.30, 823.20, -89.00, 2377.30, 863.20, 110.90},
- { "Julius Thruway South", 2377.30, 788.80, -89.00, 2537.30, 897.90, 110.90},
- { "Julius Thruway West", 1197.30, 1163.30, -89.00, 1236.60, 2243.20, 110.90},
- { "Julius Thruway West", 1236.60, 2142.80, -89.00, 1297.40, 2243.20, 110.90},
- { "Juniper Hill", -2533.00, 578.30, -7.60, -2274.10, 968.30, 200.00},
- { "Juniper Hollow", -2533.00, 968.30, -6.10, -2274.10, 1358.90, 200.00},
- { "K.A.C.C. Military Fuels", 2498.20, 2626.50, -89.00, 2749.90, 2861.50, 110.90},
- { "Kincaid Bridge", -1339.80, 599.20, -89.00, -1213.90, 828.10, 110.90},
- { "Kincaid Bridge", -1213.90, 721.10, -89.00, -1087.90, 950.00, 110.90},
- { "Kincaid Bridge", -1087.90, 855.30, -89.00, -961.90, 986.20, 110.90},
- { "King's", -2329.30, 458.40, -7.60, -1993.20, 578.30, 200.00},
- { "King's", -2411.20, 265.20, -9.10, -1993.20, 373.50, 200.00},
- { "King's", -2253.50, 373.50, -9.10, -1993.20, 458.40, 200.00},
- { "LVA Freight Depot", 1457.30, 863.20, -89.00, 1777.40, 1143.20, 110.90},
- { "LVA Freight Depot", 1375.60, 919.40, -89.00, 1457.30, 1203.20, 110.90},
- { "LVA Freight Depot", 1277.00, 1087.60, -89.00, 1375.60, 1203.20, 110.90},
- { "LVA Freight Depot", 1315.30, 1044.60, -89.00, 1375.60, 1087.60, 110.90},
- { "LVA Freight Depot", 1236.60, 1163.40, -89.00, 1277.00, 1203.20, 110.90},
- { "Las Barrancas", -926.10, 1398.70, -3.00, -719.20, 1634.60, 200.00},
- { "Las Brujas", -365.10, 2123.00, -3.00, -208.50, 2217.60, 200.00},
- { "Las Colinas", 1994.30, -1100.80, -89.00, 2056.80, -920.80, 110.90},
- { "Las Colinas", 2056.80, -1126.30, -89.00, 2126.80, -920.80, 110.90},
- { "Las Colinas", 2185.30, -1154.50, -89.00, 2281.40, -934.40, 110.90},
- { "Las Colinas", 2126.80, -1126.30, -89.00, 2185.30, -934.40, 110.90},
- { "Las Colinas", 2747.70, -1120.00, -89.00, 2959.30, -945.00, 110.90},
- { "Las Colinas", 2632.70, -1135.00, -89.00, 2747.70, -945.00, 110.90},
- { "Las Colinas", 2281.40, -1135.00, -89.00, 2632.70, -945.00, 110.90},
- { "Las Payasadas", -354.30, 2580.30, 2.00, -133.60, 2816.80, 200.00},
- { "Las Venturas Airport", 1236.60, 1203.20, -89.00, 1457.30, 1883.10, 110.90},
- { "Las Venturas Airport", 1457.30, 1203.20, -89.00, 1777.30, 1883.10, 110.90},
- { "Las Venturas Airport", 1457.30, 1143.20, -89.00, 1777.40, 1203.20, 110.90},
- { "Las Venturas Airport", 1515.80, 1586.40, -12.50, 1729.90, 1714.50, 87.50},
- { "LVPD (Int)", 228.8148, 140.0497, 1003.0000, 248.7047, 169.0779, 1003.0400},
- { "LVPD (Int)", 188.3310, 156.6014, 1003.0000, 203.9910, 180.7771, 1003.0400},
- { "Last Dime Motel", 1823.00, 596.30, -89.00, 1997.20, 823.20, 110.90},
- { "Leafy Hollow", -1166.90, -1856.00, 0.00, -815.60, -1602.00, 200.00},
- { "Lil' Probe Inn", -90.20, 1286.80, -3.00, 153.80, 1554.10, 200.00},
- { "Linden Side", 2749.90, 943.20, -89.00, 2923.30, 1198.90, 110.90},
- { "Linden Station", 2749.90, 1198.90, -89.00, 2923.30, 1548.90, 110.90},
- { "Linden Station", 2811.20, 1229.50, -39.50, 2861.20, 1407.50, 60.40},
- { "Little Mexico", 1701.90, -1842.20, -89.00, 1812.60, -1722.20, 110.90},
- { "Little Mexico", 1758.90, -1722.20, -89.00, 1812.60, -1577.50, 110.90},
- { "Los Flores", 2581.70, -1454.30, -89.00, 2632.80, -1393.40, 110.90},
- { "Los Flores", 2581.70, -1393.40, -89.00, 2747.70, -1135.00, 110.90},
- { "Los Santos International", 1249.60, -2394.30, -89.00, 1852.00, -2179.20, 110.90},
- { "Los Santos International", 1852.00, -2394.30, -89.00, 2089.00, -2179.20, 110.90},
- { "Los Santos International", 1382.70, -2730.80, -89.00, 2201.80, -2394.30, 110.90},
- { "Los Santos International", 1974.60, -2394.30, -39.00, 2089.00, -2256.50, 60.90},
- { "Los Santos International", 1400.90, -2669.20, -39.00, 2189.80, -2597.20, 60.90},
- { "Los Santos International", 2051.60, -2597.20, -39.00, 2152.40, -2394.30, 60.90},
- { "Marina", 647.70, -1804.20, -89.00, 851.40, -1577.50, 110.90},
- { "Marina", 647.70, -1577.50, -89.00, 807.90, -1416.20, 110.90},
- { "Marina", 807.90, -1577.50, -89.00, 926.90, -1416.20, 110.90},
- { "Market", 787.40, -1416.20, -89.00, 1072.60, -1310.20, 110.90},
- { "Market", 952.60, -1310.20, -89.00, 1072.60, -1130.80, 110.90},
- { "Market", 1072.60, -1416.20, -89.00, 1370.80, -1130.80, 110.90},
- { "Market", 926.90, -1577.50, -89.00, 1370.80, -1416.20, 110.90},
- { "Market Station", 787.40, -1410.90, -34.10, 866.00, -1310.20, 65.80},
- { "Martin Bridge", -222.10, 293.30, 0.00, -122.10, 476.40, 200.00},
- { "Missionary Hill", -2994.40, -811.20, 0.00, -2178.60, -430.20, 200.00},
- { "Montgomery", 1119.50, 119.50, -3.00, 1451.40, 493.30, 200.00},
- { "Montgomery", 1451.40, 347.40, -6.10, 1582.40, 420.80, 200.00},
- { "Montgomery Intersection", 1546.60, 208.10, 0.00, 1745.80, 347.40, 200.00},
- { "Montgomery Intersection", 1582.40, 347.40, 0.00, 1664.60, 401.70, 200.00},
- { "Mulholland", 1414.00, -768.00, -89.00, 1667.60, -452.40, 110.90},
- { "Mulholland", 1281.10, -452.40, -89.00, 1641.10, -290.90, 110.90},
- { "Mulholland", 1269.10, -768.00, -89.00, 1414.00, -452.40, 110.90},
- { "Mulholland", 1357.00, -926.90, -89.00, 1463.90, -768.00, 110.90},
- { "Mulholland", 1318.10, -910.10, -89.00, 1357.00, -768.00, 110.90},
- { "Mulholland", 1169.10, -910.10, -89.00, 1318.10, -768.00, 110.90},
- { "Mulholland", 768.60, -954.60, -89.00, 952.60, -860.60, 110.90},
- { "Mulholland", 687.80, -860.60, -89.00, 911.80, -768.00, 110.90},
- { "Mulholland", 737.50, -768.00, -89.00, 1142.20, -674.80, 110.90},
- { "Mulholland", 1096.40, -910.10, -89.00, 1169.10, -768.00, 110.90},
- { "Mulholland", 952.60, -937.10, -89.00, 1096.40, -860.60, 110.90},
- { "Mulholland", 911.80, -860.60, -89.00, 1096.40, -768.00, 110.90},
- { "Mulholland", 861.00, -674.80, -89.00, 1156.50, -600.80, 110.90},
- { "Mulholland Intersection", 1463.90, -1150.80, -89.00, 1812.60, -768.00, 110.90},
- { "North Rock", 2285.30, -768.00, 0.00, 2770.50, -269.70, 200.00},
- { "Ocean Docks", 2373.70, -2697.00, -89.00, 2809.20, -2330.40, 110.90},
- { "Ocean Docks", 2201.80, -2418.30, -89.00, 2324.00, -2095.00, 110.90},
- { "Ocean Docks", 2324.00, -2302.30, -89.00, 2703.50, -2145.10, 110.90},
- { "Ocean Docks", 2089.00, -2394.30, -89.00, 2201.80, -2235.80, 110.90},
- { "Ocean Docks", 2201.80, -2730.80, -89.00, 2324.00, -2418.30, 110.90},
- { "Ocean Docks", 2703.50, -2302.30, -89.00, 2959.30, -2126.90, 110.90},
- { "Ocean Docks", 2324.00, -2145.10, -89.00, 2703.50, -2059.20, 110.90},
- { "Ocean Flats", -2994.40, 277.40, -9.10, -2867.80, 458.40, 200.00},
- { "Ocean Flats", -2994.40, -222.50, -0.00, -2593.40, 277.40, 200.00},
- { "Ocean Flats", -2994.40, -430.20, -0.00, -2831.80, -222.50, 200.00},
- { "Octane Springs", 338.60, 1228.50, 0.00, 664.30, 1655.00, 200.00},
- { "Old Venturas Strip", 2162.30, 2012.10, -89.00, 2685.10, 2202.70, 110.90},
- { "Palisades", -2994.40, 458.40, -6.10, -2741.00, 1339.60, 200.00},
- { "Paradiso", -2741.00, 793.40, -6.10, -2533.00, 1268.40, 200.00},
- { "Pershing Square", 1440.90, -1722.20, -89.00, 1583.50, -1577.50, 110.90},
- { "Pilgrim", 2437.30, 1383.20, -89.00, 2624.40, 1783.20, 110.90},
- { "Pilgrim", 2624.40, 1383.20, -89.00, 2685.10, 1783.20, 110.90},
- { "Pilson Intersection", 1098.30, 2243.20, -89.00, 1377.30, 2507.20, 110.90},
- { "Pirates in Men's Pants", 1817.30, 1469.20, -89.00, 2027.40, 1703.20, 110.90},
- { "Playa del Seville", 2703.50, -2126.90, -89.00, 2959.30, -1852.80, 110.90},
- { "Prickle Pine", 1534.50, 2583.20, -89.00, 1848.40, 2863.20, 110.90},
- { "Prickle Pine", 1117.40, 2507.20, -89.00, 1534.50, 2723.20, 110.90},
- { "Prickle Pine", 1848.40, 2553.40, -89.00, 1938.80, 2863.20, 110.90},
- { "Prickle Pine", 1938.80, 2624.20, -89.00, 2121.40, 2861.50, 110.90},
- { "Queens", -2533.00, 458.40, 0.00, -2329.30, 578.30, 200.00},
- { "Queens", -2593.40, 54.70, 0.00, -2411.20, 458.40, 200.00},
- { "Queens", -2411.20, 373.50, 0.00, -2253.50, 458.40, 200.00},
- { "Randolph Industrial Estate", 1558.00, 596.30, -89.00, 1823.00, 823.20, 110.90},
- { "Redsands East", 1817.30, 2011.80, -89.00, 2106.70, 2202.70, 110.90},
- { "Redsands East", 1817.30, 2202.70, -89.00, 2011.90, 2342.80, 110.90},
- { "Redsands East", 1848.40, 2342.80, -89.00, 2011.90, 2478.40, 110.90},
- { "Redsands West", 1236.60, 1883.10, -89.00, 1777.30, 2142.80, 110.90},
- { "Redsands West", 1297.40, 2142.80, -89.00, 1777.30, 2243.20, 110.90},
- { "Redsands West", 1377.30, 2243.20, -89.00, 1704.50, 2433.20, 110.90},
- { "Redsands West", 1704.50, 2243.20, -89.00, 1777.30, 2342.80, 110.90},
- { "Regular Tom", -405.70, 1712.80, -3.00, -276.70, 1892.70, 200.00},
- { "Richman", 647.50, -1118.20, -89.00, 787.40, -954.60, 110.90},
- { "Richman", 647.50, -954.60, -89.00, 768.60, -860.60, 110.90},
- { "Richman", 225.10, -1369.60, -89.00, 334.50, -1292.00, 110.90},
- { "Richman", 225.10, -1292.00, -89.00, 466.20, -1235.00, 110.90},
- { "Richman", 72.60, -1404.90, -89.00, 225.10, -1235.00, 110.90},
- { "Richman", 72.60, -1235.00, -89.00, 321.30, -1008.10, 110.90},
- { "Richman", 321.30, -1235.00, -89.00, 647.50, -1044.00, 110.90},
- { "Richman", 321.30, -1044.00, -89.00, 647.50, -860.60, 110.90},
- { "Richman", 321.30, -860.60, -89.00, 687.80, -768.00, 110.90},
- { "Richman", 321.30, -768.00, -89.00, 700.70, -674.80, 110.90},
- { "Robada Intersection", -1119.00, 1178.90, -89.00, -862.00, 1351.40, 110.90},
- { "Roca Escalante", 2237.40, 2202.70, -89.00, 2536.40, 2542.50, 110.90},
- { "Roca Escalante", 2536.40, 2202.70, -89.00, 2625.10, 2442.50, 110.90},
- { "Rockshore East", 2537.30, 676.50, -89.00, 2902.30, 943.20, 110.90},
- { "Rockshore West", 1997.20, 596.30, -89.00, 2377.30, 823.20, 110.90},
- { "Rockshore West", 2377.30, 596.30, -89.00, 2537.30, 788.80, 110.90},
- { "Rodeo", 72.60, -1684.60, -89.00, 225.10, -1544.10, 110.90},
- { "Rodeo", 72.60, -1544.10, -89.00, 225.10, -1404.90, 110.90},
- { "Rodeo", 225.10, -1684.60, -89.00, 312.80, -1501.90, 110.90},
- { "Rodeo", 225.10, -1501.90, -89.00, 334.50, -1369.60, 110.90},
- { "Rodeo", 334.50, -1501.90, -89.00, 422.60, -1406.00, 110.90},
- { "Rodeo", 312.80, -1684.60, -89.00, 422.60, -1501.90, 110.90},
- { "Rodeo", 422.60, -1684.60, -89.00, 558.00, -1570.20, 110.90},
- { "Rodeo", 558.00, -1684.60, -89.00, 647.50, -1384.90, 110.90},
- { "Rodeo", 466.20, -1570.20, -89.00, 558.00, -1385.00, 110.90},
- { "Rodeo", 422.60, -1570.20, -89.00, 466.20, -1406.00, 110.90},
- { "Rodeo", 466.20, -1385.00, -89.00, 647.50, -1235.00, 110.90},
- { "Rodeo", 334.50, -1406.00, -89.00, 466.20, -1292.00, 110.90},
- { "San Andreas Sound", 2450.30, 385.50, -100.00, 2759.20, 562.30, 200.00},
- { "Santa Flora", -2741.00, 458.40, -7.60, -2533.00, 793.40, 200.00},
- { "Santa Maria Beach", 342.60, -2173.20, -89.00, 647.70, -1684.60, 110.90},
- { "Santa Maria Beach", 72.60, -2173.20, -89.00, 342.60, -1684.60, 110.90},
- { "Shady Cabin", -1632.80, -2263.40, -3.00, -1601.30, -2231.70, 200.00},
- { "Shady Creeks", -1820.60, -2643.60, -8.00, -1226.70, -1771.60, 200.00},
- { "Shady Creeks", -2030.10, -2174.80, -6.10, -1820.60, -1771.60, 200.00},
- { "Sobell Rail Yards", 2749.90, 1548.90, -89.00, 2923.30, 1937.20, 110.90},
- { "Spinybed", 2121.40, 2663.10, -89.00, 2498.20, 2861.50, 110.90},
- { "Temple", 1252.30, -1130.80, -89.00, 1378.30, -1026.30, 110.90},
- { "Temple", 1252.30, -1026.30, -89.00, 1391.00, -926.90, 110.90},
- { "Temple", 1252.30, -926.90, -89.00, 1357.00, -910.10, 110.90},
- { "Temple", 952.60, -1130.80, -89.00, 1096.40, -937.10, 110.90},
- { "Temple", 1096.40, -1130.80, -89.00, 1252.30, -1026.30, 110.90},
- { "Temple", 1096.40, -1026.30, -89.00, 1252.30, -910.10, 110.90},
- { "The Emerald Isle", 2011.90, 2202.70, -89.00, 2237.40, 2508.20, 110.90},
- { "The Farm", -1209.60, -1317.10, 114.90, -908.10, -787.30, 251.90},
- { "The Mako Span", 1664.60, 401.70, 0.00, 1785.10, 567.20, 200.00},
- { "The Panopticon", -947.90, -304.30, -1.10, -319.60, 327.00, 200.00},
- { "The Sherman Dam", -968.70, 1929.40, -3.00, -481.10, 2155.20, 200.00},
- { "The Visage", 1817.30, 1863.20, -89.00, 2106.70, 2011.80, 110.90},
- { "The Visage", 1817.30, 1703.20, -89.00, 2027.40, 1863.20, 110.90},
- { "Unity Station", 1692.60, -1971.80, -20.40, 1812.60, -1932.80, 79.50},
- { "Valle Ocultado", -936.60, 2611.40, 2.00, -715.90, 2847.90, 200.00},
- { "Verdant Bluffs", 930.20, -2488.40, -89.00, 1249.60, -2006.70, 110.90},
- { "Verdant Bluffs", 1073.20, -2006.70, -89.00, 1249.60, -1842.20, 110.90},
- { "Verdant Bluffs", 1249.60, -2179.20, -89.00, 1692.60, -1842.20, 110.90},
- { "Verdant Meadows", 37.00, 2337.10, -3.00, 435.90, 2677.90, 200.00},
- { "Verona Beach", 647.70, -2173.20, -89.00, 930.20, -1804.20, 110.90},
- { "Verona Beach", 930.20, -2006.70, -89.00, 1073.20, -1804.20, 110.90},
- { "Verona Beach", 851.40, -1804.20, -89.00, 1046.10, -1577.50, 110.90},
- { "Verona Beach", 1161.50, -1722.20, -89.00, 1323.90, -1577.50, 110.90},
- { "Verona Beach", 1046.10, -1722.20, -89.00, 1161.50, -1577.50, 110.90},
- { "Vinewood", 787.40, -1310.20, -89.00, 952.60, -1130.80, 110.90},
- { "Vinewood", 787.40, -1130.80, -89.00, 952.60, -954.60, 110.90},
- { "Vinewood", 647.50, -1227.20, -89.00, 787.40, -1118.20, 110.90},
- { "Vinewood", 647.70, -1416.20, -89.00, 787.40, -1227.20, 110.90},
- { "Whitewood Estates", 883.30, 1726.20, -89.00, 1098.30, 2507.20, 110.90},
- { "Whitewood Estates", 1098.30, 1726.20, -89.00, 1197.30, 2243.20, 110.90},
- { "Willowfield", 1970.60, -2179.20, -89.00, 2089.00, -1852.80, 110.90},
- { "Willowfield", 2089.00, -2235.80, -89.00, 2201.80, -1989.90, 110.90},
- { "Willowfield", 2089.00, -1989.90, -89.00, 2324.00, -1852.80, 110.90},
- { "Willowfield", 2201.80, -2095.00, -89.00, 2324.00, -1989.90, 110.90},
- { "Willowfield", 2541.70, -1941.40, -89.00, 2703.50, -1852.80, 110.90},
- { "Willowfield", 2324.00, -2059.20, -89.00, 2541.70, -1852.80, 110.90},
- { "Willowfield", 2541.70, -2059.20, -89.00, 2703.50, -1941.40, 110.90},
- { "Yellow Bell Station", 1377.40, 2600.40, -21.90, 1492.40, 2687.30, 78.00},
- { "Los Santos", 44.60, -2892.90, -242.90, 2997.00, -768.00, 900.00},
- { "Bone County", -480.50, 596.30, -242.90, 869.40, 2993.80, 900.00},
- { "Tierra Robada", -2997.40, 1659.60, -242.90, -480.50, 2993.80, 900.00},
- { "Tierra Robada", -1213.90, 596.30, -242.90, -480.50, 1659.60, 900.00},
- { "San Fierro", -2997.40, -1115.50, -242.90, -1213.90, 1659.60, 900.00},
- { "Flint County", -1213.90, -2892.90, -242.90, 44.60, -768.00, 900.00},
- { "Whetstone", -2997.40, -2892.90, -242.90, -1213.90, -1115.50, 900.00}};
- new zoneupdates[MAX_PLAYERS];
- new player_zone[MAX_PLAYERS];
- new zoneupdate;
- public update_zones() {
- new line1[10];
- new line2[10];
- for(new i=0; i<MAX_PLAYERS; i++) {
- if(IsPlayerConnected(i) && zoneupdates[i] == 1) {
- if(IsPlayerInZone(i,player_zone[i])) { }
- else {
- new player_zone_before;
- player_zone_before = player_zone[i];
- player_zone[i] = -1;
- for(new j=0; j<sizeof(zones);j++) {
- if(IsPlayerInZone(i,j) && player_zone[i] == -1) {
- if(player_zone_before == -1) GameTextForPlayer(i,zones[j][zone_name],1500,1);
- else if(strcmp(zones[j][zone_name],zones[player_zone_before][zone_name],true) != 0) GameTextForPlayer(i,zones[j][zone_name],1500,1);
- player_zone[i] = j;
- format(line1,10,"p%dzone",i);
- format(line2,10,"%d",j);
- }
- }
- if(player_zone[i] == -1) player_zone[i] = player_zone_before;
- }
- }
- }
- }
- IsPlayerInZone(playerid, zoneid) {
- if(zoneid == -1) return 0;
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid,x,y,z);
- if(x >= zones[zoneid][zone_minx] && x < zones[zoneid][zone_maxx]
- && y >= zones[zoneid][zone_miny] && y < zones[zoneid][zone_maxy]
- && z >= zones[zoneid][zone_minz] && z < zones[zoneid][zone_maxz]
- && z < 1200.0000) return 1;
- return 0;
- }
- //-----------------------------------------------------DEFINES----------------------------------------------------------------------
- #define DISTANCE_SAY 4
- #define DISTANCE_WHISPER 2
- #define DISTANCE_SHOUT 8
- #define SendClientMessageToPlayer
- #define RETURNERROR 1
- #define FIX_DISTANCE 5.0 //Distance between players to be able to fix
- #define BREAK_DISTANCE 5.0 //Distance between players to be able to break
- #define CUFF/UNCUFF_DISTANCE 5.0 //Distance between players to be able to cuff/uncuff
- #define GetDistanceBetweenPlayers
- //-----------------------------------------------------------------FORWARDS------------------------------------------------------------------------
- forward Taze(playerid);
- forward ExitJail(playerid);
- forward countdown();
- forward ProxDetector(Float:radi, playerid, str[], col1, col2, col3, col4, col5);
- forward update_zones();
- forward ReqMechRecentTime();
- forward ReqBkRecentTime();
- forward CopBackUpColour();
- forward TaxiDriverTimer();
- forward TaxiPassengerTimer();
- forward TaxiDriverOffDutyCriminal();
- forward WantedLevelReduce();
- forward copshavevctimer();
- forward SandEngine();
- forward commitedcrimerecent();
- forward AutoUnjail();
- forward HandCuffed();
- forward EscapeCuffsTime();
- forward twofoursevenmoveplayer();
- forward JailCuffs();
- forward AutoUnjailAlcatraz();
- forward StoleCopCarRecentTimer();
- forward TriedToEscapePrisone();
- forward fixedcarrecenttimer();
- forward PolicePayDay();
- forward Tazingtime();
- forward Tazing();
- forward RapedPlayerRecent();
- forward WantedRed();
- forward WantedYellow();
- forward WantedOrange();
- forward WantedInnocent();
- forward WantedLevelReduce();
- forward IsStr(cmd[], str[] );
- forward HasChlamydia();
- forward HasSalmonella();
- forward InfectedPlayerRecent();
- forward VisitReqTimer();
- forward DialogTimeout(playerid);
- forward RobbedPlayerRecent();
- forward playerbeenrobbedrecent();
- forward CashCheck();
- forward AntiJetpack();
- forward EventTimer();
- //-------------------------------------------------------------------------------------------------------------------------------------------------
- main()
- {
- print("\n----------------------------------");
- print(" Killdahobo99's Cops AND Robbers! ");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- ShowNameTags(1);
- ShowPlayerMarkers(1);
- AllowInteriorWeapons(1);
- UsePlayerPedAnims();
- SetTimer("UpdateCmdFreq",2000,1);
- SetTimer("ReqBkRecentTime",50000,1);
- SetTimer("TaxiPassengerTimer", 1000,1);
- SetTimer("TaxiDriverOffDutyCriminal",500,1);
- SetTimer("HandCuffed",5000,1);
- SetTimer("EscapeCuffsTime",1000,1);
- SetTimer("twofoursevenmoveplayer",1000,1);
- SetTimer("JailCuffs",5000,1);
- SetTimer("StoleCopCarRecentTimer",60000,1);
- SetTimer("TriedToEscapePrisone",40000,1);
- SetTimer("fixedcarrecenttimer",1000,1);
- SetTimer("PolicePayDay", 3700000,1);
- SetTimer("Tazing",300,1);
- SetTimer("WantedYellow",100,1);
- SetTimer("WantedOrange",100,1);
- SetTimer("WantedRed",100,1);
- SetTimer("WantedInnocent",100,1);
- SetTimer("WantedLevelReduce",1200000,1);
- SetTimer("HasChlamydia",10000,1);
- SetTimer("HasSalmonella",15000,1);
- SetTimer("InfectedPlayerRecent",61000,1);
- SetTimer("VisitReqTimer",1000,1);
- SetTimer("playerbeenrobbedrecent",1000,1);
- SetTimer("RobbedPlayerRecent",60000,1);
- SetTimer("CashCheck",2000,1);
- SetTimer("AntiJetpack",2000,1 );
- //skins
- AddPlayerClass(281, 1958.3783, 1343.1572, 15.3746, 269.1425, 3, 1, 29, 1000, 27, 1000); //cops
- AddPlayerClass(282, 1958.3783, 1343.1572, 15.3746, 269.1425, 3, 1, 29, 1000, 27, 1000); //cops
- AddPlayerClass(283, 1958.3783, 1343.1572, 15.3746, 269.1425, 3, 1, 22, 1000, 27, 1000); //cops
- AddPlayerClass(284, 1958.3783, 1343.1572, 15.3746, 269.1425, 3, 1, 29, 1000, 27, 1000); //cops
- AddPlayerClass(100, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //RAPISTs
- AddPlayerClass(247, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //RAPISTs
- AddPlayerClass(248, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); //RAPISTs
- AddPlayerClass(275, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 22, 100, 0, 0); //medics
- AddPlayerClass(276, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 22, 100, 0, 0); //medics
- AddPlayerClass(268, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 22, 100, 0, 0); //mechanic
- AddPlayerClass(133,1151.7200,1399.4144,5.8203,0.9030,22,50,0,0,0,0); // taxi spawn male
- AddPlayerClass(151,1151.7200,1399.4144,5.8203,0.9030,22,50,0,0,0,0); // taxi spawn female
- AddPlayerClass(7,2090.1008,2078.2600,10.8203,263.0699,0,0,0,0,0,0); // civil skin
- AddPlayerClass(12,2090.1008,2078.2600,10.8203,263.0699,0,0,0,0,0,0);// civil skin
- AddPlayerClass(23,2090.1008,2078.2600,10.8203,263.0699,0,0,0,0,0,0);// civil skin
- AddPlayerClass(29,2815.0498,2254.1252,10.8203,158.6954,0,0,0,0,0,0); // hoody skin civi
- AddPlayerClass(294,2814.0542,2253.4043,10.8203,315.9051,0,0,0,0,0,0); // woozie skin
- AddPlayerClass(214,2812.1963,2247.7256,10.8203,352.8735,0,0,0,0,0,0); // civi
- AddPlayerClass(1,2634.0793,1072.6293,10.8203,88.4012,0,0,0,0,0,0);// civil skin
- AddPlayerClass(15,2634.0793,1072.6293,10.8203,88.4012,0,0,0,0,0,0);// civil skin
- AddPlayerClass(34,2634.0793,1072.6293,10.8203,88.4012,0,0,0,0,0,0);// civil skin
- AddPlayerClass(2,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0);// civil skin
- AddPlayerClass(9,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0); // civil skin
- AddPlayerClass(19,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0);// civil skin
- AddPlayerClass(22,2193.6528,2007.7402,12.2894,1.8574,0,0,0,0,0,0);// civil skin
- AddPlayerClass(26,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0);// civil skin
- AddPlayerClass(31,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0);// civil skin
- AddPlayerClass(45,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0);// civil skin
- AddPlayerClass(46,2082.0784,2480.8333,10.8203,182.0390,0,0,0,0,0,0);// civil skin
- AddPlayerClass(9,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); // civil skin
- AddPlayerClass(13,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(14,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(24,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(33,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(36,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(38,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(52,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(63,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(75,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(82,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(87,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(92,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(94,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(127,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(128,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(138,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(146,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(147,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(158,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(160,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(204,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(249,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(264,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(269,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(270,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(271,2193.7366,2007.4865,12.2894,358.2378,0,0,0,0,0,0); //civil skin
- AddPlayerClass(141,2193.5884,2007.4149,12.2894,355.9373,0,0,0,0,0,0); // gloris skin
- //cars
- AddStaticVehicle(411, 2040.2279, 1344.4127, 10.6719, 3.5436, 126, 54);//car at startup (pink one)
- AddStaticVehicle(525,1838.2072,-1871.2131,13.2668,359.8898,15,9); // towtruck spawn
- AddStaticVehicle(416,2001.6316,-1416.9932,17.1417,179.4604,1,3); // ambulance 1
- AddStaticVehicle(416,2031.3794,-1447.4681,17.2951,90.1763,1,3); // ambulance 2
- AddStaticVehicle(416,2041.5632,-1427.1017,17.3134,179.9384,1,3); // ambulance 3
- AddStaticVehicle(596,1595.6708,-1709.4218,5.6120,359.4651,0,1); // police car 1
- AddStaticVehicle(596,1591.3555,-1709.4719,5.6115,0.7742,0,1); // police car 2
- AddStaticVehicle(596,1587.4143,-1709.3801,5.6119,0.3866,0,1); // police car 3
- AddStaticVehicle(596,1583.4478,-1709.2052,5.6117,0.7722,0,1); // police car 4
- AddStaticVehicle(596,1578.4871,-1709.1460,5.6116,0.9822,0,1); // police car 5
- AddStaticVehicle(596,1574.5258,-1709.3149,5.6117,0.0858,0,1); // police car 6
- AddStaticVehicle(596,1570.1759,-1708.9761,5.6116,359.8893,0,1); // police car 7
- AddStaticVehicle(427,1586.2490,-1667.6289,6.0242,269.0723,0,1); // police truck 1
- AddStaticVehicle(523,1576.9045,-1620.3688,13.1121,177.8967,52,87); // police bike 1
- AddStaticVehicle(523,1575.2959,-1619.4702,13.1128,179.4936,52,87); // police bike 2
- AddStaticVehicle(523,1573.4370,-1619.1609,13.1174,178.7406,52,87); // police bike 3
- AddStaticVehicle(523,1571.4720,-1619.2458,13.1127,178.4413,52,87); // police bike 4
- AddStaticVehicle(523,1569.1483,-1619.2261,13.1170,178.8356,52,87); // police bike 5
- AddStaticVehicle(523,1567.3580,-1619.2892,13.1177,180.8754,52,87); // police bike 6
- AddStaticVehicle(523,1564.2758,-1618.6649,13.1172,179.9521,52,87); // police bike 7
- AddStaticVehicle(523,1560.9429,-1619.6959,13.1136,178.9873,52,87); // police bike 8
- AddStaticVehicle(596,1538.7184,-1646.4347,5.6117,179.2216,0,1); // police car 9
- AddStaticVehicle(596,1544.4259,-1654.7628,5.6119,88.4707,0,1); // police car 10
- AddStaticVehicle(596,1543.7122,-1667.8077,5.6117,91.4667,0,1); // police car 11
- AddStaticVehicle(596,1543.7365,-1684.3832,5.6121,89.5124,0,1); // police car 12
- AddStaticVehicle(601,1603.8721,-1604.6080,13.2646,89.2274,25,3); // police water truck
- AddStaticVehicle(497,1550.9861,-1609.5383,13.5597,267.1017,0,1); // police helicopter 1
- AddStaticVehicle(432,2785.5745,-2417.8245,13.5100,90.8903,15,9); // tank1
- AddStaticVehicle(432,2786.2795,-2455.9883,13.5101,90.1932,15,9); // tank2
- AddStaticVehicle(432,2787.8340,-2494.3132,13.5281,87.9262,15,9); // tank3
- AddStaticVehicle(420,1679.4591,-2249.7490,13.3541,89.8033,15,9); // taxi 1
- AddStaticVehicle(420,1671.7194,-2249.7466,13.3258,89.9032,15,9); // taxi 2
- AddStaticVehicle(420,1662.3582,-2249.7859,13.3183,90.3345,15,9); // taxi 3
- AddStaticVehicle(420,1699.7119,-2323.3850,13.3403,90.3001,15,9); // taxi 4
- AddStaticVehicle(420,1686.5626,-2323.7249,13.3389,91.4650,15,9); // taxi 5
- AddStaticVehicle(420,1673.2457,-2323.8757,13.3164,91.2138,15,9); // taxi 6
- AddStaticVehicle(409,1662.7511,-2260.3301,13.3722,90.3492,15,9); // limo 1
- AddStaticVehicle(409,1686.6589,-2260.2078,13.3998,90.5434,15,9); // limo 2
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- //RANDOM PUBLICS:
- public SandEngine()
- {
- for(new v = 0; v < MAX_VEHICLES; v++)
- {
- if(SandInEngine[v] == 1)
- {
- new Float:vHealth;
- GetVehicleHealth(v, vHealth);
- SetVehicleHealth(v, vHealth -100);
- }
- }
- }
- public AntiJetpack( )
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && IsSpawned[i] == 1)
- {
- new pSpecialAction = GetPlayerSpecialAction(i);
- if (pSpecialAction == SPECIAL_ACTION_USEJETPACK && PlayerAdminLevel[i] != 1337)
- {
- new inter;
- inter = GetPlayerInterior(i);
- GetPlayerName(i, pname, 30);
- format(string, sizeof(string), "**(AUTO BAN)** %s(%d) Our Anti-Cheat has detected a hax0r",pname,i);
- SendClientMessageToAll(0xFF7F50AA, string);
- SendClientMessage(i,COLOR_RED,"YOU HAVE BEEN DETECTED AS A CHEATER/HACKER");
- SendClientMessage(i,COLOR_RED,"YOU HAVE BEEN BANNED FROM THIS SERVER");
- SendClientMessage(i,COLOR_RED,"If you think this is a mistake. Visit www.sa-rpg.co.uk to appeal this ban");
- format(string, sizeof(string), "**(AUTO BAN)** %s(%d) Our Anti-Cheat has detected a hax0r Det:[JetPack] Int:[%d]",pname,i,inter);
- printf("%s", string);
- if(udb_Exists(PlayerName(i)) && PLAYERLIST_authed[i]) {
- dUserSetINT(PlayerName(i)).("nameban",1);
- }
- SetPlayerInterior(i,10);
- SetPlayerPos(i,219.6257,111.2549,999.0156);
- SetPlayerFacingAngle(i,2.2339);
- SetCameraBehindPlayer(i);
- Banning[i] = 1;
- SetTimer("BanPlayer",700,0);
- }
- }
- }
- }
- public weaponanti()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && IsSpawned[i] == 1 && GetPlayerState(i) == PLAYER_STATE_ONFOOT)
- {
- if (GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 16 || GetPlayerWeapon(i) == 17 || GetPlayerWeapon(i) == 18 || GetPlayerWeapon(i) == 19 || GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36 || GetPlayerWeapon(i) == 37 || GetPlayerWeapon(i) == 39 || GetPlayerWeapon(i) == 4)
- {
- if(PlayerAdminLevel[i] != 1337) {
- new pname[30];
- new string[256];
- new inter;
- inter = GetPlayerInterior(i);
- new wep = GetPlayerWeapon(i);
- GetPlayerName(i, pname, 30);
- format(string, sizeof(string), "**(AUTO BAN)** %s(%d) Our Anti-Cheat has detected a hax0r",pname,i);
- SendClientMessageToAll(0xFF7F50AA, string);
- ircSay(EchoConnection, EchoChan,string);
- SendClientMessage(i,COLOR_RED,"YOU HAVE BEEN DETECTED AS A CHEATER/HACKER");
- SendClientMessage(i,COLOR_RED,"YOU HAVE BEEN BANNED FROM THIS SERVER");
- SendClientMessage(i,COLOR_RED,"If you think this is a mistake. Visit www.sa-rpg.co.uk to appeal this ban");
- format(string, sizeof(string), "**(AUTO BAN)** %s(%d) Our Anti-Cheat has detected a hax0r Wep:[%d] Int:[%d]",pname,i,wep,inter);
- printf("%s", string);
- if(udb_Exists(PlayerName(i)) && PLAYERLIST_authed[i]) {
- dUserSetINT(PlayerName(i)).("nameban",1);
- }
- SetPlayerInterior(i,10);
- SetPlayerPos(i,219.6257,111.2549,999.0156);
- SetPlayerFacingAngle(i,2.2339);
- SetCameraBehindPlayer(i);
- Banning[i] = 1;
- SetTimer("BanPlayer",700,0);
- }
- }
- }
- }
- }
- public CashCheck()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- if(GetPlayerMoney(i) > OldCash[i])
- {
- new pname[30];
- new string[100];
- new difference;
- difference = GetPlayerMoney(i) - OldCash[i];
- GetPlayerName(i,pname,30);
- printf("**(CASH INCREASE)** %s(%d) money has increased from $%d to $%d (%d) (%d)",pname,i,OldCash[i],GetPlayerMoney(i),difference,GetPlayerInterior(i));
- format(string, sizeof(string), "**(CASH INCREASE)** %s(%d) money has increased from $%d to $%d (%d) (%d)",pname,i,OldCash[i],GetPlayerMoney(i),difference,GetPlayerInterior(i));
- if(difference >= 1500000 && PlayerAdminLevel[i] != 1337) {
- ResetPlayerMoney(i);
- format(string, sizeof(string), "**(AUTO BAN)** %s(%d) Our Anti-Cheat has detected a hax0r",pname,i);
- SendClientMessageToAll(0xFF7F50AA, string);
- SendClientMessage(i,COLOR_RED,"YOU HAVE BEEN DETECTED AS A CHEATER/HACKER");
- SendClientMessage(i,COLOR_RED,"YOU HAVE BEEN BANNED FROM THIS SERVER");
- SendClientMessage(i,COLOR_RED,"If you think this is a mistake. Visit www.sa-rpg.co.uk to appeal this ban");
- format(string, sizeof(string), "**(AUTO BAN)** %s(%d) Our Anti-Cheat has detected a hax0r Inc:[$%d] Int:[%d]",pname,i,difference,GetPlayerInterior(i));
- printf("%s", string);
- if(udb_Exists(PlayerName(i)) && PLAYERLIST_authed[i]) {
- dUserSetINT(PlayerName(i)).("nameban",1);
- }
- SetPlayerInterior(i,10);
- SetPlayerPos(i,219.6257,111.2549,999.0156);
- SetPlayerFacingAngle(i,2.2339);
- SetCameraBehindPlayer(i);
- Banning[i] = 1;
- SetTimer("BanPlayer",700,0);
- }
- OldCash[i] = GetPlayerMoney(i);
- }
- }
- }
- }
- public playerbeenrobbedrecent()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i) && beenrobbedrecently[i] >=1)
- {
- beenrobbedrecently[i] --;
- }
- }
- }
- public RobbedPlayerRecent()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(RobbedPlyRecent[i] == 1)
- {
- RobbedPlyRecent[i] =0;
- }
- }
- }
- /*public PlayerVarDecrease()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- if(HasCried[i] >=1) {
- HasCried[i] --;
- }
- if(GotCopBriberecently[i] >= 1) {
- GotCopBriberecently[i] --;
- }
- if(SpamStrings[i] >=1) {
- SpamStrings[i] --;
- }
- }
- }
- }
- */
- public RapedPlayerRecent()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(RapedPlyRecent[i] == 1)
- {
- RapedPlyRecent[i] =0;
- }
- }
- }
- public DialogTimeout(playerid)
- {
- if(CanChooseSkill[playerid] == 1)
- {
- // Function to hide the dialogs & unfreeze them.
- CanChooseSkill[playerid] = 0;
- SendClientMessage(playerid, 0x1E90FFAA, "You didn't pick an option in time, therefore we gave you the rapist skill.");
- TogglePlayerControllable(playerid, 1);
- ShowPlayerDialog(playerid, -1, DIALOG_STYLE_INPUT, "Hi this is a useless piece of text", "oi","This too","And so is this."); // Using -1 as dialogid hides the dialogs.
- }
- return 1;
- }
- public VisitReqTimer()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- if(VisitReq[i] == 1)
- {
- if (VisitReqExpires[i] > 0)
- {
- VisitReqExpires[i] --;
- }
- if (VisitReqExpires[i] == 0)
- {
- SendClientMessage(i, 0xA9A9A9AA, "|_Alcatraz Visiting Pass Expired_|");
- SendClientMessage(i,0x00C7FFAA,"The visiting pass given to you has expired");
- VisitReq[i] =0;
- VisitReqExpires[i] =0;
- }
- }
- }
- }
- }
- public HasSalmonella()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new Float:health;
- GetPlayerHealth(i, health);
- if(Salmonella[i] == 1 && health > 5 && IsSpawned[i] == 1 && IsPlayerConnected(i))
- {
- SetPlayerHealth(i, health-5);
- }
- else
- if(Salmonella[i] == 1 && health <= 5 && IsSpawned[i] == 1 && IsPlayerConnected(i))
- {
- new victim[24];
- SetPlayerHealth(i, health-5);
- GetPlayerName(i,victim, 24);
- format(szstring, sizeof(szstring), "%s(%d) Has died from Salmonella",victim,i);
- SendClientMessageToAll(0xB22222AA,szstring);
- }
- }
- }
- public HasChlamydia()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new Float:health;
- GetPlayerHealth(i, health);
- if(Chlamydia[i] == 1 && health > 5 && IsSpawned[i] == 1 && IsPlayerConnected(i))
- {
- SetPlayerHealth(i, health-5);
- }
- else
- if(Chlamydia[i] == 1 && health <= 5 && IsSpawned[i] == 1 && IsPlayerConnected(i))
- {
- new victim[24];
- SetPlayerHealth(i, health-5);
- GetPlayerName(i,victim, 24);
- format(szstring, sizeof(szstring), "%s(%d) Has died from Chlamydia",victim,i);
- SendClientMessageToAll(0xB22222AA,szstring);
- }
- }
- }
- public InfectedPlayerRecent()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(InfectedPlyRecent[i] == 1)
- {
- InfectedPlyRecent[i] =0;
- }
- }
- }
- public WantedOrange()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsSpawned[i] == 1)
- {
- if(GetPlayerWantedLevel(i) >= 4 && GetPlayerWantedLevel(i) <= 9)
- {
- SetPlayerColor(i, COLOR_ORANGE);
- }
- }
- }
- }
- public WantedRed()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsSpawned[i] == 1)
- {
- if(GetPlayerWantedLevel(i) >= 10)
- {
- SetPlayerColor(i, COLOR_RED);
- }
- }
- }
- }
- public WantedInnocent()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsSpawned[i] == 1 && gTeam[i] >= 3)
- {
- if(GetPlayerWantedLevel(i) == 0)
- {
- SetPlayerToTeamColour(i);
- }
- }
- }
- }
- public Tazingtime()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Tazed[i] == 1)
- {
- Tazed[i] =0;
- TogglePlayerControllable(i, 1);
- }
- }
- }
- public Tazing()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Tazed[i] == 1)
- {
- new Float:phealth;
- GetPlayerHealth(i,phealth);
- if(phealth > 50)
- {
- SetPlayerHealth(i, phealth-5);
- PlayerPlaySound(i, 1190, 0.0, 0.0, 0.0);
- TogglePlayerControllable(i, 0);
- }
- }
- }
- }
- public PolicePayDay()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if (gTeam[i] == TEAM_COP && GetPlayerColor(i) == COLOR_BLUE)
- {
- SendClientMessage(i,COLOR_ROYALBLUE,"SAPD RESOURCES: You have received your daily paycheck. $1500 ");
- GivePlayerMoney(i,1500);
- }
- }
- }
- public fixedcarrecenttimer()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i) && IsSpawned[i] ==1)
- {
- if (fixedcarrecent[i] >= 1)
- {
- fixedcarrecent[i] --;
- }
- }
- }
- }
- public TriedToEscapePrisone()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsSpawned[i] == 1 && Jailed[i] == 1)
- {
- if(triedtoescaperecent[i] == 1)
- {
- triedtoescaperecent[i] =0;
- } }
- }
- }
- }
- public EscapeCuffsTime()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- if(IsSpawned[i] == 1 && cuffed[i] == 1)
- {
- if (CuffedTime[i] >= 1)
- {
- CuffedTime[i] --;
- }
- }
- }
- }
- }
- public JailCuffs()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Jailed[i] == 1)
- {
- LeftTwoFourSeven[i] =999;
- TimeToMoveTwoFourSeven[i] =999;
- TogglePlayerControllable(i, 1);
- }
- if(Jailed[i] == 1 && cuffed[i] == 1 && IsPlayerConnected(i))
- {
- cuffed[i] =0;
- SendClientMessage(i,COLOR_WHITE,"LVPD Prison Service: Your handcuffs have been removed");
- }
- }
- }
- public HandCuffed()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(cuffed[i] == 1 && IsPlayerConnected(i))
- {
- GameTextForPlayer(i,"YOU ARE HANDCUFFED",4000,3);
- }
- }
- }
- public twofoursevenmoveplayer()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && IsSpawned[i] == 1 && GetPlayerInterior(i) == 0 && Jailed[i] == 0)
- {
- if(TimeToMoveTwoFourSeven[i] >=1 && TimeToMoveTwoFourSeven[i] <=3)
- {
- TimeToMoveTwoFourSeven[i] --;
- }
- if(TimeToMoveTwoFourSeven[i] == 0)
- {
- if(LeftTwoFourSeven[i] == 1)
- {
- SetPlayerVirtualWorld(i,0);
- SetPlayerInterior(i,0);
- SetPlayerPos(i,1592.2305,2214.1846,10.8203);
- SetPlayerFacingAngle(i,187.0764);
- SetCameraBehindPlayer(i);
- LeftTwoFourSeven[i] =999;
- TimeToMoveTwoFourSeven[i] =999;
- TogglePlayerControllable(i, 1);
- }
- if(LeftTwoFourSeven[i] == 2)
- {
- SetPlayerVirtualWorld(i,0);
- SetPlayerInterior(i,0);
- SetPlayerPos(i,2191.6472,2476.4624,10.8203);
- SetPlayerFacingAngle(i,272.7751);
- SetCameraBehindPlayer(i);
- LeftTwoFourSeven[i] =999;
- TimeToMoveTwoFourSeven[i] =999;
- TogglePlayerControllable(i, 1);
- }
- if(LeftTwoFourSeven[i] == 3)
- {
- SetPlayerVirtualWorld(i,0);
- SetPlayerInterior(i,0);
- SetPlayerPos(i,2630.5876,1124.3673,10.8203);
- SetPlayerFacingAngle(i,177.8683);
- SetCameraBehindPlayer(i);
- LeftTwoFourSeven[i] =999;
- TimeToMoveTwoFourSeven[i] =999;
- TogglePlayerControllable(i, 1);
- }
- if(LeftTwoFourSeven[i] == 4)
- {
- SetPlayerVirtualWorld(i,0);
- SetPlayerInterior(i,0);
- SetPlayerPos(i,2108.0222,901.5873,10.8203);
- SetPlayerFacingAngle(i,2.9187);
- SetCameraBehindPlayer(i);
- LeftTwoFourSeven[i] =999;
- TimeToMoveTwoFourSeven[i] =999;
- TogglePlayerControllable(i, 1);
- }
- if(LeftTwoFourSeven[i] == 5)
- {
- SetPlayerVirtualWorld(i,0);
- SetPlayerInterior(i,0);
- SetPlayerPos(i,664.9492,1726.6813,6.9922);
- SetPlayerFacingAngle(i,42.5792);
- SetCameraBehindPlayer(i);
- LeftTwoFourSeven[i] =999;
- TimeToMoveTwoFourSeven[i] =999;
- TogglePlayerControllable(i, 1);
- }
- if(LeftTwoFourSeven[i] == 6)
- {
- SetPlayerVirtualWorld(i,0);
- SetPlayerInterior(i,0);
- SetPlayerPos(i,2142.6326,2739.4309,10.8203);
- SetPlayerFacingAngle(i,5.6754);
- SetCameraBehindPlayer(i);
- LeftTwoFourSeven[i] =999;
- TimeToMoveTwoFourSeven[i] =999;
- TogglePlayerControllable(i, 1);
- }
- }
- }
- }
- }
- public commitedcrimerecent()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(commitedcrimerecently[i] >= 1)
- {
- commitedcrimerecently[i] --;
- }
- }
- }
- public WantedLevelReduce()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsSpawned[i] == 1)
- {
- if(commitedcrimerecently[i] == 0)
- {
- if(GetPlayerWantedLevel(i) >= 1)
- {
- if(copshavevc[i] == 0)
- {
- new plwl = GetPlayerWantedLevel(i);
- SetPlayerWantedLevel(i,plwl -1);
- new criminal[30];
- plwl = GetPlayerWantedLevel(i);
- new pcol = GetPlayerColor(i);
- GetPlayerName(i,criminal,30);
- format(szstring, sizeof(szstring), "Reduced Wanted Level: %d",plwl);
- SendClientMessage(i, pcol, szstring);
- format(szstring, sizeof(szstring), "**(Reduced Wanted Level)** %s(%d) New Wanted Level: %d",criminal,i,plwl);
- printf("%s",szstring);
- }
- }
- }
- }
- }
- }
- }
- public AutoUnjailAlcatraz()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- if(Jailed[i] == 1 && InAlcatraz[i] == 1)
- {
- if (JailTime[i] > 0)
- {
- JailTime[i] --;
- new jtime;
- jtime = (JailTime[i]);
- format(szstring, sizeof(szstring), "~w~ALCATRAZ~n~..JAILTIME..~n~ %d",jtime);
- GameTextForPlayer(i, szstring, 3000,6);
- JailTimeServed[i] ++;
- }
- if (JailTime[i] == 0)
- {
- GetPlayerName(i, pname, 24);
- new timeserved;
- timeserved = (JailTimeServed[i]);
- SetPlayerPos(i,230.0633,121.7518,1010.2188);
- SetPlayerFacingAngle(i,208.3710);
- SetCameraBehindPlayer(i);
- cannotescapejail[i] =0;
- SendClientMessage(i, 0xA9A9A9AA, "|_Released From Alcatraz_|");
- SendClientMessage(i,0x00C7FFAA,"You have been auto-released from Alcatraz. You are free to leave Alcatraz Island");
- format(szstring, sizeof(szstring), "%s(%d) Has been auto-released from Alcatraz. Time Served: %d Seconds",pname,i,timeserved);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- Jailed[i] = 0;
- InAlcatraz[i] =0;
- JailTimeServed[i] =0;
- }
- }
- }
- }
- }
- public AutoUnjail()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- if(Jailed[i] == 1 && InAlcatraz[i] == 0)
- {
- if (JailTime[i] > 0)
- {
- JailTime[i] --;
- new jtime;
- jtime = (JailTime[i]);
- format(szstring, sizeof(szstring), "~w~..JAILTIME..~n~ %d",jtime);
- GameTextForPlayer(i, szstring, 3000,6);
- JailTimeServed[i] ++;
- }
- if (JailTime[i] == 0)
- {
- GetPlayerName(i, pname, 24);
- new timeserved;
- timeserved = (JailTimeServed[i]);
- SetPlayerInterior(i,3);
- SetPlayerPos(i,210.5272,146.3341,1003.0234);
- SetPlayerFacingAngle(i,179.4662);
- SetCameraBehindPlayer(i);
- cannotescapejail[i] =0;
- SendClientMessage(i, 0xA9A9A9AA, "|_Released From Jail_|");
- SendClientMessage(i,0x00C7FFAA,"You have been auto-released from jail. You are free to leave the Police Station");
- format(szstring, sizeof(szstring), "%s(%d) Has been auto-released from jail. JailTime Served: %d Seconds",pname,i,timeserved);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- Jailed[i] = 0;
- JailTimeServed[i] =0;
- }
- }
- }
- }
- }
- public StoleCopCarRecentTimer()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(StoleCopCarRecent[i] == 1 && IsPlayerConnected(i))
- {
- StoleCopCarRecent[i] =0;
- }
- }
- }
- //------------------------------------------------------------------
- //RANDOM SPAWNS
- // Alcatraz random jail spawns
- new Float:AlcatrazArrestedSpawn[3][4] =
- {
- {219.5959,110.5754,999.0156,329.5980},
- {223.3139,111.6365,999.0156,181.6979},
- {227.4478,110.4877,999.0156,335.7287}
- };
- // Arrested random jail spawns
- new Float:ArrestedSpawn[3][4] =
- {
- {198.1349,162.0804,1003.0300,24.3831},
- {198.1261,174.6805,1003.0234,209.8438},
- {193.7771,175.3129,1003.0234,337.1648}
- };
- //---------------------------------------
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerTeamFromClass(playerid, classid);
- SetPlayerColor(playerid,COLOR_DEADCONNECT);
- SetPlayerPos(playerid, 1578.7716, -1696.0856, 6.2187);
- SetPlayerInterior(playerid, 0);
- SetPlayerFacingAngle(playerid, 44.5271);
- SetPlayerCameraPos(playerid, 1575.2716, -1692.0856, 7.7187);
- SetPlayerCameraLookAt(playerid, 1578.7716, -1696.0856, 6.2187);
- if (classid >= 0 && classid <= 3)
- {
- SetPlayerTeamFromClass(playerid, classid);
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, 1574.4642,-1694.2188,6.2188);
- GameTextForPlayer(playerid, "~b~POLICE OFFICER~n~~w~CITY OFFICER", 3000, 5);
- }
- if (classid >= 4 && classid <= 6)
- {
- SetPlayerTeamFromClass(playerid, classid);
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
- GameTextForPlayer(playerid, " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~~r~~h~RAPIST TEAM!", 6000, 6);
- }
- if (classid >= 7 && classid <= 8)
- {
- SetPlayerTeamFromClass(playerid, classid);
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
- GameTextForPlayer(playerid, "~b~MEDIC", 3000, 5);
- }
- if (classid >= 9 && classid <=9)
- {
- SetPlayerTeamFromClass(playerid, classid);
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
- GameTextForPlayer(playerid, "~w~CAR MECHANIC", 3000, 5);
- }
- if (classid >= 10 && classid <= 11)
- {
- SetPlayerTeamFromClass(playerid, classid);
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
- GameTextForPlayer(playerid, "~g~TAXI DRIVER", 3000, 5);
- }
- if (classid >= 12 && classid <= 57)
- {
- SetPlayerTeamFromClass(playerid, classid);
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, 1879.6774,-2543.1067,17.2344);
- GameTextForPlayer(playerid, "~w~CIVILIAN~b~~n~CHOOSE A JOB WHEN YOU SPAWN", 3000, 5);
- }
- return 1;
- }
- SetPlayerTeamFromClass(playerid, classid)
- {
- if (classid >= 0 && classid <= 3)
- {
- gTeam[playerid] = TEAM_COP;
- }
- else if (classid >= 4 && classid <= 6)
- {
- gTeam[playerid] = TEAM_RAPIST;
- }
- else if (classid >= 7 && classid <= 8)
- {
- gTeam[playerid] = TEAM_MEDIC;
- }
- else if (classid == 9)
- {
- gTeam[playerid] = TEAM_MECHANIC;
- }
- else if (classid >= 10 && classid <= 11)
- {
- gTeam[playerid] = TEAM_DRIVER;
- }
- else if (classid >= 13 && classid <= 57)
- {
- gTeam[playerid] = TEAM_CIVIL;
- }
- return 1;
- }
- SetPlayerToTeamColor(playerid)
- {
- if (gTeam[playerid] == TEAM_COP)
- {
- SetPlayerColor(playerid, COLOR_BLUE);
- }
- else if (gTeam[playerid] == TEAM_RAPIST)
- {
- SetPlayerColor(playerid, COLOR_YELLOWGREEN);
- }
- else if (gTeam[playerid] == TEAM_MEDIC)
- {
- SetPlayerColor(playerid, COLOR_VERYPINK);
- }
- else if (gTeam[playerid] == TEAM_MECHANIC)
- {
- SetPlayerColor(playerid, COLOR_WHITE);
- }
- else if (gTeam[playerid] == TEAM_DRIVER)
- {
- SetPlayerColor(playerid, COLOR_WHITE);
- }
- else if (gTeam[playerid] == TEAM_CIVIL)
- {
- SetPlayerColor(playerid, COLOR_WHITE);
- }
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Jailed[playerid] = 0;
- TogglePlayerClock(playerid, 1);
- SetPlayerMapIcon( playerid, 1, 1568.9421,-1626.2323,13.3828, 30, 0 );
- RecentAskedMechanic[playerid] =0;
- SetPlayerVirtualWorld(playerid,0);
- ResetPlayerWeapons(playerid);
- VisitReq[playerid] =0;
- VisitReqExpires[playerid] =0;
- player_zone[playerid] = -1;
- LawEnforcementRadio[playerid] =0;
- HasLawEnforcementRadio[playerid] =0;
- ReqBk[playerid] =0;
- ReqBkRecent[playerid] =0;
- Driveronduty[playerid] =0;
- InBank[playerid] =0;
- hastazer[playerid] =0;
- commitedcrimerecently[playerid] =0;
- cuffed[playerid] =0;
- CasSecLastPlayerCuffed[playerid] =999;
- LeftTwoFourSeven[playerid] =999;
- InAlcatraz[playerid] =0;
- JailTime[playerid] =0;
- cannotescapejail[playerid] =0;
- StoleCopCarRecent[playerid] =0;
- triedtoescaperecent[playerid] =0;
- EscapedConvict[playerid] =0;
- fixedcarrecent[playerid] =0;
- Tazed[playerid] =0;
- lowwantedkiller[playerid] =0;
- Salmonella[playerid] =0;
- lowwantedkiller[playerid] =0;
- wantsheal[playerid] =0;
- Chlamydia[playerid] =0;
- SpamStrings[playerid] =0;
- Muted[playerid] =0;
- RobbedPlyRecent[playerid] =0;
- beenrobbedrecently[playerid] =0;
- HasWallet[playerid] =0;
- PlayerAdminLevel[playerid] =0;
- Kicking[playerid] =0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- Jailed[playerid] = 0;
- Kicking[playerid] = 0;
- player_zone[playerid] = -1;
- PlayerAdminLevel[playerid] =0;
- if (PLAYERLIST_authed[playerid]) {
- dUserSetINT(PlayerName(playerid)).("money",GetPlayerMoney(playerid));
- dUserSetINT(PlayerName(playerid)).("score",GetPlayerScore(playerid));
- dUserSetINT(PlayerName(playerid)).("robrank",robberrank[playerid]);
- dUserSetINT(PlayerName(playerid)).("respect",respect[playerid]);
- dUserSetINT(PlayerName(playerid)).("teamkills",teamkiller[playerid]);
- dUserSetINT(PlayerName(playerid)).("innocentkills",innocentkiller[playerid]);
- dUserSetINT(PlayerName(playerid)).("lowwantedkills",lowwantedkiller[playerid]);
- dUserSetINT(PlayerName(playerid)).("cashinsured",BankRobInsurance[playerid]);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetCameraBehindPlayer(playerid);
- SetPlayerWantedLevel(playerid, 0);
- SetPlayerToTeamColour(playerid);
- IsSpawned[playerid] =1;
- player_zone[playerid] = -1;
- zoneupdates[playerid] = 1;
- player_zone[playerid] = -1;
- RobbedPlyRecent[playerid] =1;
- if(!zoneupdate) zoneupdate = SetTimer("update_zones",1000,4);
- IsSpawned[playerid] =1;
- if (gTeam[playerid] == TEAM_MEDIC)
- {
- SetPlayerPos( playerid, 2017.6257, -1412.9340, 16.9922);
- }
- else if(gTeam[playerid] == TEAM_COP)
- {
- SendClientMessage(playerid,0x1E90FFAA, "Type /commands for your commands");
- SendClientMessage(playerid,0x1E90FFAA, "POLICE OFFICER: Your job is to keep criminals off the streets of San Andreas");
- SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");
- hastazer[playerid] =1;
- HasLawEnforcementRadio[playerid] =1;
- LawEnforcementRadio[playerid] =1;
- SetPlayerPos( playerid, 1574.4642,-1694.2188, 6.2188);
- TextDrawShowForPlayer(playerid,txtTypeSkill1);
- }
- else if(gTeam[playerid] == TEAM_MECHANIC)
- {
- SendClientMessage(playerid,0x1E90FFAA, "Type /commands for your commands");
- SendClientMessage(playerid,0x1E90FFAA, "CAR MECHANIC: You can fix beat up cars");
- SendClientMessage(playerid,0x1E90FFAA, "Look out for players needing your services on the chat");
- SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");
- SetPlayerPos( playerid, 1848.1210, -1863.0183, 13.5781);
- TextDrawShowForPlayer(playerid,txtTypeSkill3);
- }
- else if (gTeam[playerid] == TEAM_DRIVER)
- {
- SetPlayerPos( playerid, 1679.4591,-2249.7490, 13.3541);
- }
- else if (gTeam[playerid] == TEAM_CIVIL)
- {
- SetPlayerPos( playerid, 2102.7009, -1806.6798, 13.5547 );
- SetPlayerFacingAngle(playerid, 88.6658);
- SetTimerEx("DialogTimeout", 60000, false, "i", playerid);
- CanChooseSkill[playerid] = 1;
- TogglePlayerControllable(playerid, 0);
- SendClientMessage(playerid, 0x1E90FFAA, "Use /skill to pick a skill. If you don't pick one, you'll be given one automatically.");
- SendClientMessage(playerid, 0x1E90FFAA, "You have 60 seconds to pick a skill.");
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- cuffed[playerid] =0;
- JailTime[playerid] =0;
- InAlcatraz[playerid] =0;
- cannotescapejail[playerid] =0;
- triedtoescaperecent[playerid] =0;
- EscapedConvict[playerid] =0;
- IsSpawned[playerid] =0;
- HasLawEnforcementRadio[playerid] =0;
- LawEnforcementRadio[playerid] =0;
- Tazed[playerid] =0;
- wantsheal[playerid] =0;
- Chlamydia[playerid] =0;
- Salmonella[playerid] =0;
- VisitReq[playerid] =0;
- VisitReqExpires[playerid] =0;
- InBank[playerid] =0;
- HasWallet[playerid] =0;
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- DestroyVehicle(vehicleid);
- SandInEngine[vehicleid] =0;
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(SpamStrings[playerid] >= 1) {
- SendClientMessage(playerid, COLOR_ERROR, "DO NOT SPAM! Please wait before talking again!");
- return 0;
- }
- if(Muted[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You are Muted. You Cannot Chat");
- return 0;
- }
- if(strfind(text,"rcon",true)!= -1 )
- {
- return 0;
- }
- if(strfind(text,"login",true)!= -1 )
- {
- return 0;
- }
- new msg[128];
- new name[32];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "\2;%s(%i)\2; - %s",name,playerid,text); // [0] <jacob> hi
- SpamStrings[playerid] ++;
- return 1;
- }
- public OnPlayerCommandText(playerid,cmdtext[])
- {
- new cmd[256];
- new tmp[256];
- new idx;
- new giveplayerid;
- cmd = strtok(cmdtext, idx);
- if(strcmp(cmd, "/cuff", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid]) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not Law Enforcement");
- return 1;
- }
- if(Jailed[playerid] ==1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /cuff (id)");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid)) {
- format(szstring, sizeof(szstring), "ID (%d) is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- GetPlayerName(playerid,oname, 24);
- GetPlayerName(giveplayerid, pname, 24);
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /cuff (id) ID Must be a number");
- return 1;
- }
- if(gTeam[giveplayerid] <= 2) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot handcuff a Law Enforcement agent");
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 4) {
- format(szstring, sizeof(szstring), "%s(%d) Is not close enough you cannot handcuff that player",pname, giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(cuffed[giveplayerid] == 1) {
- format(szstring, sizeof(szstring), "%s(%d) Is already handcuffed",pname, giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(Jailed[giveplayerid] == 1) {
- format(szstring, sizeof(szstring), "%s(%d) Is in jail. You cannot handcuff a prisoner",pname, giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot handcuff a player from inside a car");
- return 1;
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot handcuff a player from inside a car");
- return 1;
- }
- if(GetPlayerState(giveplayerid) == PLAYER_STATE_PASSENGER) {
- format(szstring, sizeof(szstring), "%s(%d) Is in a vehicle. Ask the player to get out before trying to use your handcuffs", pname, giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(GetPlayerState(giveplayerid) == PLAYER_STATE_DRIVER) {
- format(szstring, sizeof(szstring), "%s(%d) Is in a vehicle. Ask the player to get out before trying to use your handcuffs", pname, giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(GetPlayerState(giveplayerid) == PLAYER_STATE_ONFOOT) {
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_Handcuffed_|");
- format(szstring, sizeof(szstring), "%s(%d): Has put handcuffs on you. Use /breakcuffs to attempt an escape",oname, playerid);
- SendClientMessage(giveplayerid, COLOR_DODGERBLUE, szstring);
- TogglePlayerControllable(giveplayerid, 0);
- cuffed[giveplayerid] =1;
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Handcuffed_|");
- format(szstring, sizeof(szstring), "You have placed %s(%d) in handcuffs. Use /search (id) to search for illegal items", pname, giveplayerid);
- SendClientMessage(playerid, COLOR_DODGERBLUE, szstring);
- format(szstring, sizeof(szstring), "Use /ar to arrest this player if he is warrant (Orange/Red).", pname, giveplayerid);
- SendClientMessage(playerid, COLOR_DODGERBLUE, szstring);
- format(szstring, sizeof(szstring), "DO NOT GO AWAY AND LEAVE PLAYERS HANDCUFFED. YOU WILL BE KICKED IF YOU DO", pname, giveplayerid);
- SendClientMessage(playerid, COLOR_DODGERBLUE, szstring);
- }
- return 1;
- }
- if(strcmp(cmd, "/rob", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(cuffed[playerid] == 1) {
- SendClientMessage(playerid,COLOR_ERROR,"You are handcuffed. You cannot use this command");
- return 1;
- }
- if(Jailed[playerid] == 1) {
- SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command in jail");
- return 1;
- }
- if(gTeam[playerid] == TEAM_COP) {
- SendClientMessage(playerid,COLOR_ERROR,"Law Enforcement agents cannot rob people");
- return 1;
- }
- if(gTeam[playerid] == TEAM_ARMY) {
- SendClientMessage(playerid,COLOR_ERROR,"Law Enforcement agents cannot rob people");
- return 1;
- }
- if(gTeam[playerid] == TEAM_LAWYER) {
- SendClientMessage(playerid,COLOR_ERROR,"Lawyers cannot rob people");
- return 1;
- }
- if(gTeam[playerid] == TEAM_CASSEC) {
- SendClientMessage(playerid,COLOR_ERROR,"Casino Security agents cannot rob people");
- return 1;
- }
- if(gTeam[playerid] == TEAM_MEDIC) {
- SendClientMessage(playerid,COLOR_ERROR,"Medics cannot rob people");
- return 1;
- }
- if(gTeam[playerid] == TEAM_JAILTK) {
- SendClientMessage(playerid,COLOR_ERROR,"Jail Turnkeys cannot rob people");
- return 1;
- }
- if(RobbedPlyRecent[playerid] == 1) {
- SendClientMessage(playerid,COLOR_ERROR,"Command used recently... Please wait");
- return 1;
- }
- if(InBank[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot rob a player inside the bank");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /rob (id)");
- return 1;
- }
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /rob (id) ID Must be a number");
- return 1;
- }
- if(strval(tmp) == playerid) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot rob yourself");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid)) {
- format(string, sizeof(string), "ID (%d) is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- new rname[24];
- new vname[24];
- GetPlayerName(playerid,rname, 24);
- GetPlayerName(giveplayerid, vname, 24);
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 3) {
- format(string, sizeof(string), "%s(%d) Is not close enough. You cannot rob that player",vname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid)) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot rob a player from inside a vehicle");
- return 1;
- }
- if(Jailed[giveplayerid] == 1) {
- format(string, sizeof(string), "%s(%d) Is in jail. You cannot rob a prisoner",vname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(cuffed[giveplayerid] == 1) {
- format(string, sizeof(string), "%s(%d) Is handcuffed. You cannot rob a player who is handcuffed",vname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(IsPlayerInAnyVehicle(giveplayerid)) {
- format(string, sizeof(string), "%s(%d) Is in a vehicle. You cannot rob that player",vname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(GetPlayerMoney(giveplayerid) <= 100) {
- format(string, sizeof(string), "%s(%d) Does not have any cash",vname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(beenrobbedrecently[giveplayerid] >= 1) {
- format(string, sizeof(string), "%s(%d) Has been robbed recently. Please wait",vname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(HasWallet[giveplayerid] >= 1) {
- HasWallet[giveplayerid] --;
- format(string, sizeof(string), "%s(%d) has got a secure wallet. You failed to rob any of that players cash",vname,giveplayerid);
- SendClientMessage(playerid, COLOR_RED, string);
- format(string, sizeof(string), "%s(%d) has attempted to rob you. Your wallet will keep your cash secure for %d more rob(s)",rname,playerid,HasWallet[giveplayerid]);
- SendClientMessage(giveplayerid, 0x00C7FFAA, string);
- printf("%s(%d) has attempted to rob %s(%d) Wallet Chances: %d",rname,playerid,vname,giveplayerid,HasWallet[giveplayerid]);
- PlayerPlaySound(giveplayerid, 1190, 0.0, 0.0, 0.0);
- beenrobbedrecently[giveplayerid] =60;
- return 1;
- }
- new pcash = random(GetPlayerMoney(giveplayerid));
- format(string, sizeof(string), "%s(%d) Has robbed $%d from %s(%d)",rname,playerid,pcash,vname,giveplayerid);
- printf("%s", string);
- GivePlayerMoney(playerid,pcash);
- GivePlayerMoney(giveplayerid, -pcash);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_Robbery Victim_|");
- format(string, sizeof(string), "%s(%d) Has robbed $%d from you", rname,playerid,pcash);
- SendClientMessage(giveplayerid, 0xD2691EAA, string);
- OldCash[giveplayerid] -=pcash;
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Robbery Complete_|");
- format(string, sizeof(string), "You have robbed $%d from %s(%d)", pcash,vname,giveplayerid);
- SendClientMessage(playerid, 0x00C7FFAA, string);
- format(string, sizeof(string), "~w~Robbed by ~n~%s(%d)~n~$%d lost",rname,playerid,pcash);
- GameTextForPlayer(giveplayerid,string,5000,3);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- format(string, sizeof(string), "~w~Robbed %s(%d)~n~$%d stolen",vname,giveplayerid,pcash);
- GameTextForPlayer(playerid,string,5000,3);
- RobbedPlyRecent[playerid] =1;
- beenrobbedrecently[giveplayerid] =120;
- commitedcrimerecently[playerid] +=120;
- if(robberrank[playerid] >=0 && robberrank[playerid] <=9) {
- SendClientMessage(playerid,COLOR_WHITE,"Your robbing skill level has been increased. Type /robskill for more info");
- SendClientMessage(playerid,COLOR_WHITE,"Your respect level has been decreased. Type /respect for more information");
- robberrank[playerid] +=1;
- respect[playerid] -=1;
- }
- new current_zone;
- current_zone = player_zone[playerid];
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(LawEnforcementRadio[i] == 1) {
- format(string, sizeof(string), "DISPATCH: (ROBBERY) Suspect: %s(%d) has robbed %s(%d) Location: %s",rname,playerid,vname,giveplayerid,zones[current_zone][zone_name]);
- SendClientMessage(i,COLOR_ROYALBLUE,string);
- }
- }
- if(gTeam[giveplayerid] == TEAM_COP || gTeam[giveplayerid] == TEAM_ARMY) {
- new plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid, plwl +4 );
- }
- else{
- new plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid, plwl +2 );
- }
- new pcol = GetPlayerColor(playerid);
- new plwl = GetPlayerWantedLevel(playerid);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
- format(string, sizeof(string), "(ROBBERY) Wanted Level %d",plwl);
- SendClientMessage(playerid,pcol,string);
- return 1;
- }
- if(strcmp(cmd, "/rape", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(cuffed[playerid] == 1) {
- SendClientMessage(playerid,COLOR_ERROR,"You are handcuffed. You cannot use this command");
- return 1;
- }
- if(gTeam[playerid] == TEAM_LAWYER) {
- SendClientMessage(playerid,COLOR_ERROR,"You are a lawyer. You cannot use this command");
- return 1;
- }
- if(Jailed[playerid] == 1) {
- SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command in jail");
- return 1;
- }
- if(gTeam[playerid] == TEAM_COP) {
- SendClientMessage(playerid,COLOR_ERROR,"Law Enforcement agents cannot rape people");
- return 1;
- }
- if(gTeam[playerid] == TEAM_ARMY) {
- SendClientMessage(playerid,COLOR_ERROR,"Law Enforcement agents cannot rape people");
- return 1;
- }
- if(gTeam[playerid] == TEAM_CASSEC) {
- SendClientMessage(playerid,COLOR_ERROR,"Casino Security agents cannot rape people");
- return 1;
- }
- if(gTeam[playerid] == TEAM_MEDIC) {
- SendClientMessage(playerid,COLOR_ERROR,"Medics cannot rape people");
- return 1;
- }
- if(gTeam[playerid] == TEAM_JAILTK) {
- SendClientMessage(playerid,COLOR_ERROR,"Jail Turnkeys cannot rape people");
- return 1;
- }
- if(RapedPlyRecent[playerid] == 1) {
- SendClientMessage(playerid,COLOR_ERROR,"Command used recently... Please wait");
- return 1;
- }
- if(InBank[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot rape a player inside the bank");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /rape (id)");
- return 1;
- }
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /rape (id) ID Must be a number");
- return 1;
- }
- if(strval(tmp) == playerid) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot rape yourself");
- return 1;
- }
- return 1;
- //giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid)) {
- format(string, sizeof(string), "ID (%d) Is not an active player",giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- new rapername[24];
- new victimname[24];
- GetPlayerName(playerid,rapername, 24);
- GetPlayerName(giveplayerid, victimname, 24);
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 2) {
- format(string, sizeof(string), "%s(%d) Is not close enough. You cannot rape that player",victimname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(Jailed[giveplayerid] == 1) {
- format(string, sizeof(string), "%s(%d) Is in jail. You cannot rape a prisoner",victimname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(cuffed[giveplayerid] == 1) {
- format(string, sizeof(string), "%s(%d) Is handcuffed. You cannot rob a player who is handcuffed",victimname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(IsPlayerInAnyVehicle(giveplayerid)) {
- format(string, sizeof(string), "%s(%d) Is in a vehicle. You cannot rape that player",victimname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- new Float:victimhealth;
- GetPlayerHealth(giveplayerid,victimhealth);
- if(IsSpawned[giveplayerid] == 0) {
- new plwl = GetPlayerWantedLevel(playerid);
- new pcol = GetPlayerColor(playerid);
- SetPlayerWantedLevel(playerid,plwl +1);
- format(string, sizeof(string), "%s(%d) Has raped %s(%d)'s dead, rotting corpse",rapername,playerid,victimname,giveplayerid);
- SendClientMessageToAll(0xB22222AA, string);
- SpamStrings[playerid] ++;
- if(Chlamydia[playerid] == 0) {
- format(string, sizeof(string), "%s(%d) Has been infected with Chlamydia",rapername,playerid);
- SendClientMessageToAll(0x00C7FFAA, string);
- Chlamydia[playerid] =1;
- }
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Rape Complete_|");
- format(string, sizeof(string), "You have raped %s(%d)'s dead body", victimname,giveplayerid);
- SendClientMessage(playerid,0x00C7FFAA,string);
- plwl = GetPlayerWantedLevel(playerid);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
- format(string, sizeof(string), "(CORPSE RAPE) Wanted Level %d",plwl);
- SendClientMessage(playerid,pcol,string);
- return 1;
- }
- if(gTeam[playerid] == TEAM_RAPIST && victimhealth <=25) {
- SetPlayerHealth(giveplayerid,0);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- format(string, sizeof(string), "%s(%d) Has been raped to death by rapist %s(%d)",victimname,giveplayerid,rapername,playerid);
- SendClientMessageToAll(0xB22222AA, string);
- new plwl = GetPlayerWantedLevel(playerid);
- new pcol = GetPlayerColor(playerid);
- SetPlayerWantedLevel(playerid,plwl +10);
- plwl = GetPlayerWantedLevel(playerid);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
- format(string, sizeof(string), "(MURDER) Wanted Level %d",plwl);
- SendClientMessage(playerid,pcol,string);
- format(string, sizeof(string), "~r~RAPED TO DEATH BY~n~~w~%s(%d)",rapername,playerid);
- GameTextForPlayer(giveplayerid,string,5000,3);
- new current_zone;
- current_zone = player_zone[playerid];
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(LawEnforcementRadio[i] == 1) {
- format(string, sizeof(string), "DISPATCH: (MURDER) Suspect: %s(%d) has murdered %s(%d) Location: %s",rapername,playerid,victimname,giveplayerid,zones[current_zone][zone_name]);
- SendClientMessage(i,COLOR_ROYALBLUE,string);
- SendClientMessage(i,COLOR_ROYALBLUE,"DISPATCH: All units in the area respond");
- }
- }
- return 1;
- }
- if(gTeam[playerid] == TEAM_RAPIST) {
- new Float:phealth;
- GetPlayerHealth(giveplayerid,phealth);
- SetPlayerHealth(giveplayerid, phealth-10);
- GetPlayerHealth(playerid,phealth);
- SetPlayerHealth(playerid, phealth+10);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- Chlamydia[giveplayerid] =1;
- format(string, sizeof(string), "%s(%d) Has been infected with Chlamydia",victimname,giveplayerid);
- SendClientMessageToAll(0x00C7FFAA, string);
- }
- if(gTeam[playerid] != TEAM_RAPIST && Chlamydia[playerid] == 1) {
- Chlamydia[giveplayerid] =1;
- format(string, sizeof(string), "%s(%d) Has been infected with Chlamydia",victimname,giveplayerid);
- SendClientMessageToAll(0x00C7FFAA, string);
- format(string, sizeof(string), "You have infected %s(%d) with Chlamydia",victimname,giveplayerid);
- SendClientMessage(playerid,0x00C7FFAA, string);
- }
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_Rape Victim_|");
- format(string, sizeof(string), "%s(%d) Has raped you",rapername,playerid);
- SendClientMessage(giveplayerid, 0xD2691EAA, string);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Rape Complete_|");
- format(string, sizeof(string), "You have raped %s(%d)", victimname,giveplayerid);
- SendClientMessage(playerid, 0x00C7FFAA, string);
- RapedPlyRecent[playerid] =1;
- format(string, sizeof(string), "%s(%d) Has raped %s(%d)",rapername,playerid,victimname,giveplayerid);
- printf("%s", string);
- PlayerPlaySound(giveplayerid, 1190, 0.0, 0.0, 0.0);
- commitedcrimerecently[playerid] +=120;
- new current_zone;
- current_zone = player_zone[playerid];
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(LawEnforcementRadio[i] == 1) {
- format(string, sizeof(string), "DISPATCH: (RAPE) Suspect: %s(%d) has raped %s(%d) Location: %s",rapername,playerid,victimname,giveplayerid,zones[current_zone][zone_name]);
- SendClientMessage(i,COLOR_ROYALBLUE,string);
- }
- }
- if(gTeam[giveplayerid] == TEAM_COP || gTeam[giveplayerid] == TEAM_ARMY) {
- new plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid, plwl +4 );
- }
- else{
- new plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid, plwl +2 );
- }
- new pcol = GetPlayerColor(playerid);
- new plwl = GetPlayerWantedLevel(playerid);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
- format(string, sizeof(string), "(RAPE) Wanted Level %d",plwl);
- SendClientMessage(playerid,pcol,string);
- return 1;
- }
- if(strcmp(cmd, "/fine", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(gTeam[playerid] >= 3) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not Law Enforcement");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /fine (id)");
- return 1;
- }
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /fine (id) ID Must be a number");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid)) {
- format(szstring, sizeof(szstring), "ID (%d) is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- GetPlayerName(playerid,oname, 24);
- GetPlayerName(giveplayerid, pname, 24);
- if(GetPlayerWantedLevel(giveplayerid) == 0) {
- format(szstring, sizeof(szstring), "%s(%d) Is innocent. You cannot issue a fine",pname,giveplayerid);
- SendClientMessage(playerid,COLOR_ERROR,szstring);
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 8) {
- format(szstring, sizeof(szstring), "%s(%d) Is too far away. You cannot issue a fine",pname,giveplayerid);
- SendClientMessage(playerid,COLOR_ERROR,szstring);
- return 1;
- }
- if(GetPlayerWantedLevel(giveplayerid) == 1) {
- format(szstring, sizeof(szstring), "Officer %s(%d) has fined you $500. Your wanted level has been reduced ",oname,playerid);
- SendClientMessage(giveplayerid,COLOR_DODGERBLUE, szstring);
- format(szstring, sizeof(szstring), "~w~You have been fined~n~ ~b~$500");
- GameTextForPlayer(giveplayerid, szstring,5000, 0);
- new plwl = GetPlayerWantedLevel(giveplayerid);
- SetPlayerWantedLevel(giveplayerid,plwl -1);
- GivePlayerMoney(giveplayerid, -500);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- format(szstring, sizeof(szstring), "You have issued a fine to %s(%d) and you receive a collection bonus of $125",pname,giveplayerid);
- SendClientMessage(playerid,COLOR_DODGERBLUE, szstring);
- GivePlayerMoney(playerid, 125);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if(GetPlayerWantedLevel(giveplayerid) == 2) {
- format(szstring, sizeof(szstring), "Officer %s(%d) has fined you $1000. Your wanted level has been reduced ",oname,playerid);
- SendClientMessage(giveplayerid,COLOR_DODGERBLUE, szstring);
- format(szstring, sizeof(szstring), "~w~You have been fined~n~ ~b~$1000");
- GameTextForPlayer(giveplayerid, szstring,5000, 0);
- new plwl = GetPlayerWantedLevel(giveplayerid);
- SetPlayerWantedLevel(giveplayerid,plwl -2);
- GivePlayerMoney(giveplayerid, -1000);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- format(szstring, sizeof(szstring), "You have issued a fine to %s(%d) and you receive a collection bonus of $250",pname,giveplayerid);
- SendClientMessage(playerid,COLOR_DODGERBLUE, szstring);
- GivePlayerMoney(playerid, 250);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if(GetPlayerWantedLevel(giveplayerid) == 3) {
- format(szstring, sizeof(szstring), "Officer %s(%d) has fined you $2000. Your wanted level has been reduced ",oname,playerid);
- SendClientMessage(giveplayerid,COLOR_DODGERBLUE, szstring);
- format(szstring, sizeof(szstring), "~w~You have been fined~n~ ~b~$2000");
- GameTextForPlayer(giveplayerid, szstring,5000, 0);
- new plwl = GetPlayerWantedLevel(giveplayerid);
- SetPlayerWantedLevel(giveplayerid,plwl -3);
- GivePlayerMoney(giveplayerid, -2000);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- format(szstring, sizeof(szstring), "You have issued a fine to %s(%d) and you receive a collection bonus of $500",pname,giveplayerid);
- SendClientMessage(playerid,COLOR_DODGERBLUE, szstring);
- GivePlayerMoney(playerid, 500);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if(GetPlayerWantedLevel(giveplayerid) >= 4) {
- format(szstring, sizeof(szstring), "%s(%d) Has a warrant. You cannot issue a fine. Take the suspect into custody ",pname,giveplayerid);
- SendClientMessage(playerid,COLOR_ERROR, szstring);
- }
- return 1;
- }
- if(strcmp(cmd, "/skill", true) == 0) {
- if(CanChooseSkill[playerid] == 0) return SendClientMessage(playerid, COLOR_DODGERBLUE, "You've already chose a skill or you're not a civilian!");
- new listitems[] = "Rapist\nGun Dealer\nDrug Dealer\nHitman\nPrivate Medic\nBounty Hunter\nCon Artist\nKidnapper\nPrivate Laywer\nTerrorist\nSalesman";
- ShowPlayerDialog(playerid, CIVILIAN_DIALOG, DIALOG_STYLE_LIST, "Choose a skill.", listitems, "Select", "Cancel");
- GameTextForPlayer(playerid, "~g~Choose a skill!", 3000, 0);
- return 1;
- }
- if(strcmp(cmd, "/parole", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(gTeam[playerid] != 1 && gTeam[playerid] != 8) {
- SendClientMessage(playerid, COLOR_ERROR, "Only the Jail Turnkey or Police Officer classes can release prisoners from jail");
- return 1;
- }
- if(Jailed[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /parole (id)");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /parole (id) ID Must be a number");
- return 1;
- }
- if(!IsPlayerConnected(giveplayerid)) {
- format(szstring, sizeof(szstring), "ID (%d) Is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- new prisonername[24];
- new turnkeyname[24];
- GetPlayerName(giveplayerid,prisonername, 24);
- GetPlayerName(playerid, turnkeyname, 24);
- if(InAlcatraz[giveplayerid] == 1) {
- format(szstring, sizeof(szstring), "%s(%d) is in jail on Alcatraz Island. You cannot parole that player",prisonername,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(Jailed[giveplayerid] == 0) {
- format(szstring, sizeof(szstring), "%s(%d) is not in jail",prisonername,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 5) {
- format(szstring, sizeof(szstring), "%s(%d) Is in jail. You are not close enough to parole",prisonername,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- SetPlayerInterior(giveplayerid,3);
- SetPlayerPos(giveplayerid,210.5272,146.3341,1003.0234);
- SetPlayerFacingAngle(giveplayerid,179.4662);
- SetCameraBehindPlayer(giveplayerid);
- Jailed[giveplayerid] = 0;
- JailTime[giveplayerid] =0;
- cannotescapejail[giveplayerid] =0;
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_Released From Jail_|");
- format(szstring, sizeof(szstring), "%s(%d) has released you from jail",turnkeyname,playerid);
- SendClientMessage(giveplayerid, 0x00C7FFAA, szstring);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Prisoner Released_|");
- format(szstring, sizeof(szstring), "You have released %s(%d) from jail",prisonername,giveplayerid);
- SendClientMessage(playerid, 0x00C7FFAA, szstring);
- format(szstring, sizeof(szstring), "%s(%d) Has released %s(%d) from jail early",turnkeyname,playerid,prisonername,giveplayerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- format(szstring, sizeof(szstring), "%s(%d) Has released %s(%d) from jail early",turnkeyname,playerid,prisonername,giveplayerid);
- printf("%s",szstring);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if (strcmp("/cm", cmdtext, true, 3) == 0)
- {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(Jailed[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(HasLawEnforcementRadio[playerid] == 0) {
- SendClientMessage(playerid,COLOR_ERROR,"You do not have a Law Enforcement radio");
- return 1;
- }
- if(LawEnforcementRadio[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "Your Law Enforcement radio is off. Turn it on with /radon before using it");
- return 1;
- }
- if(strlen(cmdtext) <= 4) {
- SendClientMessage(playerid,COLOR_ERROR,"USAGE: /cm MESSAGE");
- return 1;
- }
- else{
- new output[255];
- GetPlayerName(playerid, pname, 24);
- strmid(output,cmdtext,3,strlen(cmdtext));
- format(szstring, sizeof(szstring), "COP MESSAGE: %s(%d) %s",pname,playerid,output);
- printf("%s", szstring);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(LawEnforcementRadio[i] == 1) {
- format(szstring, sizeof(szstring), "COP MESSAGE: %s(%d) %s",pname,playerid,output);
- SendClientMessage(i,COLOR_ROYALBLUE,szstring);
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/heal", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(Jailed[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(gTeam[playerid] != TEAM_MEDIC && gTeam[playerid] != TEAM_PVTMED ) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not a medic");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /heal (id)");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /heal (id) ID Must be a number");
- return 1;
- }
- GetPlayerName(playerid,mname, 24);
- GetPlayerName(giveplayerid, pname, 24);
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 5) {
- format(szstring, sizeof(szstring), "%s(%d) Is not close enough. You cannot heal that player",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(wantsheal[giveplayerid] == 0) {
- format(szstring, sizeof(szstring), "Medic %s(%d) has attempted to heal you. Type /medic if you need a Medic",mname,playerid);
- SendClientMessage(giveplayerid,COLOR_FORESTGREEN, szstring);
- format(szstring, sizeof(szstring), "%s(%d) has not asked for a medic. You cannot heal that player", pname,giveplayerid);
- SendClientMessage(playerid,COLOR_ERROR, szstring);
- }
- else
- if(wantsheal[giveplayerid] == 1) {
- new mrand = random(3500);
- oscore = GetPlayerScore(playerid);
- SendClientMessage(giveplayerid,0xA9A9A9AA, "|_Health Restored_|");
- format(szstring, sizeof(szstring), "Medic %s(%d) has healed you for $%d",mname,playerid,mrand);
- SendClientMessage(giveplayerid,COLOR_FORESTGREEN, szstring);
- SendClientMessage(playerid,0xA9A9A9AA, "|_Player Health Restored_|");
- format(szstring, sizeof(szstring), "%s(%d) has been healed. You earned $%d", pname,giveplayerid,mrand);
- SendClientMessage(playerid,COLOR_FORESTGREEN, szstring);
- SetPlayerHealth(giveplayerid,100);
- GivePlayerMoney(giveplayerid,-mrand);
- GivePlayerMoney(playerid,mrand);
- SetPlayerScore(playerid, oscore +1);
- wantsheal[giveplayerid] =0;
- }
- return 1;
- }
- if(strcmp(cmd, "/medic", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(gTeam[playerid] == TEAM_MEDIC) {
- SendClientMessage(playerid,COLOR_ERROR,"You are a Medic. Type /healme or /cureme");
- return 1;
- }
- if(gTeam[playerid] == TEAM_PVTMED) {
- SendClientMessage(playerid,COLOR_ERROR,"You are a Private Medic. Type /healme or /cureme");
- return 1;
- }
- if (!GetPlayersInTeam(TEAM_MEDIC) && !GetPlayersInTeam(TEAM_PVTMED)) {
- SendClientMessage(playerid,COLOR_ERROR,"Unable to locate any Medics");
- return 1;
- }
- SendClientMessage(playerid, COLOR_DODGERBLUE, "You have called a medic");
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if(gTeam[i] == TEAM_MEDIC || gTeam[i] == TEAM_PVTMED ) {
- GetPlayerName(playerid, pname, 24);
- new current_zone;
- current_zone = player_zone[playerid];
- format(szstring, sizeof(szstring), "%s(%d) Has requested a medic. Location: %s",pname,playerid,zones[current_zone][zone_name]);
- SendClientMessage(i, COLOR_FORESTGREEN, szstring);
- wantsheal[playerid] =1;
- wantscure[playerid] =1;
- }
- }
- }
- return 1;
- }
- if(strcmp(cmdtext, "/radon", true) == 0)
- {
- if(HasLawEnforcementRadio[playerid] == 0) {
- SendClientMessage(playerid,COLOR_WHITE,"You dont have a police radio");
- return 1;
- }
- if(LawEnforcementRadio[playerid] == 1) {
- SendClientMessage(playerid,COLOR_WHITE,"Radio is already on");
- return 1;
- }
- if(LawEnforcementRadio[playerid] == 0) {
- SendClientMessage(playerid,COLOR_WHITE,"Radio is now on. You will receive alerts from dispatch about crimes");
- LawEnforcementRadio[playerid] = 1;
- }
- return 1;
- }
- if(strcmp(cmdtext, "/radoff", true) == 0)
- {
- if(HasLawEnforcementRadio[playerid] == 0) {
- SendClientMessage(playerid,COLOR_WHITE,"You dont have a police radio");
- return 1;
- }
- if(LawEnforcementRadio[playerid] == 0) {
- SendClientMessage(playerid,COLOR_WHITE,"Radio is already off");
- return 1;
- }
- if(LawEnforcementRadio[playerid] == 1) {
- SendClientMessage(playerid,COLOR_WHITE,"Radio is now off");
- LawEnforcementRadio[playerid] = 0;
- }
- return 1;
- }
- // WHISPER ========================================================================
- if (!strcmp("/w", cmdtext, true, 2))
- {
- if(cmdtext[2] == 0)
- {
- SendClientMessage(playerid,COLOR_ERROR,"Error : You must enter a message!");
- return 1;
- }
- new name[256];
- GetPlayerName(playerid, name, 32);
- format(szstring,sizeof(szstring),"%s : %s", name, cmdtext[3]);
- new success=0;
- for(new i=0; i<=MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && PlayerInRange(playerid, i, DISTANCE_WHISPER))
- {
- success = 1;
- SendClientMessage(i, COLOR_WHISPER,szstring);
- }
- }
- if(success != 1 && RETURNERROR == 1)
- {
- SendClientMessage(playerid,COLOR_ERROR,"Error : Nobody heard you..");
- }
- return 1;
- }
- if(strcmp(cmd, "/uncuff", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(Jailed[playerid] ==1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /uncuff (id)");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid)) {
- format(szstring, sizeof(szstring), "ID (%d) is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- GetPlayerName(playerid,oname, 24);
- GetPlayerName(giveplayerid, pname, 24);
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /uncuff (id) ID Must be a number");
- return 1;
- }
- if(cuffed[giveplayerid] == 0) {
- format(szstring, sizeof(szstring), "%s(%d) is not handcuffed",pname, giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- //if(gTeam[giveplayerid] == 1) {
- //SendClientMessage(playerid, COLOR_ERROR, "You cannot ask another Law Enforcement agent to surrender");
- //return 1;
- //}
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 2) {
- format(szstring, sizeof(szstring), "%s(%d) is not close enough to cannot uncuff",pname, giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
- SendClientMessage(playerid, COLOR_DODGERBLUE, "You cannot take players handcuffs off from inside a car");
- return 1;
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) {
- SendClientMessage(playerid, COLOR_DODGERBLUE, "You cannot handcuff a player from inside a car");
- return 1;
- }
- if(GetPlayerState(giveplayerid) == PLAYER_STATE_PASSENGER) {
- format(szstring, sizeof(szstring), "%s(%d) is in a vehicle. You cannot uncuff that player", pname, giveplayerid);
- SendClientMessage(playerid, COLOR_DODGERBLUE, szstring);
- return 1;
- }
- if(GetPlayerState(giveplayerid) == PLAYER_STATE_DRIVER) {
- format(szstring, sizeof(szstring), "%s(%d) is in a vehicle. You cannot uncuff that player", pname, giveplayerid);
- SendClientMessage(playerid, COLOR_DODGERBLUE, szstring);
- return 1;
- }
- if(GetPlayerState(giveplayerid) == PLAYER_STATE_ONFOOT) {
- format(szstring, sizeof(szstring), "%s(%d): Has removed your handcuffs",oname, playerid);
- SendClientMessage(giveplayerid, COLOR_DODGERBLUE, szstring);
- TogglePlayerControllable(giveplayerid, 1);
- cuffed[giveplayerid] =0;
- format(szstring, sizeof(szstring), "You have removed %s(%d)'s handcuffs", pname, giveplayerid);
- SendClientMessage(playerid, COLOR_DODGERBLUE, szstring);
- }
- return 1;
- }
- if(strcmp(cmd, "/bk", true) == 0)
- {
- if(ReqBkRecent[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You have asked for backup recently. Please wait before asking for backup again");
- return 1;
- }
- if(Jailed[playerid] ==1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(IsPlayerConnected(playerid)) {
- new current_zone;
- GetPlayerName(playerid,oname, 24);
- current_zone = player_zone[playerid];
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(LawEnforcementRadio[i] == 1) {
- format(szstring, sizeof(szstring), "ASSISTANCE REQUIRED: Officer %s(%d) Is requesting backup. Location: %s",oname,playerid,zones[current_zone][zone_name]);
- SendClientMessage(i, COLOR_ROYALBLUE, szstring);
- format(szstring, sizeof(szstring), "All units respond. Provide backup to officer %s(%d) Location: %s",oname,playerid,zones[current_zone][zone_name]);
- SendClientMessage(i, COLOR_ROYALBLUE, szstring);
- }
- }
- ReqBk[playerid] =1;
- SetPlayerColor(playerid,COLOR_PURPLE);
- SetTimer("CopBackUpColour", 10000, 0);
- ReqBkRecent[playerid] =1;
- }
- return 1;
- }
- if(strcmp(cmd, "/breakcuffs", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(gTeam[playerid] <= 2) {
- SendClientMessage(playerid,COLOR_ERROR,"Law Enforcement agents cannot use this command");
- return 1;
- }
- if(Jailed[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(cuffed[playerid] == 0) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not handcuffed. You cannot use this command");
- return 1;
- }
- if(CuffedTime[playerid] >= 1) {
- SendClientMessage(playerid, COLOR_ERROR, "Please wait before trying to break the handcuffs");
- return 1;
- }
- new breakcuffsrand = random(100);
- if(breakcuffsrand >=26 && breakcuffsrand <=100) // Failed
- {
- new escapedname[24];
- GetPlayerName(playerid,escapedname,24);
- new plwl = GetPlayerWantedLevel(playerid);
- new pcol = GetPlayerColor(playerid);
- SetPlayerWantedLevel(playerid, plwl +1 );
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
- plwl = GetPlayerWantedLevel(playerid);
- format(szstring, sizeof(szstring), "(ATTEMPTED ESCAPE) Wanted Level: %d",plwl);
- SendClientMessage(playerid,pcol,szstring);
- SendClientMessage(playerid,COLOR_ERROR,"You have been seen trying to escape from the handcuffs. Attempt failed");
- format(szstring, sizeof(szstring), "%s(%d) Has tried to escape from handcuffs",escapedname,playerid);
- CuffedTime[playerid] =10;
- printf("%s",szstring);
- commitedcrimerecently[playerid] +=120;
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(LawEnforcementRadio[i] == 1 && IsSpawned[i] == 1)
- {
- if(GetDistanceBetweenPlayers(playerid,i) < 25)
- {
- new szstring1[256];
- new szstring2[256];
- new current_zone;
- current_zone = player_zone[playerid];
- format(szstring1, sizeof(szstring1), "DISPATCH: (ATTEMPTED ESCAPE) %s(%d) Has attempted to escape from handcuffs",escapedname,playerid);
- format(szstring2, sizeof(szstring2), "Please respond and secure suspect: %s(%d) - Location: %s",escapedname,playerid,zones[current_zone][zone_name]);
- SendClientMessage(i, COLOR_ROYALBLUE, szstring1);
- SendClientMessage(i, COLOR_ROYALBLUE, szstring2);
- }
- }
- }
- return 1;
- }
- else
- if(breakcuffsrand >=0 && breakcuffsrand <=25) // complete
- {
- TogglePlayerControllable(playerid, 1);
- cuffed[playerid] =0;
- new escapedname[24];
- new plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid, plwl +4 );
- GetPlayerName(playerid,escapedname,24);
- GameTextForPlayer(playerid,"~r~ESCAPED~n~FROM HANDCUFFS",6000,3);
- new pcol = GetPlayerColor(playerid);
- plwl = GetPlayerWantedLevel(playerid);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
- format(szstring, sizeof(szstring), "(HANDCUFF ESCAPE) Wanted Level %d",plwl);
- SendClientMessage(playerid,pcol,szstring);
- format(szstring, sizeof(szstring), "%s(%d) Has escaped from handcuffs",escapedname,playerid);
- printf("%s",szstring);
- commitedcrimerecently[playerid] +=360;
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(LawEnforcementRadio[i] == 1 && IsSpawned[i] == 1)
- {
- if(GetDistanceBetweenPlayers(playerid,i) < 25)
- {
- new szstring1[256];
- new szstring2[256];
- new current_zone;
- current_zone = player_zone[playerid];
- format(szstring1, sizeof(szstring1), "DISPATCH: (HANDCUFF ESCAPE) %s(%d) Has escaped from handcuffs",escapedname,playerid);
- format(szstring2, sizeof(szstring2), "Please respond and take suspect: %s(%d) into custody. Location: %s",escapedname,playerid,zones[current_zone][zone_name]);
- SendClientMessage(i, COLOR_ROYALBLUE, szstring1);
- SendClientMessage(i, COLOR_ROYALBLUE, szstring2);
- }
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/onduty", true) == 0) {
- if(Jailed[playerid] ==1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(Driveronduty[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You are already on duty");
- return 1;
- }
- if(!IsPlayerInAnyVehicle(playerid)) {
- SendClientMessage(playerid, COLOR_ERROR, "You are not in any drivers vehicle");
- return 1;
- }
- if(GetPlayerWantedLevel(playerid) >= 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You must be innocent to go on duty as a driver");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(GetVehicleModel(vehicleid) == 420 || GetVehicleModel(vehicleid) == 487 || GetVehicleModel(vehicleid) == 431 || GetVehicleModel(vehicleid) == 409)
- {
- new drivername[30];
- GetPlayerName(playerid,drivername,30);
- format(szstring, sizeof(szstring), "Driver %s(%d) Is now on duty. Type /taxi to call a driver",drivername,playerid);
- SendClientMessageToAll(COLOR_FORESTGREEN,szstring);
- Driveronduty[playerid] =1;
- }
- else {
- SendClientMessage(playerid, COLOR_ERROR, "You are not in any drivers vehicle");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/offduty", true) == 0) {
- if(Jailed[playerid] ==1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(Driveronduty[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are not on duty");
- return 1;
- }
- if(Driveronduty[playerid] == 1)
- {
- new drivername[30];
- GetPlayerName(playerid,drivername,30);
- format(szstring, sizeof(szstring), "Driver %s(%d) is off duty",drivername,playerid);
- SendClientMessageToAll(COLOR_FORESTGREEN,szstring);
- Driveronduty[playerid] =0;
- new taxiid = GetPlayerVehicleID(playerid);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerInVehicle(i,taxiid) && GetPlayerState(i) == PLAYER_STATE_PASSENGER)
- {
- RemovePlayerFromVehicle(i);
- Taxipass[i] =0;
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/taxi", true) == 0) {
- if(Jailed[playerid] ==1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid)) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot call a taxi if you are in a vehicle");
- return 1;
- }
- if (!GetPlayersInTeam(TEAM_DRIVER)) {
- SendClientMessage(playerid,COLOR_ERROR,"Unable to locate any Drivers");
- return 1;
- }
- if(GetPlayersInTeam(TEAM_DRIVER) >=1) {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Driver Called_|");
- SendClientMessage(playerid, COLOR_DARKOLIVEGREEN, "You have called a driver to your location. Please wait");
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(gTeam[i] == TEAM_DRIVER) {
- GetPlayerName(playerid, pname, 24);
- new current_zone;
- current_zone = player_zone[playerid];
- SendClientMessage(i, 0xA9A9A9AA, "|_Driver Requested_|");
- format(szstring, sizeof(szstring), "%s(%d) Has requested a driver. Location: %s",pname,playerid,zones[current_zone][zone_name]);
- SendClientMessage(i, COLOR_DARKOLIVEGREEN, szstring);
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/break", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(gTeam[playerid] != TEAM_MECHANIC) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not a Car Mechanic");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /break (id)");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /break (id) ID Must be a number");
- return 1;
- }
- if(!IsPlayerConnected(giveplayerid)) {
- format(szstring, sizeof(szstring), "ID (%d) is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(giveplayerid == playerid) {
- SendClientMessage(playerid,COLOR_ERROR,"You cannot break yourself");
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 3) {
- format(szstring, sizeof(szstring), "(%d) Is not close enough. You cannot pour sand into that players vehicle engine",giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- GetPlayerName(playerid,mname, 24);
- GetPlayerName(giveplayerid, pname, 24);
- if(!IsPlayerInAnyVehicle(giveplayerid)) {
- format(szstring, sizeof(szstring), "%s(%d) is not in any vehicle",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(GetPlayerState(giveplayerid) == PLAYER_STATE_DRIVER) {
- if(GetVehicleModel(GetPlayerVehicleID(giveplayerid)) == 481) {
- SendClientMessage(playerid, COLOR_ERROR, "That vehicle does not have any engine, you cannot use this command on that vehicle (BMX Bike)");
- return 1;
- }
- new tobreak = GetPlayerVehicleID(giveplayerid);
- SandInEngine[tobreak] =1;
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_Sand In Engine_|");
- format(szstring, sizeof(szstring), "Mechanic %s(%d) has filled your vehicle engine with sand. GET OUT",mname,playerid);
- SendClientMessage(giveplayerid,COLOR_DODGERBLUE, szstring);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Sand In Engine_|");
- format(szstring, sizeof(szstring), "You have filled %s(%d)'s vehicle engine with sand", pname,giveplayerid);
- SendClientMessage(playerid,COLOR_DODGERBLUE, szstring);
- new plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid, plwl +1 );
- commitedcrimerecently[playerid] +=60;
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if(LawEnforcementRadio[i] == 1)
- {
- new current_zone;
- current_zone = player_zone[playerid];
- format(szstring, sizeof(szstring), "DISPATCH: (CRIME IN PROGRESS) SUSPECT: %s(%d) CRIME: Criminal Damage LOCATION: %s",mname,playerid,zones[current_zone][zone_name]);
- SendClientMessage(i,COLOR_ROYALBLUE, szstring);
- }
- }
- }
- new pcol = GetPlayerColor(playerid);
- plwl = GetPlayerWantedLevel(playerid);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
- format(szstring, sizeof(szstring), "(CRIMINAL DAMAGE) Wanted Level %d",plwl);
- SendClientMessage(playerid,pcol,szstring);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- }
- else{
- format(szstring, sizeof(szstring), "%s(%d) is not the driver of the vehicle",pname,giveplayerid);
- SendClientMessage(giveplayerid,COLOR_DODGERBLUE, szstring);
- }
- return 1;
- }
- if(strcmp(cmd, "/infect", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(Jailed[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(gTeam[playerid] != TEAM_PVTMED ) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not a Private Medic");
- return 1;
- }
- if(InfectedPlyRecent[playerid] == 1) {
- SendClientMessage(playerid,COLOR_ERROR,"Command used recently... Please wait");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /infect (id)");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /infect (id) ID Must be a number");
- return 1;
- }
- if(!IsPlayerConnected(giveplayerid)) {
- format(szstring, sizeof(szstring), "ID (%d) Is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(strval(tmp) == playerid) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot infect yourself");
- return 1;
- }
- GetPlayerName(playerid,mname, 24);
- GetPlayerName(giveplayerid, pname, 24);
- if(IsPlayerInAnyVehicle(playerid)) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot infect a player from inside a vehicle");
- return 1;
- }
- if(cuffed[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot infect a player while you are handcuffed");
- return 1;
- }
- if(Jailed[giveplayerid] == 1) {
- format(szstring, sizeof(szstring), "%s(%d) Is in jail. You cannot rob a prisoner",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(cuffed[giveplayerid] == 1) {
- format(szstring, sizeof(szstring), "%s(%d) Is handcuffed. You cannot rob a player who is handcuffed",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(IsPlayerInAnyVehicle(giveplayerid)) {
- format(szstring, sizeof(szstring), "%s(%d) Is in a vehicle. You cannot rob that player",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 5) {
- format(szstring, sizeof(szstring), "%s(%d) Is not close enough. You cannot attempt to infect that player",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- new rand = random(500);
- if(rand >= 0 && rand <= 199) {
- format(szstring, sizeof(szstring), "Your attempt to infect %s(%d) has failed",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- InfectedPlyRecent[playerid] =1;
- return 1;
- }
- if(rand >= 200 && rand <= 500) {
- format(szstring, sizeof(szstring), "%s(%d) Has been infected with Chlamydia",pname,giveplayerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid,0xA9A9A9AA, "|_You Have Been Infected_|");
- format(szstring, sizeof(szstring), "Private Medic %s(%d) has infected you with Chlamydia",mname,playerid);
- SendClientMessage(giveplayerid,COLOR_FORESTGREEN, szstring);
- SendClientMessage(playerid,0xA9A9A9AA, "|_Player Infected_|");
- format(szstring, sizeof(szstring), "You have infected %s(%d) with Chlamydia", pname,giveplayerid);
- SendClientMessage(playerid,COLOR_FORESTGREEN, szstring);
- Chlamydia[giveplayerid] =1;
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- InfectedPlyRecent[playerid] =1;
- GameTextForPlayer(giveplayerid,"Infected with Chlamydia",7000,3);
- new current_zone;
- current_zone = player_zone[playerid];
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(LawEnforcementRadio[i] == 1) {
- format(szstring, sizeof(szstring), "DISPATCH: (MEDICAL CRIMES) Suspect: %s(%d) has infected %s(%d) Location: %s",mname,playerid,pname,giveplayerid,zones[current_zone][zone_name]);
- SendClientMessage(i,COLOR_ROYALBLUE,szstring);
- }
- }
- if(gTeam[giveplayerid] == TEAM_COP || gTeam[giveplayerid] == TEAM_ARMY) {
- new plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid, plwl +4 );
- }
- else{
- new plwl = GetPlayerWantedLevel(playerid);
- SetPlayerWantedLevel(playerid, plwl +2 );
- }
- new pcol = GetPlayerColor(playerid);
- new plwl = GetPlayerWantedLevel(playerid);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
- format(szstring, sizeof(szstring), "(MEDICAL CRIMES) Wanted Level %d",plwl);
- SendClientMessage(playerid,pcol,szstring);
- }
- return 1;
- }
- if(strcmp(cmd, "/cure", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(Jailed[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(gTeam[playerid] != TEAM_MEDIC && gTeam[playerid] != TEAM_PVTMED ) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not a Medic / Private Medic");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /cure (id)");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /cure (id) ID Must be a number");
- return 1;
- }
- GetPlayerName(playerid,mname, 24);
- GetPlayerName(giveplayerid, pname, 24);
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 5) {
- format(szstring, sizeof(szstring), "%s(%d) Is not close enough. You cannot cure that player",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(Chlamydia[giveplayerid] == 0 && Salmonella[giveplayerid] == 0) {
- format(szstring, sizeof(szstring), "%s(%d) Does not have any infections",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(wantscure[giveplayerid] == 0) {
- format(szstring, sizeof(szstring), "Medic %s(%d) has attempted to cure your infection. Type /medic if you need a Medic",mname,playerid);
- SendClientMessage(giveplayerid,COLOR_FORESTGREEN, szstring);
- format(szstring, sizeof(szstring), "%s(%d) has not asked for a medic. You cannot cure that players infection", pname,giveplayerid);
- SendClientMessage(playerid,COLOR_ERROR, szstring);
- }
- else
- if(wantscure[giveplayerid] == 1) {
- new mrand = random(3500);
- oscore = GetPlayerScore(playerid);
- SendClientMessage(giveplayerid,0xA9A9A9AA, "|_Infection(s) Cured_|");
- format(szstring, sizeof(szstring), "Medic %s(%d) has cured your infections for $%d",mname,playerid,mrand);
- SendClientMessage(giveplayerid,COLOR_FORESTGREEN, szstring);
- SendClientMessage(playerid,0xA9A9A9AA, "|_Player Infection(s) Cured_|");
- format(szstring, sizeof(szstring), "%s(%d) has beed cured. You earned $%d", pname,giveplayerid,mrand);
- SendClientMessage(playerid,COLOR_FORESTGREEN, szstring);
- GivePlayerMoney(giveplayerid,-mrand);
- GivePlayerMoney(playerid,mrand);
- Chlamydia[giveplayerid] =0;
- Salmonella[giveplayerid] =0;
- SetPlayerScore(playerid, oscore +1);
- wantscure[giveplayerid] =0;
- }
- return 1;
- }
- if(strcmp(cmd,"/buy",true)==0)
- {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(!IsPlayerInCheckpoint(playerid)) {
- SendClientMessage(playerid,COLOR_ERROR,"You have to be in the checkpoint inside a 24/7 store to use this command");
- return 1;
- }
- if(IsPlayerInCheckpoint(playerid) && getCheckpointType(playerid) != 46) {
- SendClientMessage(playerid,COLOR_ERROR,"You have to be in the checkpoint inside a 24/7 store to use this command");
- return 1;
- }
- if(IsPlayerInCheckpoint(playerid) && getCheckpointType(playerid) == 46)
- {
- new buyername[24];
- GetPlayerName(playerid,buyername, 24);
- new x_nr[256];
- x_nr = strtok(cmdtext, idx);
- if(!strlen(x_nr)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /buy 1-6");
- return 1;
- }
- if(strcmp(x_nr,"1",true) == 0)
- {
- if(GetPlayerMoney(playerid) <= 1499) {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase Failed_|");
- SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Chainsaw ($2000)");
- return 1;
- }
- GivePlayerMoney(playerid,-1500);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase_|");
- SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Chainsaw. You were charged $1500");
- GivePlayerWeapon(playerid,9,1);
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- else if(strcmp(x_nr,"2",true) == 0)
- {
- if(GetPlayerMoney(playerid) <= 4) {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase Failed_|");
- SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy flowers ($5)");
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- GivePlayerMoney(playerid,-5);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase_|");
- SendClientMessage(playerid, 0x00C7FFAA, "You have bought flowers. You were charged $5");
- GivePlayerWeapon(playerid,14,1);
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- else if(strcmp(x_nr,"3",true) == 0)
- {
- if(GetPlayerMoney(playerid) <= 0) {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase Failed_|");
- SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy water ($1)");
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- GivePlayerMoney(playerid,-1);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase_|");
- SendClientMessage(playerid, 0x00C7FFAA, "You have bought some water. You were charged $1");
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- else if(strcmp(x_nr,"4",true) == 0)
- {
- if(GetPlayerMoney(playerid) <= 19) {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase Failed_|");
- SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy Beer ($20)");
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- GivePlayerMoney(playerid,-20);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase_|");
- SendClientMessage(playerid, 0x00C7FFAA, "You have bought and drinked a Beer. You were charged $20");
- TextDrawHideForPlayer(playerid,service);
- new Float:beerhealth;
- GetPlayerHealth(playerid,beerhealth);
- drunkplayer[playerid] += 1;
- if(beerhealth <=95) {
- drunkplayer[playerid] += 1;
- SetPlayerHealth(playerid,beerhealth+5);
- return 1;
- }
- else if(drunkplayer[playerid] >= 3) {
- GameTextForPlayer(playerid,"~w~you are ~r~~n~drunk", 7000,3);
- drunkplayer[playerid] += 1;
- return 1;
- }
- }
- else if(strcmp(x_nr,"5",true) == 0)
- {
- if(GetPlayerMoney(playerid) <= 999) {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase Failed_|");
- SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Wallet ($1000)");
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- if(HasWallet[playerid] >= 1) {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase Failed_|");
- SendClientMessage(playerid, COLOR_ERROR, "You already have a Wallet");
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- GivePlayerMoney(playerid,-1000);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase_|");
- SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Wallet. You were charged $1000");
- SendClientMessage(playerid, 0x00C7FFAA, "You can be robbed upto 5 times and not lose any cash");
- HasWallet[playerid] =5;
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- else if(strcmp(x_nr,"6",true) == 0)
- {
- if(GetPlayerMoney(playerid) <= 499) {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase Failed_|");
- SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Parachute ($500)");
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- GivePlayerMoney(playerid,-500);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase_|");
- SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Parachute. You were charged $500");
- GivePlayerWeapon(playerid,46,1);
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- else if(strcmp(x_nr,"7",true) == 0)
- {
- if(GetPlayerMoney(playerid) <= 1599) {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase Failed_|");
- SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Camera ($1600)");
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- GivePlayerMoney(playerid,-1600);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase_|");
- SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Camera with 1600 photos free. You were charged $1600");
- GivePlayerWeapon(playerid,43,1600);
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- else if(strcmp(x_nr,"8",true) == 0)
- {
- if(GetPlayerMoney(playerid) <= 1) {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase Failed_|");
- SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a condom ($2)");
- TextDrawHideForPlayer(playerid,service);
- return 1;
- }
- GivePlayerMoney(playerid,-2);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase_|");
- SendClientMessage(playerid, 0x00C7FFAA, "You have bought 3 packs of Condoms. You were charged $2. Have a nice sex..");
- TextDrawHideForPlayer(playerid,service);
- Condom[playerid] =3;
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /buy 1-8");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/healme", true) == 0 && IsPlayerConnected(playerid)) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(Jailed[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(gTeam[playerid] != TEAM_MEDIC && gTeam[playerid] != TEAM_PVTMED ) {
- SendClientMessage(playerid,COLOR_ERROR,"Only Medic's or Private Medic's can use this command");
- return 1;
- }
- if(GetPlayerWantedLevel(playerid) >= 4) {
- SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command while you have a warrant (Orange/Red)");
- return 1;
- }
- new Float:playerhealth;
- GetPlayerHealth(playerid,playerhealth);
- if(playerhealth >= 100) {
- SendClientMessage(playerid,COLOR_ERROR,"Your health is already high. You cannot heal yourself");
- }
- else
- if(playerhealth >= 0 && playerhealth <= 99)
- {
- new healername[24];
- GetPlayerName(playerid,healername, 24);
- SetPlayerHealth(playerid,100);
- SendClientMessage(playerid,0xA9A9A9AA, "|_Health Restored_|");
- SendClientMessage(playerid,COLOR_FORESTGREEN, "You are a Medic / Private Medic. You have restored your own health");
- printf("Medic / Private Medic %s(%d) has used /healme",healername,playerid);
- }
- return 1;
- }
- if(strcmp(cmdtext,"/loc ",true,5) == 0 && strlen(cmdtext) > 5) {
- new target, current_zone;
- target = strval(cmdtext[5]);
- if(!IsNumeric(cmdtext[5])) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /loc (id) ID Must be a number");
- return 1;
- }
- if(GetPlayerColor(target) == COLOR_DEADCONNECT) {
- SendClientMessage(playerid,COLOR_ERROR,"That player is dead");
- return 1;
- }
- current_zone = player_zone[target];
- // printf("D1: %d %d",target,current_zone);
- if(current_zone != -1 && IsPlayerConnected(target)) {
- new playername[MAX_PLAYER_NAME],message2[256];
- GetPlayerName(target,playername,MAX_PLAYER_NAME);
- format(message2,sizeof(message2),"%s(%d)'s current location: %s",playername,target,zones[current_zone][zone_name]);
- SendClientMessage(playerid,0x00C7FFAA,message2);
- // printf("D2: %s %s",playername,message);
- } else {
- SendClientMessage(playerid,COLOR_ERROR,"Invalid Player ID");
- }
- return 1;
- } else if(strcmp(cmdtext,"/loc",true,4) == 0 && strlen(cmdtext) <= 4) {
- SendClientMessage(playerid,COLOR_ERROR,"USAGE: /loc (id)");
- return 1;
- }
- if(strcmp(cmd, "/mechanic", true) == 0) {
- if(gTeam[playerid] == TEAM_MECHANIC) {
- SendClientMessage(playerid,COLOR_ERROR,"You are a mechanic. Use /fixme to fix your car");
- return 1;
- }
- if(RecentAskedMechanic[playerid] == 1) {
- SendClientMessage(playerid,COLOR_ERROR,"Please wait before asking for a mechanic again");
- return 1;
- }
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if(gTeam[i] == TEAM_MECHANIC)
- {
- GetPlayerName(playerid,pname, 24);
- new current_zone;
- current_zone = player_zone[playerid];
- format(szstring, sizeof(szstring), "%s(%d) is looking for a mechanic. Location: %s", pname,giveplayerid,zones[current_zone][zone_name]);
- SendClientMessage(i,COLOR_BLUE, szstring);
- SendClientMessage(playerid,COLOR_DODGERBLUE,"You have called a mechanic");
- RecentAskedMechanic[playerid] =1;
- }
- else{
- SendClientMessage(playerid,COLOR_DODGERBLUE,"No Mechanics are on at the moment");
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/fixme", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(GetPlayerWantedLevel(playerid) >= 4) {
- SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command while you have a warrant (Orange/Red)");
- return 1;
- }
- if(gTeam[playerid] != TEAM_MECHANIC) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not a mechanic");
- return 1;
- }
- if(!IsPlayerInAnyVehicle(playerid)) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not in a vehicle");
- return 1;
- }
- if(fixedcarrecent[playerid] >=1) {
- SendClientMessage(playerid,COLOR_ERROR,"Command used recently. Please wait");
- return 1;
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
- new tofix = GetPlayerVehicleID(playerid);
- SetVehicleHealth(tofix, 1000);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Engine Repaired_|");
- SendClientMessage(playerid, 0x00C7FFAA, "You have fixed your vehicle engine");
- fixedcarrecent[playerid] =60;
- }
- else
- SendClientMessage(playerid, COLOR_ERROR, "You need to be driver to fix your own car");
- return 1;
- }
- if(strcmp(cmd, "/fix", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(gTeam[playerid] != TEAM_MECHANIC) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not a Car Mechanic");
- return 1;
- }
- if(fixedcarrecent[playerid] >=1) {
- SendClientMessage(playerid,COLOR_ERROR,"Command used recently. Please wait");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /fix (id)");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /fix (id) ID Must be a number");
- return 1;
- }
- if(!IsPlayerConnected(giveplayerid)) {
- format(szstring, sizeof(szstring), "ID (%d) is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(strval(tmp) == playerid) {
- SendClientMessage(playerid, COLOR_ERROR, "Please use /fixme to fix your own vehicle");
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 5) {
- format(szstring, sizeof(szstring), "(%d) Is not close enough. You cannot fix that players vehicle engine",giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- GetPlayerName(playerid,mname, 24);
- GetPlayerName(giveplayerid, pname, 24);
- if(!IsPlayerInAnyVehicle(giveplayerid)) {
- format(szstring, sizeof(szstring), "%s(%d) is not in any vehicle",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(GetPlayerState(giveplayerid) == PLAYER_STATE_DRIVER) {
- new tofix = GetPlayerVehicleID(giveplayerid);
- new Float:vHealth;
- GetVehicleHealth(tofix, vHealth);
- if(vHealth > 700) {
- format(szstring, sizeof(szstring), "%s(%d)'s vehicle engine does not need fixed",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- new mrand = random(2500);
- oscore = GetPlayerScore(playerid);
- SetVehicleHealth(tofix,1000);
- GivePlayerMoney(giveplayerid,-mrand);
- GivePlayerMoney(playerid,mrand);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_Vehicle Engine Repaired_|");
- format(szstring, sizeof(szstring), "Mechanic %s(%d) has fixed your vehicle engine for $%d",mname,playerid,mrand);
- SendClientMessage(giveplayerid,COLOR_DODGERBLUE, szstring);
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Engine Repaired_|");
- format(szstring, sizeof(szstring), "You have fixed %s(%d)s vehicle engine. You earned $%d", pname,giveplayerid,mrand);
- SendClientMessage(playerid,COLOR_DODGERBLUE, szstring);
- SetPlayerScore(playerid, oscore +1);
- fixedcarrecent[playerid] =60;
- }
- else{
- format(szstring, sizeof(szstring), "%s(%d) is not the driver of the vehicle",pname,giveplayerid);
- SendClientMessage(giveplayerid,COLOR_DODGERBLUE, szstring);
- }
- return 1;
- }
- if(strcmp(cmd, "/911", true) == 0) {
- if(Jailed[playerid] ==1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- if(gTeam[playerid] <= 2) {
- SendClientMessage(playerid,COLOR_ERROR,"You are a Law Enforcement officer. You cannot call /911 ");
- return 1;
- }
- if (!GetPlayersInTeam(TEAM_COP)){
- SendClientMessage(playerid,COLOR_ERROR,"There are no Police officers in the area");
- return 1;
- }
- new output[70];
- strmid(output,cmdtext,5,strlen(cmdtext));
- if(strlen(cmdtext) <= 4) {
- SendClientMessage(playerid, 0xA9A9A9AA, "USAGE: /911 (message)");
- return 1;
- }
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Dialed 911_|");
- SendClientMessage(playerid,0x00C7FFAA,"You have dialed 911 - Please wait for Police assistance");
- new callername[30];
- GetPlayerName(playerid,callername, 30);
- new current_zone;
- current_zone = player_zone[playerid];
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(LawEnforcementRadio[i] == 1) {
- format(szstring, sizeof(szstring), "DISPATCH: (911) %s(%d) has called 911",callername,playerid);
- SendClientMessage(i,COLOR_BLUE,szstring);
- format(szstring, sizeof(szstring), "%s(%d) Said: ( %s )",callername,playerid,output);
- SendClientMessage(i,COLOR_BLUE,szstring);
- format(szstring, sizeof(szstring), "All units in the area please respond. Location: %s",zones[current_zone][zone_name]);
- SendClientMessage(i,COLOR_BLUE,szstring);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/taze", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(gTeam[playerid] >= 3) {
- SendClientMessage(playerid, COLOR_ERROR, "Only Law Enforcement can use this command");
- return 1;
- }
- if(Jailed[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /taze (id)");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /taze (id) ID Must be a number");
- return 1;
- }
- if(!IsPlayerConnected(giveplayerid)) {
- format(szstring, sizeof(szstring), "ID (%d) Is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(gTeam[giveplayerid] <= 2) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot taze another Law Enforcement agent");
- return 1;
- }
- GetPlayerName(playerid,oname, 24);
- GetPlayerName(giveplayerid, pname, 24);
- if(GetPlayerWantedLevel(giveplayerid) <= 3) {
- format(szstring, sizeof(szstring), "%s(%d) Does not have a warrant. You cannot use your tazer on this player",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 10) {
- format(szstring, sizeof(szstring), "%s(%d) Is not close enough to taze",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(cuffed[giveplayerid] == 1) {
- format(szstring, sizeof(szstring), "%s(%d) Is in handcuffs and is restrained. You cannot taze a handcuffed player",pname, giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(IsPlayerInAnyVehicle(giveplayerid)) {
- format(szstring, sizeof(szstring), "%s(%d) Is in a vehicle. Get the player out the vehicle then use your tazer",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid)) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot taze a player from inside a vehicle");
- return 1;
- }
- if(Tazed[giveplayerid] == 1) {
- format(szstring, sizeof(szstring), "%s(%d) Is being tazed right now. You cannot taze a player while the player is being tazed",pname,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- }
- else{
- Tazed[giveplayerid] =1;
- new tazername[30];
- GetPlayerName(playerid,tazername,30);
- format(szstring, sizeof(szstring), "Law Enforcement agent %s(%d) Has tazed suspect %s(%d)",tazername,playerid,pname,giveplayerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_Law Enforcement Action_|");
- format(szstring, sizeof(szstring), "Officer %s(%d) Has tazed you", oname,playerid);
- SendClientMessage(giveplayerid,COLOR_DODGERBLUE, szstring);
- ApplyAnimation(giveplayerid,"PED","BIKE_fall_off",4.1,0,1,1,1,1);
- SetTimer("Tazingtime",3000,0);
- }
- return 1;
- }
- if (strcmp("/kill", cmdtext, true, 10) == 0)
- {
- SetPlayerHealth(playerid, -10);
- return 1;
- }
- if(strcmp(cmd, "/reqvisit", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(Jailed[playerid] == 0 && InAlcatraz[playerid] == 0) {
- SendClientMessage(playerid,COLOR_ERROR,"You are not in jail. You can only use this command while you are in jail (Alcatraz)");
- return 1;
- }
- if(Jailed[playerid] == 1 && InAlcatraz[playerid] == 0) {
- SendClientMessage(playerid,COLOR_ERROR,"You can only request a visit if you are in jail on Alcatraz Island");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /reqvisit (id)");
- return 1;
- }
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /reqvisit (id) ID Must be a number");
- return 1;
- }
- if(strval(tmp) == playerid) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot give yourself a visiting pass");
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid)) {
- format(szstring, sizeof(szstring), "ID (%d) is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- new sendername[24];
- new receivername[24];
- GetPlayerName(playerid,sendername, 24);
- GetPlayerName(giveplayerid,receivername, 24);
- if(gTeam[giveplayerid] <= 2) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot send a visiting pass to Police or Army Officers");
- return 1;
- }
- if(IsSpawned[giveplayerid] == 0) {
- format(szstring, sizeof(szstring), "%s(%d) is dead. You cannot give a visiting pass to a dead body",receivername,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- if(Jailed[giveplayerid] == 1) {
- SendClientMessage(playerid,COLOR_ERROR,"That player is in jail. You cannot give a visiting pass to a prisoner");
- return 1;
- }
- if(VisitReq[giveplayerid] == 1) {
- format(szstring, sizeof(szstring), "%s(%d) Already has a visiting pass from you or another inmate",receivername,giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- }
- else
- if(VisitReq[giveplayerid] == 0) {
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_Alcatraz Island Visit Pass Received_|");
- format(szstring, sizeof(szstring), "Alcatraz prisoner %s(%d) has sent you a visiting pass",sendername,playerid);
- SendClientMessage(giveplayerid, 0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid, 0x00C7FFAA, "This pass will get you inside Alcatraz building. The pass is valid for 5 game hours");
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Alcatraz Island Visit Pass Sent_|");
- format(szstring, sizeof(szstring), "You have sent a Alcatraz visiting pass to %s(%d) - This pass is valid for 5 game hours",receivername,giveplayerid);
- SendClientMessage(playerid, 0x00C7FFAA, szstring);
- VisitReq[giveplayerid] =1;
- VisitReqExpires[giveplayerid] =300;
- }
- return 1;
- }
- if(strcmp(cmd, "/ar", true) == 0) {
- if(IsSpawned[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
- return 1;
- }
- if(Jailed[playerid] ==1) {
- SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ar (id)");
- TextDrawHideForPlayer(playerid,txtTypeSkill1);
- return 1;
- }
- giveplayerid = strval(tmp);
- if(!IsNumeric(tmp)) {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ar (id) ID Must be a number");
- return 1;
- }
- if(!IsPlayerConnected(giveplayerid)) {
- format(szstring, sizeof(szstring), "ID (%d) is not an active player", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, szstring);
- return 1;
- }
- GetPlayerName(playerid,oname, 24);
- GetPlayerName(giveplayerid, pname, 24);
- if(GetPlayerWantedLevel(giveplayerid) <= 3) {
- format(szstring, sizeof(szstring), "%s(%d) Does not have a warrant. You cannot arrest a player without a warrant",pname,giveplayerid);
- SendClientMessage(playerid,COLOR_ERROR,szstring);
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid)) {
- SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest a suspect if you are in a car");
- return 1;
- }
- if(IsPlayerInAnyVehicle(giveplayerid)) {
- format(szstring, sizeof(szstring), "%s(%d) Is in a vehicle. Get the suspect out before making the arrest",pname,giveplayerid);
- SendClientMessage(playerid,COLOR_ERROR,szstring);
- return 1;
- }
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) > 4) {
- format(szstring, sizeof(szstring), "%s(%d) Is too far away. You cannot arrest that player",pname,giveplayerid);
- SendClientMessage(playerid,COLOR_ERROR,szstring);
- return 1;
- }
- if(IsSpawned[giveplayerid] == 0) {
- format(szstring, sizeof(szstring), "%s(%d) Is dead. You cannot arrest a dead body",pname,giveplayerid);
- SendClientMessage(playerid,COLOR_ERROR,szstring);
- return 1;
- }
- SetPlayerVirtualWorld(giveplayerid,0);
- if(GetPlayerWantedLevel(playerid) >=1) {
- SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command if you are wanted by the police");
- return 1;
- }
- if(giveplayerid == playerid) {
- SendClientMessage(playerid,COLOR_ERROR,"You cannot arrest yourself");
- return 1;
- }
- SetPlayerInterior(giveplayerid,10);
- new rnd;
- rnd = random(sizeof (AlcatrazArrestedSpawn));
- SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
- SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn[rnd][3]);
- format(szstring, sizeof(szstring), "Bounty Hunter %s(%d) has re-captured Escaped Convict %s(%d) and has sent the suspect to Alcatraz",oname,playerid,pname,giveplayerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Busted By A Bounty Hunter_|");
- format(szstring, sizeof(szstring), "You have been sent to Alcatraz by Bounty Hunter %s(%d)",oname,playerid);
- SendClientMessage(giveplayerid,0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
- SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
- format(szstring, sizeof(szstring), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $5000 re-capture bonus",pname,giveplayerid);
- SendClientMessage(playerid,0x00C7FFAA, szstring);
- GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
- format(szstring, sizeof(szstring), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Bounty Hunter %s(%d)",pname,giveplayerid,oname,playerid);
- printf("%s", szstring);
- SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
- GivePlayerMoney(playerid,5000);
- Jailed[giveplayerid] =1;
- InAlcatraz[giveplayerid] =1;
- StoleCopCarRecent[giveplayerid] =0;
- triedtoescaperecent[giveplayerid] =1;
- ResetPlayerWeapons(giveplayerid);
- JailTime[giveplayerid] =320;
- JailTimeServed[giveplayerid] =0;
- EscapedConvict[giveplayerid] =0;
- SetPlayerWantedLevel(giveplayerid,0);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if(EscapedConvict[giveplayerid] == 1 && GetPlayerWantedLevel(giveplayerid) >=10) {
- SetPlayerInterior(giveplayerid,10);
- new rnd;
- rnd = random(sizeof (AlcatrazArrestedSpawn));
- SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
- SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn[rnd][3]);
- format(szstring, sizeof(szstring), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
- format(szstring, sizeof(szstring), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
- SendClientMessage(giveplayerid,0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
- SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
- format(szstring, sizeof(szstring), "You have sent escaped prisoner %s(%d) to Alcatraz - you receive a $4000 re-capture bonus",pname,giveplayerid);
- SendClientMessage(playerid,0x00C7FFAA, szstring);
- GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
- format(szstring, sizeof(szstring), "Escaped Convict %s(%d) has been re-arrested and sent to Alcatraz by Officer %s(%d)",pname,giveplayerid,oname,playerid);
- printf("%s", szstring);
- SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
- GivePlayerMoney(playerid,4000);
- Jailed[giveplayerid] =1;
- InAlcatraz[giveplayerid] =1;
- StoleCopCarRecent[giveplayerid] =0;
- triedtoescaperecent[giveplayerid] =1;
- ResetPlayerWeapons(giveplayerid);
- JailTime[giveplayerid] =320;
- JailTimeServed[giveplayerid] =0;
- EscapedConvict[giveplayerid] =0;
- SetPlayerWantedLevel(giveplayerid,0);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if(GetPlayerWantedLevel(giveplayerid) >=4 && GetPlayerWantedLevel(giveplayerid) <=5) {
- SetPlayerInterior(giveplayerid,3);
- new rnd;
- rnd = random(sizeof (ArrestedSpawn));
- SetPlayerPos(giveplayerid, ArrestedSpawn[rnd][0], ArrestedSpawn[rnd][1], ArrestedSpawn[rnd][2]);
- SetPlayerFacingAngle(giveplayerid, ArrestedSpawn[rnd][3]);
- format(szstring, sizeof(szstring), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
- format(szstring, sizeof(szstring), "You were Arrested by Officer %s(%d)",oname,playerid);
- SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_HANDSUP);
- SendClientMessage(giveplayerid,0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
- SendClientMessage(giveplayerid,0x00C7FFAA,"If jail life sucks for you... Why not pay the /bail");
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
- format(szstring, sizeof(szstring), "You have arrested %s(%d) - you receive a $4500 bonus",pname,giveplayerid);
- SendClientMessage(playerid,0x00C7FFAA, szstring);
- GivePlayerMoney(playerid,4500);
- GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
- format(szstring, sizeof(szstring), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,giveplayerid,oname,playerid);
- printf("%s", szstring);
- SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
- GivePlayerMoney(playerid,1500);
- Jailed[giveplayerid] =1;
- StoleCopCarRecent[giveplayerid] =0;
- triedtoescaperecent[giveplayerid] =1;
- ResetPlayerWeapons(giveplayerid);
- JailTime[giveplayerid] =180;
- JailTimeServed[giveplayerid] =0;
- SetPlayerWantedLevel(giveplayerid,0);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if(GetPlayerWantedLevel(giveplayerid) >=6 && GetPlayerWantedLevel(giveplayerid) <=8) {
- SetPlayerInterior(giveplayerid,3);
- new rnd;
- rnd = random(sizeof (ArrestedSpawn));
- SetPlayerPos(giveplayerid, ArrestedSpawn[rnd][0], ArrestedSpawn[rnd][1], ArrestedSpawn[rnd][2]);
- SetPlayerFacingAngle(giveplayerid, ArrestedSpawn[rnd][3]);
- format(szstring, sizeof(szstring), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
- format(szstring, sizeof(szstring), "You were Arrested by Officer %s(%d)",oname,playerid);
- SendClientMessage(giveplayerid,0x00C7FFAA, szstring);
- GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
- SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
- SendClientMessage(giveplayerid,0x00C7FFAA,"If jail life sucks for you... Why not try /escape");
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
- format(szstring, sizeof(szstring), "You have arrested %s(%d) - you receive a $2000 bonus",pname,giveplayerid);
- SendClientMessage(playerid,0x00C7FFAA, szstring);
- format(szstring, sizeof(szstring), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,giveplayerid,oname,playerid);
- printf("%s", szstring);
- SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
- GivePlayerMoney(playerid,2000);
- Jailed[giveplayerid] =1;
- StoleCopCarRecent[giveplayerid] =0;
- triedtoescaperecent[giveplayerid] =1;
- ResetPlayerWeapons(giveplayerid);
- JailTime[giveplayerid] =240;
- JailTimeServed[giveplayerid] =0;
- SetPlayerWantedLevel(giveplayerid,0);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if(GetPlayerWantedLevel(giveplayerid) == 9) {
- SetPlayerInterior(giveplayerid,3);
- new rnd;
- rnd = random(sizeof (ArrestedSpawn));
- SetPlayerPos(giveplayerid, ArrestedSpawn[rnd][0], ArrestedSpawn[rnd][1], ArrestedSpawn[rnd][2]);
- SetPlayerFacingAngle(giveplayerid, ArrestedSpawn[rnd][3]);
- format(szstring, sizeof(szstring), "Wanted suspect %s(%d) has been arrested by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
- format(szstring, sizeof(szstring), "You were Arrested by Officer %s(%d)",oname,playerid);
- SendClientMessage(giveplayerid,0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from jail or a Police Officer/Jail Turnkey can release you early");
- SendClientMessage(giveplayerid,0x00C7FFAA,"If jail life sucks for you... Why not try /escape");
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
- format(szstring, sizeof(szstring), "You have arrested %s(%d) - you receive a $2500 bonus",pname,giveplayerid);
- SendClientMessage(playerid,0x00C7FFAA, szstring);
- GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
- format(szstring, sizeof(szstring), "Wanted suspect %s(%d) has been arrested by Officer %s(%d)",pname,giveplayerid,oname,playerid);
- printf("%s", szstring);
- SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
- GivePlayerMoney(playerid,2500);
- Jailed[giveplayerid] =1;
- StoleCopCarRecent[giveplayerid] =0;
- triedtoescaperecent[giveplayerid] =1;
- ResetPlayerWeapons(giveplayerid);
- JailTime[giveplayerid] =300;
- JailTimeServed[giveplayerid] =0;
- SetPlayerWantedLevel(giveplayerid,0);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if(GetPlayerWantedLevel(giveplayerid) >=10 && GetPlayerWantedLevel(giveplayerid) <=14) {
- SetPlayerInterior(giveplayerid,10);
- new rnd;
- rnd = random(sizeof (AlcatrazArrestedSpawn));
- SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
- SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn[rnd][3]);
- format(szstring, sizeof(szstring), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
- format(szstring, sizeof(szstring), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
- SendClientMessage(giveplayerid,0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
- SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
- format(szstring, sizeof(szstring), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $3000 bonus",pname,giveplayerid);
- SendClientMessage(playerid,0x00C7FFAA, szstring);
- GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
- format(szstring, sizeof(szstring), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
- printf("%s", szstring);
- SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
- GivePlayerMoney(playerid,3000);
- Jailed[giveplayerid] =1;
- InAlcatraz[giveplayerid] =1;
- StoleCopCarRecent[giveplayerid] =0;
- triedtoescaperecent[giveplayerid] =1;
- ResetPlayerWeapons(giveplayerid);
- JailTime[giveplayerid] =380;
- JailTimeServed[giveplayerid] =0;
- SetPlayerWantedLevel(giveplayerid,0);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if(GetPlayerWantedLevel(giveplayerid) >=15 && GetPlayerWantedLevel(giveplayerid) <=24) {
- SetPlayerInterior(giveplayerid,10);
- new rnd;
- rnd = random(sizeof (AlcatrazArrestedSpawn));
- SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
- SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn[rnd][3]);
- format(szstring, sizeof(szstring), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
- format(szstring, sizeof(szstring), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
- SendClientMessage(giveplayerid,0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
- SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
- format(szstring, sizeof(szstring), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $3500 bonus",pname,giveplayerid);
- SendClientMessage(playerid,0x00C7FFAA, szstring);
- GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
- format(szstring, sizeof(szstring), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
- printf("%s", szstring);
- SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
- GivePlayerMoney(playerid,3500);
- Jailed[giveplayerid] =1;
- InAlcatraz[giveplayerid] =1;
- StoleCopCarRecent[giveplayerid] =0;
- triedtoescaperecent[giveplayerid] =1;
- ResetPlayerWeapons(giveplayerid);
- JailTime[giveplayerid] =420;
- JailTimeServed[giveplayerid] =0;
- SetPlayerWantedLevel(giveplayerid,0);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- return 1;
- }
- if(GetPlayerWantedLevel(giveplayerid) >=25) {
- SetPlayerInterior(giveplayerid,10);
- new rnd;
- rnd = random(sizeof (AlcatrazArrestedSpawn));
- SetPlayerPos(giveplayerid, AlcatrazArrestedSpawn[rnd][0], AlcatrazArrestedSpawn[rnd][1], AlcatrazArrestedSpawn[rnd][2]);
- SetPlayerFacingAngle(giveplayerid, AlcatrazArrestedSpawn[rnd][3]);
- format(szstring, sizeof(szstring), "Most Wanted suspect %s(%d) has been sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
- SendClientMessageToAll(0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid, 0xA9A9A9AA, "|_You Have Been Arrested_|");
- format(szstring, sizeof(szstring), "You have been sent to Alcatraz by Officer %s(%d)",oname,playerid);
- SendClientMessage(giveplayerid,0x00C7FFAA, szstring);
- SendClientMessage(giveplayerid,0x00C7FFAA,"You will be auto-released from Alcatraz once you have served your sentence");
- SendClientMessage(giveplayerid,0x00C7FFAA,"If Alcatraz life sucks for you... Why not ask a friend to visit you? /reqvisit (id)");
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Suspect Arrested_|");
- format(szstring, sizeof(szstring), "You have sent Most Wanted suspect %s(%d) to Alcatraz - you receive a $4000 bonus",pname,giveplayerid);
- SendClientMessage(playerid,0x00C7FFAA, szstring);
- GameTextForPlayer(playerid,"~b~Suspect Arrested",5000,3);
- format(szstring, sizeof(szstring), "Most Wanted suspect %s(%d) has been arrested and sent to Alcatraz by Officer %s(%d) ",pname,giveplayerid,oname,playerid);
- printf("%s", szstring);
- SendClientMessage(giveplayerid,0xFF7F50AA,"If you leave the server while you are in jail you WILL be banned");
- GivePlayerMoney(playerid,4000);
- Jailed[giveplayerid] =1;
- InAlcatraz[giveplayerid] =1;
- StoleCopCarRecent[giveplayerid] =0;
- triedtoescaperecent[giveplayerid] =1;
- ResetPlayerWeapons(giveplayerid);
- JailTime[giveplayerid] =520;
- JailTimeServed[giveplayerid] =0;
- SetPlayerWantedLevel(giveplayerid,0);
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +2);
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == CIVILIAN_DIALOG && response == 1)
- {
- TogglePlayerControllable(playerid, 1);
- if(listitem == 0)
- {
- SendClientMessage(playerid,0x1E90FFAA, "RAPIST: You can rape other players and infect them with STDs that could kill them");
- GivePlayerWeapon(playerid,5,1);
- GivePlayerWeapon(playerid,22,100);
- GivePlayerWeapon(playerid,14,1);
- gTeam[playerid] = TEAM_RAPIST;
- CanChooseSkill[playerid] =0;
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid,0x00FFFFAA, "GUN DEALER: If anyone needs weapons then you sell them some lead. Your prices are set by the game");
- SendClientMessage(playerid,0x00FFFFAA, "You can also deliver guns to ammunations, just get in the PATRIOT car at ammunation stores in LV");
- GivePlayerWeapon(playerid,29,500);
- GivePlayerWeapon(playerid,30,50);
- gTeam[playerid] = TEAM_GUNDEALER;
- CanChooseSkill[playerid] =0;
- }
- if(listitem == 2)
- {
- SendClientMessage(playerid,0x00FFFFAA, "DRUG DEALER: You will supply people with drugs for a price. Dont let people rip you off..");
- SendClientMessage(playerid,0x00FFFFAA, "Keep a watch on the chat for players wanting drugs. Visit the drug house to replenish your stock");
- GivePlayerWeapon(playerid,25,50);
- GivePlayerWeapon(playerid,28,100);
- GivePlayerWeapon(playerid,5,1);
- gTeam[playerid] = TEAM_DRUGDEALER;
- CanChooseSkill[playerid] =0;
- }
- if(listitem == 3)
- {
- SendClientMessage(playerid,0x00FFFFAA, "HITMAN: If anyone needs another player dead then they will contact you. Make sure you agree a price and get paid");
- SendClientMessage(playerid,0x00FFFFAA, "Type /hits to see if there are any hit contracts available");
- GivePlayerWeapon(playerid,27,250);
- GivePlayerWeapon(playerid,23,100);
- GivePlayerWeapon(playerid,31,250);
- gTeam[playerid] = TEAM_HITMAN;
- CanChooseSkill[playerid] =0;
- }
- if(listitem == 4)
- {
- SendClientMessage(playerid,0x00FFFFAA, "PRIVATE MEDIC: If anyone needs medical attention for cuts and bruses or STDs then you can cure then and heal them");
- SendClientMessage(playerid,0x00FFFFAA, "You can also infect them with STDs that could kill them DO NOT HIT/INFECT THEM JUST TO HEAL/CURE THEM");
- GivePlayerWeapon(playerid,22,250);
- gTeam[playerid] = TEAM_PVTMED;
- CanChooseSkill[playerid] =0;
- }
- if(listitem == 5)
- {
- SendClientMessage(playerid,0x00FFFFAA, "BOUNTY HUNTER: You have to help the cops take Escaped prisoners back into custody");
- SendClientMessage(playerid,0x00FFFFAA, "Simply target RED players and type /ar (id) next to them to see if you have found an escaped convict");
- SendClientMessage(playerid,0x00FFFFAA, "Type /bounty for details of Escaped Prisoners");
- GivePlayerWeapon(playerid,27,250);
- GivePlayerWeapon(playerid,23,100);
- GivePlayerWeapon(playerid,31,250);
- gTeam[playerid] = TEAM_BOUNTYHUNTER;
- CanChooseSkill[playerid] =0;
- }
- if(listitem == 6)
- {
- // Nothing more to copy-paste.
- }
- if(listitem == 7)
- {
- // Nothing more to copy-paste.
- }
- if(listitem == 8)
- {
- // Nothing more to copy-paste.
- }
- if(listitem == 9)
- {
- // Nothing more to copy-paste.
- }
- if(listitem == 10)
- {
- // Nothing more to copy-paste.
- }
- if(listitem == 11)
- {
- // Nothing more to copy-paste.
- }
- }
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- public Taze(playerid)
- {
- if(!IsPlayerConnected(playerid)) return false;
- if(PlayerTazed[playerid])
- {
- TogglePlayerControllable(playerid,1);
- PlayerTazed[playerid] = false;
- }
- return true;
- }
- public countdown()
- {
- if(cd_sec == 0)
- {
- KillTimer(cd_timer);
- SendClientMessage(id,COLOR_WHITE,"You are now free!");
- SetPlayerPos(id,2234.1221,2454.1604,10.8051);
- SetPlayerInterior(id,0);
- }
- else
- {
- format(szstring,sizeof(szstring),"~g~%d",cd_sec);
- GameTextForAll(szstring,9000,3);
- }
- cd_sec = cd_sec-1;
- return 1;
- }
- public ProxDetector(Float:radi, playerid, str[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- //radi = 2.0; //Trigger Radius
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, col1, str);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, col2, str);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, col3, str);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, col4, str);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, col5, str);
- }
- }
- }
- }//not connected
- return 1;
- }
- //------------------------------TOWTRUCK TOWING THING (THING THAT ALLOWS TOW TRUCKS TO BE TOWED)-------------------
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if ((newkeys==KEY_ACTION)&&(IsPlayerInAnyVehicle(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
- {
- if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
- {
- new Float:pX,Float:pY,Float:pZ;
- GetPlayerPos(playerid,pX,pY,pZ);
- new Float:vX,Float:vY,Float:vZ;
- new Found=0;
- new vid=0;
- while((vid<MAX_VEHICLES)&&(!Found))
- {
- vid++;
- GetVehiclePos(vid,vX,vY,vZ);
- if ((floatabs(pX-vX)<5.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
- {
- Found=1;
- if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
- {
- DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
- }
- AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
- SendClientMessage(playerid,0xFFFF00AA,"Car towed!");
- }
- }
- }
- }
- }
- //---------------------------------------------------------------------------------------------------------------------------------
- public IsStr( cmd[], str[] )
- {
- if( strcmp( cmd, str ) == 0 )return 1;
- return 0;
- }
- //-------------------------------------------------------------------
- //------------------------------------------------------------------
- stock GetPlayerCaption( playerid )
- {
- new szName[ 256 ];
- GetPlayerName( playerid, szName, sizeof( szName ) );
- return szName;
- }
- //------------------------------------------------------------------
- stock PlayerInRange(playerid, otherid, distance)
- {
- new Float:x,Float:y,Float:z;
- new Float:x2,Float:y2,Float:z2;
- new Float:cx, Float:cy, Float:cz;
- GetPlayerPos(playerid, x,y,z);
- if(IsPlayerConnected(otherid) == 1 && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(otherid))
- {
- GetPlayerPos(otherid,x2, y2, z2);
- cx = x - x2;
- cy = y - y2;
- cz = z - z2;
- if( (cx < distance) && (cx > -distance) && (cy < distance) && (cy > -distance) && (cz < distance) && (cz > -distance) )
- {
- return 1;
- }
- }
- return 0;
- }
- //------------------------------------------------------------------
- public ReqMechRecentTime()
- {
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if (RecentAskedMechanic[i] ==1)
- {
- RecentAskedMechanic[i] =0;
- }
- }
- }
- stock GetPlayersInTeam(TEAM)
- {
- new players;
- for (new i; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- if (gTeam[i] == TEAM) players++;
- }
- }
- return players;
- }
- //------------------------------------------------------------------
- public CopBackUpColour()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(GetPlayerColor(i) == COLOR_PURPLE && ReqBk[i] == 1)
- {
- ReqBk[i] =0;
- }
- }
- }
- //------------------------------------------------------------------
- public ReqBkRecentTime()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(ReqBkRecent[i] == 1 && IsPlayerConnected(i))
- {
- ReqBkRecent[i] =0;
- }
- }
- }
- stock IsPlayerDriverInVehicle(playerid, vehicleid, modelid)
- {
- if (IsPlayerInVehicle(playerid, vehicleid) && GetPlayerState(playerid) == 2
- && GetVehicleModel(GetPlayerVehicleID(playerid)) == modelid)
- return 1;
- return 0;
- }
- //----------------------TAXI STUFF--------------------------------------------
- public TaxiDriverOffDutyCriminal()
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(gTeam[i] == TEAM_DRIVER && Driveronduty[i] == 1 && GetPlayerWantedLevel(i) >=1)
- {
- new drivername[30];
- GetPlayerName(i,drivername,30);
- format(szstring, sizeof(szstring), "Driver %s(%d) is off duty",drivername,i);
- SendClientMessageToAll(COLOR_FORESTGREEN,szstring);
- SendClientMessage(i,COLOR_RED,"The police are looking for you. You are now off duty");
- Driveronduty[i] =0;
- }
- }
- }
- }
- public TaxiDriverTimer()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(gTeam[i] == TEAM_DRIVER && Driveronduty[i] == 1)
- {
- new taxicab = GetPlayerVehicleID(i);
- for(new j = 0; j < MAX_PLAYERS; j++)
- {
- if(IsPlayerConnected(j))
- {
- if(IsPlayerInVehicle(j,taxicab) && GetPlayerState(j) == PLAYER_STATE_PASSENGER && Taxipass[j] == 1)
- {
- GivePlayerMoney(i,1);
- }
- }
- }
- }
- }
- }
- public TaxiPassengerTimer()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Taxipass[i] == 1 && GetPlayerMoney(i) >=5)
- {
- GivePlayerMoney(i,-1);
- }
- else
- if(Taxipass[i] == 1 && GetPlayerMoney(i) <=4)
- {
- SendClientMessage(i,COLOR_ERROR, "You cannot afford to pay the driver the minimum hire fee ($5)");
- RemovePlayerFromVehicle(i);
- Taxipass[i] =0;
- }
- }
- }
- //------------------------------------------------------------------------------------------------------------------
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER && gTeam[playerid] == TEAM_DRIVER) {
- new vehicleidd = GetPlayerVehicleID(playerid);
- if(GetVehicleModel(vehicleidd) == 420 || GetVehicleModel(vehicleidd) == 487 || GetVehicleModel(vehicleidd) == 431 || GetVehicleModel(vehicleidd) == 409) {
- SendClientMessage(playerid,0x00C7FFAA,"You have entered a drivers vehicle. Type /onduty to go on duty as a taxi driver");
- SendClientMessage(playerid,0x00C7FFAA,"All taxi drivers have a fixed rate of $1 / Minute. You get a bonus for picking passengers up");
- }
- }
- if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_PASSENGER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(gTeam[playerid] != TEAM_DRIVER && GetVehicleModel(vehicleid) == 420 || GetVehicleModel(vehicleid) == 487 || GetVehicleModel(vehicleid) == 431 || GetVehicleModel(vehicleid) == 409)
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerInVehicle(i,vehicleid))
- {
- if(gTeam[i] == TEAM_DRIVER && GetPlayerState(i) == PLAYER_STATE_DRIVER && Driveronduty[i] == 1)
- {
- SendClientMessage(playerid, 0xA9A9A9AA, "|_Driver On Duty_|");
- SendClientMessage(playerid,COLOR_DARKOLIVEGREEN,"This driver is on duty. You will be charged $1 / 1 game minute");
- SendClientMessage(i, 0xA9A9A9AA, "|_Passenger Pick Up_|");
- SendClientMessage(i,COLOR_DARKOLIVEGREEN,"You have picked up a paying passenger. You receive a �2500 bonus");
- oscore = GetPlayerScore(playerid);
- SetPlayerScore(playerid, oscore +1);
- GivePlayerMoney(i,2500);
- Taxipass[playerid] =1;
- }
- }
- }
- }
- }
- return 1;
- }
- SetPlayerToTeamColour(playerid) {
- if(gTeam[playerid] == TEAM_COP) {
- SetPlayerColor(playerid,COLOR_BLUE); // Blue
- } else if(gTeam[playerid] == TEAM_MECHANIC) {
- SetPlayerColor(playerid,COLOR_WHITE); // White
- } else if(gTeam[playerid] == TEAM_DRIVER) {
- SetPlayerColor(playerid,COLOR_DARKOLIVEGREEN); // Dark Olive Green
- } else if(gTeam[playerid] == TEAM_MEDIC) {
- SetPlayerColor(playerid,COLOR_FORESTGREEN); // Forrest Green
- }
- AntiDeAMX();
- }
- AntiDeAMX()
- {
- new a[][] =
- {
- "Unarmed (Fist)",
- "Brass K"
- };
- #pragma unused a
- }
Advertisement
Add Comment
Please, Sign In to add comment