All pastes #459907 Raw Edit

Someone

public text v1 · immutable
#459907 ·published 2007-04-26 19:24 UTC
rendered paste body
#include <a_samp>
#include <dutils>
#include <dini>
#include <dudb>
#include <hs>
#include <dprop>

#define VERSION                                                                 "1.0.3"
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_RED1 0xFF0000AA
#define TEAM_COP 1
#define TEAM_BISTRO 2
#define TEAM_TAXI 3
#define TEAM_DISCON 4
#define TEAM_PILOT 5
#define TEAM_DRIVER 6
#define TEAM_DRIVER2 7


#pragma unused TimerDST // make it shut up saying that TimerDST is unused.
#define TooFast 0
#define TooSlow 1000

new File:DSchool;
new connect[MAX_PLAYERS];
new hack;

new Float:CPDSchoolData[24][4] =
{
{-2047.2,-83.0,34.8,3.0}, // DT1 and 24
{-2026.6925,-70.1228,34.8783,3.0}, // DT2
{-2004.7513,189.6104,27.2453,3.0}, // DT3
{-2005.5742,445.2907,34.7222,3.0}, // DT4
{-2004.9156,657.1252,41.4480,3.0}, // DT5
{-2003.5272,958.6751,45.0033,3.0}, // DT6
{-2002.3400,1074.9663,55.2773,3.0}, // DT7
{-2160.8247,1070.2000,55.2843,3.0},// DT8
{-2166.7864,1047.6621,55.3587,3.0},// DT9
{-2106.8022,1051.5979,55.2844,3.0}, // DT10
{-2015.2802,1051.7932,55.2764,3.0}, // DT11
{-2006.7701,1022.1216,54.4400,3.0}, // DT12
{-2009.5132,932.4048,45.0042,3.0},// DT13
{-2008.8276,749.4720,44.9973,3.0}, // DT14
{-2008.6039,657.2002,41.4607,3.0}, // DT15
{-2007.3783,557.6398,34.7220,3.0}, // DT16
{-2009.1946,291.6661,33.8823,3.0}, // DT17
{-2009.2443,148.1573,27.2452,3.0}, // DT18
{-2009.5765,78.9214,27.2453,3.0}, // DT19
{-2009.7845,34.7367,32.5174,3.0}, // DT20
{-2009.8560,-55.1156,34.8721,3.0}, // DT21
{-2033.1410,-68.0971,34.8788,3.0}, // DT22
{-2042.7212,-69.9372,35.0068,3.0}, // DT23
{-2047.2,-83.0,34.8,3.0}  // DT1 and 24
};

// You can make up some checkpoints of your own!
// I've coded everything else here!
//
// This starts and ends at the SF Driving School.

new TimerCD,TimerDSTime;
new TimerDST;
new PID;
new DriverTakingTest;
new DSCP[MAX_PLAYERS];

// ZONES
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] = {
{ "'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},
{ "Caligula's Palace",            2087.30,  1543.20,   -89.00,  2437.30,  1703.20,   110.90},
{ "Caligula's Palace",            2137.40,  1703.20,   -89.00,  2437.30,  1783.20,   110.90},
{ "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},
{ "City Hall",                   -2867.80,   277.40,    -9.10, -2593.40,   458.40,   200.00},
{ "Come-A-Lot",                   2087.30,   943.20,   -89.00,  2623.10,  1203.20,   110.90},
{ "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},
{ "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},
{ "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},
{ "Palomino Creek",               2160.20,  -149.00,     0.00,  2576.90,   228.30,   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},
{ "Royal Casino",                 2087.30,  1383.20,   -89.00,  2437.30,  1543.20,   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},
{ "Starfish Casino",              2437.30,  1783.20,   -89.00,  2685.10,  2012.10,   110.90},
{ "Starfish Casino",              2437.30,  1858.10,   -39.00,  2495.00,  1970.80,    60.90},
{ "Starfish Casino",              2162.30,  1883.20,   -89.00,  2437.30,  2012.10,   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 Camel's Toe",              2087.30,  1203.20,   -89.00,  2640.40,  1383.20,   110.90},
{ "The Clown's Pocket",           2162.30,  1783.20,   -89.00,  2437.30,  1883.20,   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 Four Dragons Casino",      1817.30,   863.20,   -89.00,  2027.30,  1083.20,   110.90},
{ "The High Roller",              1817.30,  1283.20,   -89.00,  2027.30,  1469.20,   110.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 Pink Swan",                1817.30,  1083.20,   -89.00,  2027.30,  1283.20,   110.90},
{ "The Sherman Dam",              -968.70,  1929.40,    -3.00,  -481.10,  2155.20,   200.00},
{ "The Strip",                    2027.40,   863.20,   -89.00,  2087.30,  1703.20,   110.90},
{ "The Strip",                    2106.70,  1863.20,   -89.00,  2162.30,  2202.70,   110.90},
{ "The Strip",                    2027.40,  1783.20,   -89.00,  2162.30,  1863.20,   110.90},
{ "The Strip",                    2027.40,  1703.20,   -89.00,  2137.40,  1783.20,   110.90},
{ "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},
// Main Zones
{ "Los Santos",                     44.60, -2892.90,  -242.90,  2997.00,  -768.00,   900.00},
{ "Las Venturas",                  869.40,   596.30,  -242.90,  2997.00,  2993.80,   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},
{ "Red County",                  -1213.90,  -768.00,  -242.90,  2997.00,   596.30,   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}};
#define dcmd(%1,%2) if ((strcmp(cmdtext, "/%1", true, %2 + 1) == 0) && (((cmdtext[%2 + 1] == 0) && (dcmd_%1(playerid, ""))) || ((cmdtext[%2 + 1] == 32) && (dcmd_%1(playerid, cmdtext[%2 + 2]))))) return 1

#define TEAM_ADMIN 2
#define TEAM_DM_RED 3
#define TEAM_DM_BLUE 4

new gTeam[MAX_PLAYERS] = {1, ...};

#define MAX_SAVE 64
new savedInfo[MAX_SAVE][4];
new savedNames[MAX_SAVE][MAX_PLAYER_NAME];
new savePos;

#include "scriptai/LGdefines.pwn"
#include "scriptai/defines.pwn"

new dmzonos[MAX_ZONES][DMZONES]=
{
// NAME			Z_MAX_X	Z_MIN_X	Z_MAX_Y	Z_MIN_Y			TEAMS		TM_ONE_X	TM_ONE_Y	TM_ONE_Z	TM_TWO_X	TM_TWO_Y	TM_TWO_Z	INTERIOR	SPECIAL	DMGUNS(First not 4 guns)
{"LS Beach",  626.5,	415.4,-1806.0, -1936.1,    2,  			444.86, -1872.64, 6.94,     609.20,   -1872.60,  8.34,	0,  0, NO_WEPS},
{"LS Beach",  626.5,	415.4,-1806.0, -1936.1,    2,  			444.86, -1872.64, 6.94,     609.20,   -1872.60,  8.34,	0,  0, NO_WEPS},
{"Jail",  		200.9,	195.4, 177.8, 	 171.4,    1,  			197.70,		174.88,1003.0,     0.0,   0.0,  0.0,	3,  0, NO_WEPS},
{"Island", -1532.79,-1649.32,1443.68,1293.10,    2,			-1554.68,1335.78,4.11,     -1650.25,1325.26,1.98,	0,  1, NO_WEPS},
{"Roof", 		2066.84,2048.60, 2440.61,2426.44,    1,			2058.1421,2433.8687,165.61,     0.0,   0.0,  0.0,	0,  1, NO_WEPS},
{"FBI", 		-1279.72,-1338.25, 2562.1,2481.0,    2,			-1302.6569,2547.5730,90.33,   -1322.1211,2506.3687,89.57,	0,  2, {4, 24, 25, 29, 31}}
};

#include "scriptai/lang.pwn"
#include "scriptai/language.pwn"
#include "scriptai/funkcijos.pwn"

new gLGPoints[][LG_MAIN] =
{
//	NAME										AREA_MIN_X AREA_MAX_X	AREA_MIN_Y	AREA_MAX_Y	CP_X		  CP_Y		 CP_Z		CP_S		OPTION_1	OP_2	SPECIAL					TEAMS							OWNER					LINKS
	{"Las Venturas Airport",  1663.27,    1710.1,    1415.0,     1484.6,    1683.04,  1453.51, 10.33, 5.0,     25000,     0,  LG_TELEPORT,	LG_ALL_TEAMS,  INVALID_PLAYER_ID,	{7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
	{"San Fierro Airport",   -1612.77,  -1306.94,   -395.97,     -270.0,   -1423.48,  -290.99, 14.15, 5.0,     25000,     0,  LG_TELEPORT,	LG_ALL_TEAMS,  INVALID_PLAYER_ID,	{7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
	{"Los Santos Airport",    1555.59,   1608.68,  -2338.16,   -2274.87,    1579.12, -2291.78, 12.92, 5.0,     25000,     0,  LG_TELEPORT,	LG_ALL_TEAMS,  INVALID_PLAYER_ID,	{6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
	{"Four Dragons Casino",    2022.5,    2042.8,    990.04,    1028.88,    2027.74,	1015.96, 10.82, 4.0,     30000,     0,  LG_TELEPORT,	LG_ALL_TEAMS,  INVALID_PLAYER_ID,	{9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
	{"Mount Chiliad",        -2072.87,  -1956.11,  -1921.32,   -1835.17,   -2038.38, -1883.25, 50.29, 6.0,     10000,     0,  LG_TELEPORT,	LG_ALL_TEAMS,  INVALID_PLAYER_ID,	{9, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}},
//	NAME									MIN_X MAX_X	MIN_Y	MAX_Y		CP_X		  CP_Y		 CP_Z		CP_S		IN	OP_2	SPECIAL											TEAMS	OWNER					LINKS
	{"Las Venturas Airport", 0.0, 0.0,	0.0,	0.0,    1657.49,	1316.38,	10.38,	90.0,  0, 	0,	LG_TARGET | LG_NO_CHECKPOINT,	0,	INVALID_PLAYER_ID,      LG_NO_LINK}, //Las Venturas Airport 5
	{"San Fierro Airport",   0.0, 0.0,	0.0,	0.0,   -1409.54,	-304.33,	14.15, 206.8,  0,		0,	LG_TARGET | LG_NO_CHECKPOINT,	0,	INVALID_PLAYER_ID,      LG_NO_LINK}, //San Fierro Airport 6
	{"Los Santos Airport",   0.0,	0.0,	0.0,	0.0, 		1560.39, -2319.31,	13.12,	90.0,  0,		0,	LG_TARGET | LG_NO_CHECKPOINT,	0,	INVALID_PLAYER_ID,      LG_NO_LINK}, //Los Santos Airport 7
	{"Four Dragons Casino",  0.0,	0.0,	0.0,	0.0,    2030.81,	 999.23,	10.58, 359.9,	 0,		0,	LG_TARGET | LG_NO_CHECKPOINT,	0,	INVALID_PLAYER_ID,      LG_NO_LINK}, //Four Dragons Casino 8
	{"Mount Chiliad Top",    0.0,	0.0,	0.0,	0.0,   -2321.28, -1637.94, 483.70,	90.0,  0,		0,	LG_TARGET | LG_NO_CHECKPOINT,	0,	INVALID_PLAYER_ID,      LG_NO_LINK}, //Mount Chiliad Top 9
	{"LV TransFender",    0.0,	0.0,	0.0,	0.0,   2392.8, 985.4, 10.5,	89.3,  0,		0,	LG_TARGET | LG_NO_CHECKPOINT,	0,	INVALID_PLAYER_ID,      LG_NO_LINK}, //LV TransFender 10
	{"SF TransFender",    0.0,	0.0,	0.0,	0.0,   -1912.1, 302.8, 40.7,	180.1,  0,		0,	LG_TARGET | LG_NO_CHECKPOINT,	0,	INVALID_PLAYER_ID,      LG_NO_LINK}, //SF TransFender 11
	{"Lowriders Tuning",    0.0,	0.0,	0.0,	0.0,   2639.9, -2008.8, 13.2,	223.9,  0,		0,	LG_TARGET | LG_NO_CHECKPOINT,	0,	INVALID_PLAYER_ID,      LG_NO_LINK}, //Lowriders Tuning 12
	{"StreetRace Tuning",    0.0,	0.0,	0.0,	0.0,   -2693.9, 210.1, 4.0,	88.8,  0,		0,	LG_TARGET | LG_NO_CHECKPOINT,	0,	INVALID_PLAYER_ID,      LG_NO_LINK}, //StreetRace Tuning 13
	{"LV TransFender",  2377.7,2391.0,1030.6, 1042.8, 2379.94,  1038.87, 10.5, 5.0,     15000,     0,  LG_TELEPORT,	LG_ALL_TEAMS,  INVALID_PLAYER_ID,	{11, 13, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}, //LV TransFender
	{"SF TransFender",  -1924.7,-1910.1,289.1, 309.1, -1922.0,  302.2, 40.7, 5.0,     15000,     0,  LG_TELEPORT,	LG_ALL_TEAMS,  INVALID_PLAYER_ID,	{10, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}, //SF TransFender
	{"Lowriders Tuning",  2641.3,2663.6,-2038.6, -2026.1,2654.3,-2036.2, 13.2, 5.0,     15000,     0,  LG_TELEPORT,	LG_ALL_TEAMS,  INVALID_PLAYER_ID,	{10, 11, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}, //Lowriders Tuning
	{"StreetRace Tuning", -2717.7,-2710.4,188.2,207.6,-2714.5,200.0, 4.3, 5.0,     15000,     0,  LG_TELEPORT,	LG_ALL_TEAMS,  INVALID_PLAYER_ID,	{10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}}, //StreetRace Tuning
	{"24-7",	-36.5483,	-17.2655,	-57.9948,	-49.2967,	-22.2549,		-55.6575,	1003.5469,	3.0,		4,		0,		LG_BANK | LG_INTERIOR,		LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK},
	{"Ammunation",		284.24,	300.04,	-41.81,		-31.22,			291.10,	-39.34,	1001.51,		3.0,		0,		0,		LG_AMMU | LG_INTERIOR,		LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // amu1
	{"Ammunation",		284.62,	303.03,	-86.40,		-56.66,			290.47,	-83.19,	1001.51,		3.0,		0,		0,		LG_AMMU | LG_INTERIOR,		LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // amu1
	{"Ammunation",		284.51,	298.16,	-112.30,	-103.16,		286.70,	-108.05,	1001.51,	3.0,		0,		0,		LG_AMMU | LG_INTERIOR,		LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // amu1
	{"Ammunation",		302.96,	317.06,	-144.33,	-126.05,		313.52,	-134.18,	999.60,		3.0,		0,		0,		LG_AMMU | LG_INTERIOR,		LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // amu1
	{"Ammunation",		306.40,	319.11,	-169.91,	-158.76,		307.94,	-166.70,	999.59,		3.0,		0,		0,		LG_AMMU | LG_INTERIOR,		LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // amu1
	{"Sex Shop",		-115.95,	-99.16,		-24.27,		-7.14,		-103.55,	-22.46,		1000.72,	2.0,		25000,		2000,		LG_PROPERTY | LG_INTERIOR,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // sex
	{"Four Dragons Casino",		1925.15,	2019.07,		968.23,		1067.43,		1989.06,	1005.52,		994.47,	2.0,		150000,		5000,		LG_PROPERTY | LG_INTERIOR,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // DRAGON
	{"Caligula Casino",		2216.8,	2255.21,		1638.05,		1714.08,		2235.54,	1679.04,		1008.36,	3.0,		200000,		7500,		LG_PROPERTY | LG_INTERIOR,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // Caligula
	{"Zip Shop",		144.91,	177.41,		-96.09,		70.79,		161.19,	-79.99,		1001.80,	3.0,		15000,		1000,		LG_PROPERTY | LG_INTERIOR,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // Zip Shop
	{"Binco Shop",		201.45,	218.52,		-112.45,		-95.12,		207.56,		-97.82,		1005.26,	3.0,		15000,		1000,		LG_PROPERTY | LG_INTERIOR,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // Binco Shop
	{"Tatoo Parlor",		-204.76,	-200.23,		-44.03,		-39.81,		-203.49,		-41.20,		1002.27,	3.0,		10000,		700,		LG_PROPERTY | LG_INTERIOR,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // Tatoo Parlor
	{"Pirate Ship", 1995.5,  2006.0,     1518.0,   1569.0,    0.0,     0.0,    0.0,    90.0,     20,      500,      LG_MONEY_AREA | LG_NO_CHECKPOINT,  LG_ALL_TEAMS, INVALID_PLAYER_ID, LG_NO_LINK},  // Pirate Ship
	{"Shithole Bar",		487.65,	512.06,		-88.59,		-67.75,				501.49,	-75.43,	998.76,	3.0,		20000,		1500,		LG_PROPERTY | LG_INTERIOR,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // Shithole Bar
	{"Botique",		416.75,	422.69,		-84.42,		-74.06,							418.55,	-80.17,	1001.80,	3.0,		15000,		1500,		LG_PROPERTY | LG_INTERIOR,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // Botique
	{"Jizzy's Club",	-2676.06,	-2642.41,	1398.35,	1421.62,			-2649.1,1409.75,906.27,	3.0,		75000,		5000,		LG_PROPERTY | LG_INTERIOR,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // Jizzy's Club
	{"Cars export",	-1669.99,-1505.88,	32.52,	145.96,		-1547.7180,124.9779,3.5547,	7.0,		0,		0,		LG_EXPORT,	LG_ALL_TEAMS,	INVALID_PLAYER_ID,	LG_NO_LINK}, // Cars...
	{"Admin Place",   1199.67, 1322.19, -842.73, -769.91,    0.0,        0.0,        0.0,        0.0,        0,      0,      LG_FORBIDDEN,				LG_NOT_TEAMS | TEAM_ADMIN,   INVALID_PLAYER_ID, LG_NO_LINK}
};

new HSareas[][HS_HOUSE] =
{
	{"None",	0.0,	 		0.0,	0.0,		0.0,	0.0,	0.0,	0.0,	0,		0.0,	0.0,	0.0,	0.0,	0.0,0.0,0.0,	0,	0,		0,			0,		0},
//	NAME						IN_MIN_X	IN_MAX_X	IN_MIN_Y		IN_MAX_Y			||INS_X		||INS_Y		||INS_Z		||INTER	OUT_MIN_X		OUT_MAX_X		OUT_MIN_Y		OUT_MAX_Y		OUTS_X		OUTS_Y		OUTS_Z	KAINA			OP_2	OP_3	OP_4	SPECIAL
	{"LS-El_Corona",	2350.0,		2380.0,		-1140.0,		-1110.0,			2365.29,	-1132.92,	1050.875,	8,			1678.50,		1694.38,		-2107.61,		-2082.36,		1684.84,	-2101.05,	13.83,	5000000,	0,		0,			0,		0},
	{"Doherty",				2181.4,		2205.1,		-1227.4,		-1195.6,			2194.78,	-1204.35,	1049.02,	6,			-2033.08,		-2017.48,		-59.6700,		-40.6300,		-2028.71,	-44.93,		38.2,		8000000,	0,		0,			0,		0},
	{"Bardokas House",132.256,	156.45,		1362.95,		1388.70,			140.478,	1367.98,	1083.86,	5,			-2688.85,		-2673.83,			816.99,		830.27,			819.96,	49.98,	94.75,100000000,	0,		0,			0,		0},
	{"The Camel Toe",	2200.0,		2220.0,		-1080.0,		-1065.0,			2215.08,	-1076.29,	1050.48,	1,				2223.0,			2240.0,		1275.000,			1295.0,		2234.09,	1285.39,	10.82,	6000000,	0,		0,			0,		0},
	{"House 1",				215.55,		236.25,		1285.58,		1295.25,			223.28,		1289.156,	1082.13,	1,			-2060.91,		-2058.1,		887.890,		892.950,		-2059.17,	894.10,		60.49,	6000000,	0,		0,			0,		0},
	{"House 2",				248.20,		269.30,		1283.76,		1297.14,			260.99,		1286.55,	1080.26,	4,			-1960.00,		-1952.90,		1185.39,		1191.53,		-1955.44,	1187.84,	45.44,	6000000,	0,		0,			0,		0},
	{"House 3",				-281.8,		-257.6,		1445.38,		1460.72,			-262.60,	1456.62,	1084.37,	4,			-2629.32,		-2618.88,		2278.33,		2288.04,		-2624.09,	2283.33,	8.28,		6000000,	0,		0,			0,		0},
	{"House 4",				-73.49,		-55.18,		1349.28,		1368.53,			-68.29,		1353.47,	1080.21,	6,			-2379.74,		-2368.82,		686.656,		699.670,		-2374.13,	692.69,		35.16,	6000000,	0,		0,			0,		0},
	{"House 5",				-55.19,		-32.19,		1395.78,		1413.99,			-42.58,		1408.11,	1084.43,	8,			-2282.50,		-2273.89,		909.565,		933.217,		-2277.55,	916.43,		66.65,	6000000,	0,		0,			0,		0},
	{"House 6",				72.47,		97.68,		1319.39,		1346.90,			83.34,		1324.44,	1083.86,	9,			-2541.24,		-2531.77,		758.727,		771.789,		-2537.03,	767.72,		39.86,	6000000,	0,		0,			0,		0},
{"CJ House",			2488.76,	2503.76,	-1713.75,		-1689.40,			2496.05,	-1693.93,		1014.74,	3,			2493.32,		2501.62,		-1693.4,		-1684.04,	2495.33,	-1690.25,		14.76,	6000000,	0,		0,			0,		0},
{"Gornus Place",	2307.74,	2335.05,	-1028.16,		-1000.56,			2317.25,	-1024.72,		1050.21,	9,			1270.57,		1284.13,		2519.68,		2537.32,	1277.38,	2522.47,		10.82,	1000,	0,		0,			0,		0}

};

new gLGWepDat[][LG_WEAPONS] =
{
//  NAME        	WEAPON  AMMO  PRICE	TYPE
	{"Pistol",					22,	120,	3000, 1},
	{"Silenced Pistol",	23, 120,	3500, 1},
	{"Micro Uzi",				28,	120,	7000, 2},
	{"Tec9",						32,	120,	10000,2},
	{"MP5",							29,	120,	15000,2},
	{"Shotgun",					25,	15,		7000, 3},
	{"Sawnoff",					26,	20,		20000,3},
	{"Combat shotgun",	27,	20,		15000,3},
	{"AK47",						30,	120,	25000,4},
	{"M4",							31,	120,	30000,4},
	{"Flamethrower",		37,	120,	35000,5}
};

#include "scriptai/LGfunctions.pwn"
#include "scriptai/timers.pwn"
#include "scriptai/drag.pwn"
#include "scriptai/komandos.pwn"
#include "scriptai/admin_functions.pwn"
#include "scriptai/houses.pwn"
main()
{
	print("\n===============================");
	print("|      Lithuanian RPG v2!     |");
	print("|      	Build: 0416          |");
	print("|     ----------------------- |");
	print("|     By Bardokas - (c) 2007  |");
	print("===============================\n");
	PrepareMultilanguage();
	ReadAdminSettings();
	if(dini_Exists("clanban.txt") != 1) dini_Create("clanban.txt");
	if(dini_Exists("places.txt") != 1) dini_Create("places.txt");
}

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);
      PropertySet(line1,line2);


     }
    }



    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 < 900.0) return 1;
 return 0;
}


public OnGameModeInit()
{
       DriverTakingTest=-1;

        if(!fopen("DSchool",io_read))
        {
                print("\r\n\r\nError: No driving school data found. Creating new data file.");
                DSchool=fopen("DSchool",io_readwrite);
        }
        else
        {
                print("\r\n\r\nDriving School data found. Now loading data...");
                DSchool=fopen("DSchool",io_readwrite);
        }
        fclose(DSchool);
	SetGameModeText("GamesTrack: Lithuanian FreeRoam v2.1");
	ShowPlayerMarkers(1);
	ShowNameTags(1);

	server_data[DMZONE] = 99;
	server_data[DMCOUNT] = 0;

AddPlayerClass(102,1467.4012,-872.9855,55.9954,267.5698,0,0,24,300,5,1); // ballas
AddPlayerClass(103,1467.4012,-872.9855,55.9954,267.5698,0,0,24,300,5,1); // ballas
AddPlayerClass(104,1467.4012,-872.9855,55.9954,267.5698,0,0,24,300,5,1); // ballas
AddPlayerClass(105,1467.4012,-872.9855,55.9954,267.5698,0,0,24,300,5,1); // grove
AddPlayerClass(105,1467.4012,-872.9855,55.9954,267.5698,0,0,24,300,5,1); // grove
AddPlayerClass(106,1467.4012,-872.9855,55.9954,267.5698,0,0,24,300,5,1); // grove
AddPlayerClass(107,1467.4012,-872.9855,55.9954,267.5698,0,0,24,300,5,1); // grove
AddPlayerClass(108,1467.4012,-872.9855,55.9954,267.5698,0,0,24,300,5,1); // vagos
AddPlayerClass(109,1467.4012,-872.9855,55.9954,267.5698,0,0,24,300,5,1); // vagos
AddPlayerClass(110,1467.4012,-872.9855,55.9954,267.5698,0,0,24,300,5,1); // vagos
AddPlayerClass(114,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,7,1); // sf
AddPlayerClass(115,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,7,1); // sf
AddPlayerClass(116,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,7,1); // sf
AddPlayerClass(117,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,2,1); // triad
AddPlayerClass(118,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,2,1); // triad
AddPlayerClass(120,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,2,1); // triad
AddPlayerClass(140,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,14,1); // m
AddPlayerClass(141,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,14,1); // m
AddPlayerClass(152,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,14,1); // m
AddPlayerClass(157,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,6,1); // kaimas
AddPlayerClass(158,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,6,1); // kaimas
AddPlayerClass(159,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,6,1); // kaimas
AddPlayerClass(160,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,6,1); // kaimas
AddPlayerClass(161,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,6,1); // kaimas
AddPlayerClass(162,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,6,1); // kaimas
AddPlayerClass(163,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // apsauga
AddPlayerClass(164,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // apsauga
AddPlayerClass(165,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // apsauga
AddPlayerClass(166,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // apsauga
AddPlayerClass(178,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,14,1); // m
AddPlayerClass(193,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,14,1); // m
AddPlayerClass(194,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,14,1); // m
AddPlayerClass(195,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,14,1); // m
AddPlayerClass(199,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,14,1); // m
AddPlayerClass(249,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,12,1); // pimp
AddPlayerClass(264,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,13,1); // klounas
AddPlayerClass(274,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // gr
AddPlayerClass(275,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // gr
AddPlayerClass(276,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // gr
AddPlayerClass(277,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // ug
AddPlayerClass(278,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // ug
AddPlayerClass(279,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // ug
AddPlayerClass(280,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,3,1); // mentas
AddPlayerClass(281,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,3,1); // mentas
AddPlayerClass(282,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,3,1); // mentas
AddPlayerClass(283,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,3,1); // mentas
AddPlayerClass(284,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,3,1); // mmentas
AddPlayerClass(285,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,3,1); // mentas
AddPlayerClass(286,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,3,1); // mentas
AddPlayerClass(287,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,3,1); // arm
AddPlayerClass(288,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,3,1); // mentas
AddPlayerClass(292,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // cezar
AddPlayerClass(293,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // loc
AddPlayerClass(294,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,15,1); // wuzzie
AddPlayerClass(295,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // torento
AddPlayerClass(296,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // jizzy
AddPlayerClass(297,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // mad dog
AddPlayerClass(298,1490.7413,-873.0244,59.7700,317.7036,0,0,24,300,4,1); // katalina

	AddDerbyVehicle(444,-2091.1387,-107.5150,35.6916,180.3203,-1,-1); // monster 1
	AddDerbyVehicle(444,-2081.4929,-109.2523,35.6916,177.3510,-1,-1); // monster 2
	AddDerbyVehicle(444,-2071.8445,-108.4181,35.6953,180.4918,-1,-1); // monster 3
	AddDerbyVehicle(444,-2062.1924,-107.5669,35.6575,186.1097,-1,-1); // monster 4
	AddDerbyVehicle(444,-2053.5540,-109.0128,35.6651,180.5920,-1,-1); // monster 5
	AddDerbyVehicle(444,-2044.6320,-111.2795,35.5958,180.1855,-1,-1); // monster 6
	AddDerbyVehicle(444,-2016.0815,-113.0165,35.5248,180.5477,-1,-1); // monster 7

	AddRPGVehicle(522,2,2026.5074,1019.1018,10.3912,243.0600,-1,-1); // dualgurult nrg4 rdgon
	AddRPGVehicle(522,3,1705.9698,1600.0425,9.6882,300.8055,-1,-1); // dualnrgair
	AddRPGVehicle(470,4,2103.7295,942.2062,10.8134,268.0627,43,0); // angixhammer
	AddRPGVehicle(522,5,2134.4131,944.0106,10.3921,0.9595,-1,-1); //     // nrg   -------5
	AddRPGVehicle(541,2,2222.3108,2472.0044,10.3145,10.1724,1,0); // Bullet prie mentines
	AddRPGVehicle(444,3,402.1596,2439.3762,16.1250,358.8060,-1,-1); // Monster
	AddRPGVehicle(444,5,1410.3578,2333.8342,10.6203,88.3809,-1,-1); // monster
	AddRPGVehicle(520,10,1956.9272,1571.2856,25.7734,272.1319,-1,-1); // hydra
	AddRPGVehicle(494,7,-1960.0135,280.9556,35.3656,53.3679,-1,-1); // hotring
	AddRPGVehicle(495,8,-1957.3735,283.8989,35.1852,50.2045,-1,-1); // santrech
	
//TAXIs
	AddVehicle(420,1953.6759,2263.4636,22.8184,359.8052,6,1); // TAXI 2
	AddVehicle(420,1958.9615,2263.2048,22.2335,359.6605,6,1); // taxi	3
	AddVehicle(420,1964.0929,2262.7271,21.6633,357.4146,6,1); // taxi	4
	AddVehicle(420,1972.1818,2255.1304,20.7647,268.1427,6,1); // taxi	5
	AddVehicle(420,1971.8939,2250.1074,20.7957,271.4160,6,1); //      -------10
	AddVehicle(420,1713.9319,1467.8354,10.5219,342.8006,6,1); // taxi
//Mentu
	AddVehicle(523,2294.7305,2441.2651,10.3860,9.3764,-1,-1);
	AddVehicle(523,2290.7268,2441.3323,10.3944,16.4594,-1,-1);
	AddVehicle(523,2295.5503,2455.9656,2.8444,272.6913,-1,-1);
	AddVehicle(598,2277.6846,2477.1096,10.5652,180.1090,-1,-1);     //-------15
	AddVehicle(598,2268.9888,2443.1697,10.5662,181.8062,-1,-1);
	AddVehicle(598,2256.2891,2458.5110,10.5680,358.7335,-1,-1);
	AddVehicle(598,2251.6921,2477.0205,10.5671,179.5244,-1,-1);
	AddVehicle(599,-211.5940,998.9857,19.8437,265.4935,-1,-1); //

	AddVehicle(451,2040.0520,1319.2799,10.3779,183.2439,-1,-1);       //1 TURISMO
	AddVehicle(429,2040.5247,1359.2783,10.3516,177.1306,-1,-1);       //2  banshee
	AddVehicle(411,2074.9624,1479.2120,10.3990,359.6861,-1,-1);       //4 // infernus
	AddVehicle(477,2075.6038,1666.9750,10.4252,359.7507,-1,-1);       //ZR350 5
	AddVehicle(541,2119.5845,1938.5969,10.2967,181.9064,-1,-1);       //6 // bullet
	AddVehicle(541,1843.7881,1216.0122,10.4556,270.8793,-1,-1);    //7 // bullet
	AddVehicle(402,1944.1003,1344.7717,8.9411,0.8168,-1,-1);       //BUFFALO 8
	AddVehicle(402,1679.2278,1316.6287,10.6520,180.4150,-1,-1);    //BUFFALO 9
	AddVehicle(415,1685.4872,1751.9667,10.5990,268.1183,-1,-1);       //10 // CHEETAH
	AddVehicle(411,2034.5016,1912.5874,11.9048,0.2909,-1,-1);       //11 // infernus
	AddVehicle(411,2172.1682,1988.8643,10.5474,89.9151,-1,-1);       //12 // infernus
	AddVehicle(429,2245.5759,2042.4166,10.5000,270.7350,-1,-1);       //13 banshee
	AddVehicle(477,2361.1538,1993.9761,10.4260,178.3929,-1,-1);       //ZR350 14
	AddVehicle(558,2243.3833,1952.4221,14.9761,359.4796,-1,-1);        //URANUS
	AddVehicle(587,2276.7085,1938.7263,31.5046,359.2321,-1,-1);     // EUROS 17
	AddVehicle(587,2602.7769,1853.0667,10.5468,91.4813,-1,-1);   // EUROS 18
	AddVehicle(603,2610.7600,1694.2588,10.6585,89.3303,-1,-1);  // PHOENIX 19
	AddVehicle(587,2635.2419,1075.7726,10.5472,89.9571,-1,-1); // EUROS
	AddVehicle(562,2577.2354,1038.8063,10.4777,181.7069,-1,-1); // ELEGY
	AddVehicle(562,2394.1021,989.4888,10.4806,89.5080,-1,-1); // ELEGY
	AddVehicle(562,1881.0510,957.2120,10.4789,270.4388,-1,-1); // ELEGY
	AddVehicle(535,2039.1257,1545.0879,10.3481,359.6690,-1,-1); //SLAMVAN
	AddVehicle(429,2010.0841,2489.5510,10.5003,268.7720,-1,-1);	// banshee
	AddVehicle(415,2076.4033,2468.7947,10.5923,359.9186,-1,-1); // CHEETAH
	AddVehicle(487,2093.2754,2414.9421,74.7556,89.0247,-1,-1); //MAVERICK
	AddVehicle(506,2352.9026,2577.9768,10.5201,0.4091,-1,-1); // SUPERGT
	AddVehicle(506,2166.6963,2741.0413,10.5245,89.7816,-1,-1); // SUPERGT
	AddVehicle(411,1960.9989,2754.9072,10.5473,200.4316,-1,-1); // infernus
	AddVehicle(429,1919.5863,2760.7595,10.5079,100.0753,-1,-1);	// banshee
	AddVehicle(415,1673.8038,2693.8044,10.5912,359.7903,-1,-1); // CHEETAH
	AddVehicle(402,1591.0482,2746.3982,10.6519,172.5125,-1,-1); //BUFFALO
	AddVehicle(603,1580.4537,2838.2886,10.6614,181.4573,-1,-1); // PHOENIX
	AddVehicle(535,1455.9305,2878.5288,10.5837,181.0987,-1,-1); //SLAMVAN
	AddVehicle(477,1537.8425,2578.0525,10.5662,0.0650,-1,-1); // ZR350
	AddVehicle(451,1433.1594,2607.3762,10.3781,88.0013,-1,-1); 	//TURISMO
	AddVehicle(603,2223.5898,1288.1464,10.5104,182.0297,-1,-1); // PHOENIX
	AddVehicle(558,2451.6707,1207.1179,10.4510,179.8960,-1,-1); //URANUS
	AddVehicle(558,2461.8162,1629.2268,10.4496,181.4625,-1,-1); //URANUS
	AddVehicle(477,2395.7554,1658.9591,10.5740,359.7374,-1,-1); // ZR350
	AddVehicle(522,953.2818,1806.1392,8.2188,235.0706,-1,-1); // nrg
	AddVehicle(522,995.5328,1886.6055,10.5359,90.1048,-1,-1); // nrg
	AddVehicle(521,993.7083,2267.4133,11.0315,1.5610,-1,-1); //FCR900
	AddVehicle(535,1439.5662,1999.9822,10.5843,0.4194,-1,-1);//SLAMVAN
	AddVehicle(522,1430.2354,1999.0144,10.3896,352.0951,-1,-1); // nrg
	AddVehicle(522,2156.3540,2188.6572,10.2414,22.6504,-1,-1); // nrg
	AddVehicle(522,2476.7900,2532.2222,21.4416,0.5081,-1,-1); // nrg
	AddVehicle(522,2580.5320,2267.9595,10.3917,271.2372,-1,-1); // nrg
	AddVehicle(522,2814.4331,2364.6641,10.3907,89.6752,-1,-1); // nrg
	AddVehicle(535,2827.4143,2345.6953,10.5768,270.0668,-1,-1); //SLAMVAN
	AddVehicle(521,1670.1089,1297.8322,10.3864,359.4936,-1,-1); //FCR900
	AddVehicle(487,1614.7153,1548.7513,11.2749,347.1516,-1,-1); // MAVERICK
	AddVehicle(487,1608.3851,1630.7268,11.2840,174.5517,-1,-1); // MAVERICK
	AddVehicle(476,1283.0006,1324.8849,9.5332,275.0468,-1,-1); //RUSTLER
	AddVehicle(476,1283.6847,1386.5137,11.5300,272.1003,-1,-1); //RUSTLER
	AddVehicle(415,1319.1038,1279.1791,10.5931,0.9661,-1,-1); // CHEETAH
	AddVehicle(521,1710.5763,1805.9275,10.3911,176.5028,-1,-1); //FCR900
	AddVehicle(521,2805.1650,2027.0028,10.3920,357.5978,-1,-1); //FCR900
	AddVehicle(535,2822.3628,2240.3594,10.5812,89.7540,-1,-1); //SLAMVAN
	AddVehicle(521,2876.8013,2326.8418,10.3914,267.8946,-1,-1); //FCR900
	AddVehicle(429,2842.0554,2637.0105,10.5000,182.2949,-1,-1);	// banshee
	AddVehicle(549,2494.4214,2813.9348,10.5172,316.9462,-1,-1); //TAMPA
	AddVehicle(549,2327.6484,2787.7327,10.5174,179.5639,-1,-1); //TAMPA
	AddVehicle(549,2142.6970,2806.6758,10.5176,89.8970,-1,-1); //TAMPA
	AddVehicle(521,2139.7012,2799.2114,10.3917,229.6327,-1,-1); //FCR900
	AddVehicle(521,2104.9446,2658.1331,10.3834,82.2700,-1,-1); //FCR900
	AddVehicle(521,1914.2322,2148.2590,10.3906,267.7297,-1,-1); //FCR900
	AddVehicle(549,1532.6139,2258.0173,10.5176,359.1516,-1,-1); //TAMPA
	AddVehicle(521,1534.3204,2202.8970,10.3644,4.9108,-1,-1); //FCR900
	AddVehicle(549,1613.1553,2200.2664,10.5176,89.6204,-1,-1); //TAMPA
	AddVehicle(411,1281.7458,2571.6719,10.5472,270.6128,-1,-1); // infernus
	AddVehicle(522,1305.5295,2528.3076,10.3955,88.7249,-1,-1); // nrg
	AddVehicle(521,993.9020,2159.4194,10.3905,88.8805,-1,-1); //FCR900
	AddVehicle(415,1512.7134,787.6931,10.5921,359.5796,-1,-1); // CHEETAH
	AddVehicle(522,2299.5872,1469.7910,10.3815,258.4984,-1,-1); // nrg
	AddVehicle(522,2133.6428,1012.8537,10.3789,87.1290,-1,-1); // nrg
	AddVehicle(415,2266.7336,648.4756,11.0053,177.8517,-1,-1); // // CHEETAH	//Monday 13th Additions ~ Jax 
	AddVehicle(506,2628.1047,746.8704,10.5246,352.7574,-1,-1);  // SUPERGT
	AddVehicle(549,2817.6445,928.3469,10.4470,359.5235,-1,-1);  //TAMPA
	AddVehicle(562,1881.6346,1006.7653,10.4783,86.9967,-1,-1);  // ELEGY
	AddVehicle(562,2038.1044,1006.4022,10.4040,179.2641,-1,-1);  // ELEGY
	AddVehicle(562,2038.1614,1014.8566,10.4057,179.8665,-1,-1);  // ELEGY
	AddVehicle(562,2038.0966,1026.7987,10.4040,180.6107,-1,-1);  // ELEGY
	AddVehicle(476,325.4121,2538.5999,17.5184,181.2964,-1,-1);  //RUSTLER
	AddVehicle(549,843.1893,838.8093,12.5177,18.2348,-1,-1); //TAMPA
	AddVehicle(588,-290.2229,1317.0276,54.1871,81.7529,-1,-1); //HOTDOG
	AddVehicle(451,-290.3145,1567.1534,75.0654,133.1694,-1,-1); //TURISMO
	AddVehicle(470,280.4914,1945.6143,17.6317,310.3278,-1,-1); //PATRIOT
	AddVehicle(470,272.2862,1949.4713,17.6367,285.9714,-1,-1); //PATRIOT
	AddVehicle(470,271.6122,1961.2386,17.6373,251.9081,-1,-1); //PATRIOT
	AddVehicle(470,279.8705,1966.2362,17.6436,228.4709,-1,-1); //PATRIOT
	AddVehicle(568,-441.3438,2215.7026,42.2489,191.7953,-1,-1); //BANDITO
	AddVehicle(568,-422.2956,2225.2612,42.2465,0.0616,-1,-1); //BANDITO
	AddVehicle(568,-371.7973,2234.5527,42.3497,285.9481,-1,-1); //BANDITO
	AddVehicle(568,-360.1159,2203.4272,42.3039,113.6446,-1,-1); //BANDITO
	AddVehicle(468,-660.7385,2315.2642,138.3866,358.7643,-1,-1);  // kalninukas
	AddVehicle(429,114.7416,1048.3517,13.2890,174.9752,-1,-1); // banshee
	AddVehicle(411,-290.0065,1759.4958,42.4154,89.7571,-1,-1); // // infernus
	AddVehicle(522,-302.5649,1777.7349,42.2514,238.5039,-1,-1); // // nrg
	AddVehicle(522,-302.9650,1776.1152,42.2588,239.9874,-1,-1); // // nrg
	AddVehicle(535,-866.1774,1557.2700,23.8319,269.3263,-1,-1); //SLAMVAN
	AddVehicle(521,-749.9730,1589.8435,26.5311,125.6508,-1,-1);  //FCR900
	AddVehicle(522,-867.8612,1544.5282,22.5419,296.0923,-1,-1); // // nrg
	AddVehicle(521,-944.2642,1424.1603,29.6783,148.5582,-1,-1);  //FCR900
	AddVehicle(429,-237.7157,2594.8804,62.3828,178.6802,-1,-1); // banshee
	AddVehicle(519,-1341.1079,-254.3787,15.0701,321.6338,-1,-1); //SHAMAL
	AddVehicle(519,-1371.1775,-232.3967,15.0676,315.6091,-1,-1); //SHAMAL
	AddVehicle(519,1642.9850,-2425.2063,14.4744,159.8745,-1,-1); //SHAMAL
	AddVehicle(519,1734.1311,-2426.7563,14.4734,172.2036,-1,-1); //SHAMAL
	AddVehicle(415,-680.9882,955.4495,11.9032,84.2754,-1,-1); //CHEETAH
	AddVehicle(560,2133.0769,1019.2366,10.5259,90.5265,-1,-1);  // SULTAN
	AddVehicle(560,2142.4023,1408.5675,10.5258,0.3660,-1,-1); // SULTAN
	AddVehicle(560,2196.3340,1856.8469,10.5257,179.8070,-1,-1); // SULTAN
	AddVehicle(560,2103.4146,2069.1514,10.5249,270.1451,-1,-1); // SULTAN
	AddVehicle(560,2361.8042,2210.9951,10.3848,178.7366,-1,-1); // SULTAN
	AddNSVehicle(560,-1993.2465,241.5329,34.8774,310.0117,-1,-1); // SULTAN
	AddNSVehicle(559,-1989.3235,270.1447,34.8321,88.6822,-1,-1); //JESTER
	AddNSVehicle(559,-1946.2416,273.2482,35.1302,126.4200,-1,-1); //JESTER
	AddNSVehicle(558,-1956.8257,271.4941,35.0984,71.7499,-1,-1);  //URANUS
	AddNSVehicle(562,-1952.8894,258.8604,40.7082,51.7172,-1,-1);  // ELEGY
	AddNSVehicle(411,-1949.8689,266.5759,40.7776,216.4882,-1,-1); // // infernus
	AddNSVehicle(429,-1988.0347,305.4242,34.8553,87.0725,-1,-1); // banshee
	AddVehicle(559,-1657.6660,1213.6195,6.9062,282.6953,-1,-1);  //JESTER
	AddVehicle(560,-1658.3722,1213.2236,13.3806,37.9052,-1,-1); // SULTAN
	AddVehicle(558,-1660.8994,1210.7589,20.7875,317.6098,-1,-1);  //URANUS
	AddVehicle(411,113.8611,1068.6182,13.3395,177.1330,-1,-1); // // infernus
	AddVehicle(429,159.5199,1185.1160,14.7324,85.5769,-1,-1); // banshee
	AddVehicle(411,612.4678,1694.4126,6.7192,302.5539,-1,-1);  // infernus
	AddVehicle(522,661.7609,1720.9894,6.5641,19.1231,-1,-1); // // nrg
	AddVehicle(522,660.0554,1719.1187,6.5642,12.7699,-1,-1); // // nrg
	AddVehicle(567,711.4207,1947.5208,5.4056,179.3810,-1,-1); // SAVANNA
	AddVehicle(567,1031.8435,1920.3726,11.3369,89.4978,-1,-1); // SAVANNA
	AddVehicle(567,1112.3754,1747.8737,10.6923,270.9278,-1,-1); // SAVANNA
	AddVehicle(567,1641.6802,1299.2113,10.6869,271.4891,-1,-1); // SAVANNA
	AddVehicle(567,2135.8757,1408.4512,10.6867,180.4562,-1,-1); // SAVANNA
	AddVehicle(567,2262.2639,1469.2202,14.9177,91.1919,-1,-1); // SAVANNA
	AddVehicle(567,2461.7380,1345.5385,10.6975,0.9317,-1,-1); // SAVANNA
	AddVehicle(567,2804.4365,1332.5348,10.6283,271.7682,-1,-1); // SAVANNA
	AddVehicle(560,2805.1685,1361.4004,10.4548,270.2340,-1,-1); // SULTAN
	AddVehicle(506,2853.5378,1361.4677,10.5149,269.6648,-1,-1); // SUPERGT
	AddVehicle(567,2633.9832,2205.7061,10.6868,180.0076,-1,-1); // SAVANNA
	AddVehicle(567,2119.9751,2049.3127,10.5423,180.1963,-1,-1); // SAVANNA
	AddVehicle(567,2785.0261,-1835.0374,9.6874,226.9852,-1,-1);  // SAVANNA
	AddVehicle(567,2787.8975,-1876.2583,9.6966,0.5804,-1,-1); // SAVANNA
	AddVehicle(411,2771.2993,-1841.5620,9.4870,20.7678,-1,-1);  // infernus
	AddVehicle(443,2154.5205,2120.4434,11.3013,180.2837,-1,-1); // inf
AddVehicle(468,-2346.5229,-1592.7223,483.2390,242.2440,-1,-1); // kalninukas
AddVehicle(468,-2345.9370,-1591.1117,483.2307,241.5764,-1,-1); // kalninukasg
AddVehicle(468,-2347.2437,-1594.2302,483.2452,248.3437,-1,-1); // kalninukas
AddVehicle(522,-2344.7949,-1589.8748,483.1292,246.0832,-1,-1); // nrg
AddVehicle(522,-2344.4785,-1588.0680,483.1240,261.3532,-1,-1); // nrg
AddVehicle(522,-2344.3682,-1586.5756,483.1768,268.7596,-1,-1); // nrg
AddVehicle(411,-2351.0313,-1646.0991,483.4389,289.8390,-1,-1); // infernus
AddOwnedVehicle("[LSF]Bardokas",541,-2352.8352,-1642.3555,483.3280,298.2635,-1,-1); // bullet
AddVehicle(415,-2356.0654,-1635.7482,483.4738,300.3745,-1,-1); // CHEETAH
AddVehicle(429,-2357.4485,-1631.7736,483.3695,295.7914,-1,-1); // banshee
AddVehicle(451,-2349.2407,-1650.3846,483.4222,306.4876,-1,-1); // turizmo
AddVehicle(443,-2237.0068,-1737.2463,481.2379,220.7824,-1,-1); // platforma

	AddVehicle(409,2183.3306,1284.6176,10.4719,359.4494,-1,-1); // Limuzinas
	AddVehicle(534,2050.4548,658.2238,11.0828,359.0530,-1,-1); //remington
	AddVehicle(534,1031.5043,1312.1294,10.6254,82.1259,-1,-1); // remington
	AddVehicle(496,1297.2450,2086.4702,10.6139,1.1270,-1,-1); // blista
	AddVehicle(565,1300.3475,2079.8284,10.6167,92.3299,-1,-1); // flash
	AddVehicle(480,1592.3600,2414.3665,10.6787,3.0386,-1,-1); // comet
	AddVehicle(470,2614.1221,2088.1245,10.6197,181.5439,-1,-1); // hammer
	AddVehicle(409,2533.0161,2017.7076,10.6199,270.3143,-1,-1); // limuzinas
	AddVehicle(480,1651.6434,997.8445,10.6203,356.4564,-1,-1); // kometa
	AddVehicle(535,-236.8657,2724.4944,62.3125,0.6337,-1,-1); // slamvan
	AddVehicle(468,-265.3507,2584.9651,63.1951,167.1554,-1,-1); // kalninukas
	AddVehicle(534,-784.0499,2756.2295,45.2715,89.5053,-1,-1); // remington
	AddVehicle(468,-1229.1267,2664.6995,46.4433,76.2443,-1,-1); // kalninukas
	AddVehicle(496,-1296.4766,2715.3474,49.6873,4.2354,-1,-1); // blista
	AddVehicle(565,-1476.4629,2569.2671,55.4142,271.7813,-1,-1); // flash
	AddVehicle(588,-1211.2632,1822.7249,41.3432,135.0826,-1,-1);  //HOTDOG uzkandine
	AddVehicle(470,-354.3861,828.9252,10.7667,84.4337,-1,-1); // hammer
	AddVehicle(411,-245.6658,1075.0242,19.3885,7.1279,-1,-1); // infernus
	AddVehicle(444,-2125.0847,655.1466,51.9415,95.6637,-1,-1); // monster
	AddVehicle(603,-2511.6274,768.7518,34.7378,268.6533,-1,-1); // phonex
	AddVehicle(534,2658.0935,-1797.1266,9.0265,91.3203,-1,-1); // remington
	AddVehicle(444,2486.7939,2356.4629,3.7611,267.2091,-1,-1); // monster

	AddNSVehicle(534,-1569.9265,133.7886,3.2343,128.7189,-1,-1); // lowrider
	AddNSVehicle(562,-1696.2788,77.3863,3.2317,313.5527,-1,-1); // ELEGY streetracing
	AddNSVehicle(506,-1527.8613,159.9268,3.2343,23.4721,-1,-1); // supergt

  
  AddStaticPickup(371, 15, 1710.3359,1614.3585,10.1191); //para
	AddStaticPickup(371, 15, 1964.4523,1917.0341,130.9375); //para
	AddStaticPickup(371, 15, 2055.7258,2395.8589,150.4766); //para
	AddStaticPickup(371, 15, 2265.0120,1672.3837,94.9219); //para
	AddStaticPickup(371, 15, 2265.9739,1623.4060,94.9219); //para
  AddStaticPickup(1240,2,-2431.6089,-1620.2612,526.5958); //Health
  AddStaticPickup(371,2,-2265.4424,-1685.5011,481.0506); //paraq
	AddStaticPickup(356,2,550.2371,-1858.3484,4.7079); // m42
	AddStaticPickup(346,2,579.5702,-1891.3461,3.6150); // pistols2
	AddStaticPickup(365,2,495.0881,-1872.6564,3.3116); // spray2
	AddStaticPickup(353,2,570.0380,-1880.6538,3.9044); // mp52
	AddStaticPickup(351,2,514.6313,-1891.6492,2.2767); //  shutgun2
	AddStaticPickup(350,2,532.2303,-1868.2079,4.0858); // sawnoff shutgun2
	AddStaticPickup(355,2,-1356.2096,494.2948,11.1953); // ak47
	AddStaticPickup(341,2,610.4505,-1876.4620,4.2990); // chainsaw2
	AddStaticPickup(353,2,471.0756,-1870.8080,3.2094); // mp52
	AddStaticPickup(356,2,493.8913,-1849.7648,4.1297); // m42
	AddStaticPickup(348,2,450.4014,-1859.9058,3.3861); // desert eagle2
	AddStaticPickup(366,2,556.7779,-1873.3772,4.0431); // fire ext2
	AddStaticPickup(1242,2,528.2418,-1813.0846,10.9022); // armor
	//DM Island
	//AddStaticPickup(1240,2,-1596.5753,1345.3271,-6.3362); // Armor
	//AddStaticPickup(1242,2,-1551.6080,1339.6099,-9.7224); //Health
	AddStaticPickup(365,2,-1619.5817,1333.2941,-2.7593); // Spray Paint
	AddStaticPickup(365,2,-1594.3213,1343.8146,-8.4081); // Spray Paint
	AddStaticPickup(351,2,-1589.1432,1339.1616,5.7525); //  Combat Shotgun
	AddStaticPickup(351,2,-1629.9326,1339.3047,7.0666); //  Combat Shotgun
	AddStaticPickup(351,2,-1618.3263,1342.6963,12.0653); //  Sawn Off Shotgun
	AddStaticPickup(351,2,-1616.9221,1342.7911,12.0066); //  Sawn Off Shotgun
	AddStaticPickup(351,2,-1616.5997,1341.4218,11.8438); //  Sawn Off Shotgun
	AddStaticPickup(351,2,-1618.5797,1341.3475,11.9534); //  Sawn Off Shotgun
	AddStaticPickup(351,2,-1617.8939,1342.1104,13.0061); //  Sawn Off Shotgun
	AddStaticPickup(355,2,-1633.8047,1330.7947,3.8661); //  AK47
	AddStaticPickup(355,2,-1561.6796,1334.0295,2.8); //  AK47
	AddStaticPickup(372,2,-1631.1848,1307.5442,9.8211); //  Tec9
	AddStaticPickup(372,2,-1601.0698,1307.8254,2.4205); //  Tec9
	AddStaticPickup(372,2,-1590.3508,1343.3831,4.3898); //  Tec9
	AddStaticPickup(353,2,-1575.6898,1342.9357,8.1046); //  MP5
	AddStaticPickup(353,2,-1632.3309,1338.3524,8.0283); //  MP5
	AddStaticPickup(352,2,-1591.8344,1328.6971,1.7263); //  Micro Uzi
	AddStaticPickup(352,2,-1612.5135,1342.9824,1.1825); //  Micro Uzi
	AddStaticPickup(352,2,-1638.8489,1321.7051,3.4839); //  Micro Uzi
	AddStaticPickup(352,2,-1613.0562,1328.7369,4.0168); //  Micro Uzi
	AddStaticPickup(352,2,-1600.8163,1333.6133,3.5883); //  Micro Uzi
	//roof
	AddStaticPickup(346,2,2066.3479,2427.2251,165.6172); //  Pistol
	AddStaticPickup(346,2,2050.5476,2440.5293,165.6172); //  Pistol

	SetTimer("HS_Areas_Update", 500, 1); 
	SetTimer("SecondUpdate", 1000, 1);
	SetTimer("UpdateSpeed", 1000, 1);
	SetTimer("AFKTimer",300000,1);
	LG_INIT_CODE
	return 1;
}

public OnGameModeExit(){
	return 1;
}

public OnPlayerRequestClass(playerid, classid){
	PlayerData[playerid][SPAWN] = 0;
	TelePlayer(playerid,-224.2861,1394.1476,172.4141);
	SetPlayerFacingAngle(playerid, 354.71);
	SetPlayerCameraPos(playerid,-223.1035,1400.0,177.0);
	SetPlayerCameraLookAt(playerid,-224.2861,1394.1476,172.4141);
	return 1;
}

public OnPlayerRequestSpawn(playerid){
	PlayerData[playerid][SPAWN] = 1;
	lockcars(playerid);
	return 1;
}

public OnPlayerConnect(playerid){
      new PName[MAX_PLAYER_NAME];
      new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid,PName,sizeof(PName));
        DSchool=fopen("DSchool",io_readwrite);
        if(strcmp(dini_Get("DSchool",PName),"Y",false)==0)
        {
            if(strlen(dini_Get("DSchool",PName))==1) // seems streams with no data also run through this part.
            {
                fclose(DSchool);
                }
                else // If there is no data present,
                {
                    Dschool_No(playerid); // Make some!
                }
        }
        else if(strcmp(dini_Get("DSchool",PName),"N",false)==0)
        {
            fclose(DSchool);
        }
        else if(strcmp(dini_Get("DSchool",PName),"D",false)==0)
        {
            fclose(DSchool);
        }
        else
        {
                Dschool_No(playerid);
        }

	zoneupdates[playerid] = 0;
	player_zone[playerid] = -1;
GetLangKey(playerid,"mess-connect");
	GetPlayerName(playerid, gPlayerName[playerid], MAX_PLAYER_NAME);
	if(dini_Isset(BAN_LIST,gPlayerName[playerid])){
		printf("  |--autokick (userban) > %s",gPlayerName[playerid]);
	 	SpawnPlayer(playerid);
		SendClientMessageToAll(COLOR_RED, "User is banned from this server.");
		Ban(playerid);
	}
	new File:fhandle2,temp2[256],clantag[256];
	temp2 = "";
	fhandle2 = fopen("clanban.txt",io_read);
	while(fread(fhandle2,temp2,sizeof(temp2),false)) {
		clantag = strrest(temp2,0);
	 	if(strcmp(firstchars(gPlayerName[playerid],strlen(clantag)),clantag,true) == 0) {
	 		printf("  |--autokick (clanban) > %s",gPlayerName[playerid]);
	 		SpawnPlayer(playerid);
		  SetKick(playerid,GetLangKey(playerid,"kick-clanban",1));
		  return 1;
		}
	}
	fclose(fhandle2);

	if(AdminSettings[serverloc] == 1) {
 		printf("  |--autokick (Server lock) > %s",gPlayerName[playerid]);
 		SpawnPlayer(playerid);
   	SetKick(playerid,GetLangKey(playerid,"kick-lock",1));
  }
	if(dini_Isset(ADMINS,gPlayerName[playerid])){
		IsAdmin[playerid] = 1;
	}else{
		IsAdmin[playerid] = 0;
	}
	SetLevel(playerid,0);
	PlayerData[playerid][SPAWN] = admin[playerid] = 0;
	GameTextForPlayer(playerid,"~w~GamesStrack.info:~n~~b~GST FreeRoam V0.2",5000,5);
	PlayerData[playerid][REGISTRED] = udb_Exists(gPlayerName[playerid]);
	if(PlayerData[playerid][REGISTRED]) {
		GetLangKey(playerid,"start-message");
		SetExp(playerid,dUserINT(gPlayerName[playerid]).("exp"));
		SetMoney(playerid,dUserINT(gPlayerName[playerid]).("money"));
		SetBank(playerid,dUserINT(gPlayerName[playerid]).("bank"));
		lang[playerid] = dUserINT(gPlayerName[playerid]).("language");
		specplayer[playerid][LEVEL] = dUserINT(gPlayerName[playerid]).("rpg-level");
		new housem = dUserINT(gPlayerName[playerid]).("have_house");
		if (housem != 0){
			SetHouseOwner(playerid,housem,2);
			PlayerData[playerid][HOUSE] = housem;
		}
	} else {
		for(new i = 0; i < MAX_SAVE; i++) {
	    if(isStringSame(savedNames[i], gPlayerName[playerid], MAX_PLAYER_NAME)) {
				SetMoney(playerid, savedInfo[i][0]);
				SetBank(playerid, savedInfo[i][1]);
				SetExp(playerid, savedInfo[i][2]);
				savedInfo[i][0]=savedInfo[i][1]=savedInfo[i][2]=savedNames[i][0]=0;
				SendClientMessage(playerid, COLOR_GREEN, "Your money has been restored.");
		}
	}
	GetLangKey(playerid,"not-register");
	lang[playerid] = 1;
	format(temp2,sizeof(temp2),GetLangKey(playerid,"playerconnect1",1),gPlayerName[playerid],AdminSettings[SERV_NAME]);
	SendClientMessage(playerid,COLOR_WHITE,temp2);
	}
	Gang_Reset(playerid);
	lockcars(playerid);
	       if(!PropertyExists("Timer")){
                PropertySet("Timer","On");
                SetTimer("SecTimer",1000,true);
                SetTimer("ClearHack",60000,true);
        }
        connect[playerid] = 0;
        if(hack > 5){
                hack = 0;
                Ban(playerid);

                GetPlayerName(playerid,playername,sizeof(playername));
                new tmpstr[64];
                format(tmpstr,sizeof(tmpstr),"[Anti-Flood] Banned: %s for flood hack",playername);
                print(tmpstr);
                SendClientMessageToAll(COLOR_RED,tmpstr);
        }
	LG_CONNECT_CODE
	return 1;
}

public OnPlayerDisconnect(playerid){
	zoneupdates[playerid] = 0;
	player_zone[playerid] = -1;
	if(specplayer[playerid][DMPLAYER] == 1)	LeavePlayerBattle(playerid,2);
	if(specplayer[playerid][DERBY] >= 1) LooseDerby(playerid, specplayer[playerid][DERBYCAR],2);
	if(specplayer[playerid][DRAGUSER] == 1)	resetdrag();
	if(gPlayerGang[playerid][PGANG_ID]!=-1) Gang_Leave(playerid, "");
	
	for (new p = 0; p < MAX_TYPES; p++)	{
		if(powers[playerid][p] != 0){
			powers[playerid][p] = 0;
		}
		if(specplayer[playerid][p] != 0){
			specplayer[playerid][p] = 0;
		}
	}		
	SetPlayerScore(playerid, 0);
	SavePlayerData(playerid,1);
	SetPlayerColor(playerid, playerColors[playerid]);
	gPlayerName[playerid][0] = forai[playerid] = specplayer[playerid][LEVEL] = PlayerData[playerid][MUTED] = PlayerData[playerid][AMMUD] = PlayerData[playerid][SPAWN] = cheatpoint[playerid] = 0;
	PlayerDisconect(playerid);
	HSPlayerDisconnect(playerid);
	        if(connect[playerid] < 3){
                hack++;}
	LG_DISCONNECT_CODE

	return 1;
}

public OnPlayerSpawn(playerid){	
	zoneupdates[playerid] = 1;
	player_zone[playerid] = -1;
	if(!zoneupdate) zoneupdate = SetTimer("update_zones",1000,4);
	new playername[MAX_PLAYERS];
	GetPlayerName(playerid, playername, sizeof(playername));
	if(logged[playerid] == 0){
		if (PlayerData[playerid][REGISTRED] == 1) {
			Ikalintas[playerid] = 1;
			GameTextForPlayer(playerid,GetLangKey(playerid,"first-login",1),20000,4);
			GetLangKey(playerid,"need-login");
		}
		if(IsAdmin[playerid] == 1){
			GetLangKey(-1,"kick-forgotlogin");
			data[playerid][KICK] = 1;
			SetTimer("KickPlayers",500,0);
		}
	}
	if(Ikalintas[playerid] == 1){
		JailPlayer(playerid);
	}
	if(specplayer[playerid][DMPLAYER] == 1){
		new zone = server_data[DMZONE];
		ResetPlayerWeapons(playerid);
		SetPlayerInterior(playerid,dmzonos[zone][INTERIOR]);
		SetPlayerWorldBounds(playerid,dmzonos[zone][ZONE_MAX_X],dmzonos[zone][ZONE_MIN_X],dmzonos[zone][ZONE_MAX_Y],dmzonos[zone][ZONE_MIN_Y]);
		if (dmzonos[zone][TEAMS] == 2){
			switch (bteam[playerid]){
				case 1:TelePlayer(playerid, dmzonos[zone][TM_ONE_X], dmzonos[zone][TM_ONE_Y], dmzonos[zone][TM_ONE_Z]);
				case 2:TelePlayer(playerid, dmzonos[zone][TM_TWO_X], dmzonos[zone][TM_TWO_Y], dmzonos[zone][TM_TWO_Z]);
			}
		}else {
			TelePlayer(playerid, dmzonos[zone][TM_ONE_X], dmzonos[zone][TM_ONE_Y], dmzonos[zone][TM_ONE_Z]);
		}
	if(dmzonos[zone][SPECIAL] == 1){GivePlayerWeapon(playerid,server_data[DMWEP],1);
	}else if(dmzonos[zone][SPECIAL] == 2){
		if(dmzonos[zone][DMGUNS][1] != -1){GivePlayerWeapon(playerid,dmzonos[zone][DMGUNS][1],1500);}
		if(dmzonos[zone][DMGUNS][2] != -1){GivePlayerWeapon(playerid,dmzonos[zone][DMGUNS][2],1500);}
		if(dmzonos[zone][DMGUNS][3] != -1){GivePlayerWeapon(playerid,dmzonos[zone][DMGUNS][3],1500);}
		if(dmzonos[zone][DMGUNS][4] != -1){GivePlayerWeapon(playerid,dmzonos[zone][DMGUNS][4],1500);}
		if(dmzonos[zone][DMGUNS][0] != -1){GivePlayerWeapon(playerid,dmzonos[zone][DMGUNS][0],1);}
	}
	}else{
		if (LocX[playerid][Power] == 0.0 && Ikalintas[playerid] != 1){
			if(PlayerData[playerid][HOUSE] == 0 || PlayerData[playerid][HOUSE] == -1){
			SetPlayerInterior(playerid,0);
			SetPlayerRandomSpawn(playerid);
			}else{TeleportToHouse(playerid,PlayerData[playerid][HOUSE]);}
		}else if(LocX[playerid][Power] != 0.0){
			teleport(playerid, LocX[playerid][Power], LocY[playerid][Power], LocZ[playerid][Power],0,Ang[playerid][Power]);
			LocX[playerid][Power] = LocY[playerid][Power] = LocZ[playerid][Power] = Ang[playerid][Power] = 0.0;
		}
	}
	
	if (GetMoney(playerid) <= 0) {
		SetMoney(playerid,PocketMoney);
	}
	new Float:x,Float:y,Float:z;
	for(new i=0; i<MAX_VEHICLES; i++){
		GetVehiclePos(i,x,y,z);
		if(x != 0 && y != 0 && z != 0){
			vspawnx[i] = floatround(x);
			vspawny[i] = floatround(y);
			vspawnz[i] = floatround(z);
			maxvehicles++;
		}
	}
	PlayerData[playerid][SPAWN] = 1;
	voidplayer[playerid] = 10;
	LG_SPAWN_CODE
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason){
        if(killerid != INVALID_PLAYER_ID && IsPlayerConnected(killerid)) {
                if((IsPlayerInAnyVehicle(killerid))&&(reason==WEAPON_MP5||reason==WEAPON_UZI||reason==WEAPON_TEC9)&&(!(IsPlayerInAnyVehicle(playerid))))
                {
                new string[256];
                new killer[MAX_PLAYER_NAME];
                GetPlayerName(killerid, killer, sizeof(killer));

                GameTextForPlayer(killerid,"You have Drive-by Killed!~n~ ~r~You Will be jailed!",6000, 5);

                format (string, sizeof(string), "You have been Drive-by killed by %s", killer);
                GameTextForPlayer(playerid, string, 6000, 5);

                SetPlayerInterior(killerid,3);
                SetPlayerPos(killerid,198.3797,160.8905,1003.0300);
                SetPlayerFacingAngle(killerid,177.0350);
                SetCameraBehindPlayer(killerid);
                PlayerPlaySound(killerid,1082,198.3797,160.8905,1003.0300);
                TogglePlayerControllable(killerid,0);
                DisablePlayerCheckpoint(killerid);

                SendClientMessage(killerid, COLOR_RED,"ãøééá áéé àñåø áäçìè ,äåëðñú ìëìà!!");
                SendClientMessage(killerid, COLOR_RED,"úùåçøø îäëìà ëùäîùèøä/äàãîéðéí éçìéèå.");

                }
        }

        GameTextForPlayer(playerid, "~r~HAHA, Life Hated you!!", 5000, 5);

        if (killerid == INVALID_PLAYER_ID)
        {
                SendDeathMessage(INVALID_PLAYER_ID, playerid, reason);
        }
        else if (gTeam[killerid] != gTeam[playerid])
        {
                // Valid kill
                SendDeathMessage(killerid, playerid, reason);
                SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
        }
        else
        {
                // Team kill
                SendDeathMessage(killerid, playerid, reason);
        }
	zoneupdates[playerid] = 0;
	player_zone[playerid] = -1;
	if (specplayer[playerid][DERBY] == 3 || specplayer[playerid][DERBY] == 2){
		LooseDerby(playerid, specplayer[playerid][DERBYCAR],1);	
	}
	if(killerid == INVALID_PLAYER_ID){
		SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
		dUserSetINT(gPlayerName[playerid]).("suicide",dUserINT(gPlayerName[playerid]).("suicide")+1);
	}else{
		DeadExp(playerid,killerid);
		
		SendDeathMessage(killerid,playerid,reason);
		
		dUserSetINT(gPlayerName[killerid]).("murders",dUserINT(gPlayerName[killerid]).("murders")+1);
		dUserSetINT(gPlayerName[playerid]).("deaths",dUserINT(gPlayerName[playerid]).("deaths")+1);
		
		if (specplayer[killerid][DMPLAYER] == 1){
			if(dmzonos[server_data[DMZONE]][TEAMS] == 2 && bteam[playerid] == bteam[killerid]){
				ResetPlayerWeapons(killerid);	
				SetPlayerHealth(killerid,10.0);
				GetLangKey(killerid,"team-killer");
			}else{
				PlayerData[killerid][DMKILL]++;
			}
		}
		if (powers[playerid][TELEPORT_DP] >= 1 && freeuser(playerid) == 1){
			GetPlayerPos(playerid,LocX[playerid][Power], LocY[playerid][Power], LocZ[playerid][Power]);
			if (LocZ[playerid][Power] < 800){
				GetPlayerFacingAngle(playerid,Ang[playerid][Power]);
				powers[playerid][TELEPORT_DP]--;
			}else {	LocX[playerid][Power] = LocY[playerid][Power] = LocZ[playerid][Power] = 0.0;	}			
		}
		new playercash = GetMoney(playerid);
		if(playercash > 0)  {
			GiveMoney(killerid, playercash / 4);
		}
		ResetMoney(playerid);
	}	
	PlayerData[playerid][AMMUD] = 0;
	PlayerData[playerid][SPAWN] = 0;
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	printf("OnVehicleSpawn Car id:%d",vehicleid);
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	printf("OnVehicleDeath Carid:%d Playerid:%d",vehicleid,killerid);
	return 1;
}

public OnPlayerText(playerid, text[]) {
	if(PlayerData[playerid][MUTED] == 1){SendClientMessage(playerid, COLOR_GREY,"Disconnected from Chat Service"); return 0;}
	if(text[0] == '@'){  Admins_Chat(playerid, text,2);	return 0;}
	new string[MAX_STRING];
	if(text[0]=='!') {
		if(gPlayerGang[playerid][PGANG_ID]!=-1) {
			format(string, MAX_STRING, "%s: %s", gPlayerName[playerid], text[1]);
			printf(string);
			for(new i=0; i<gGangs[gPlayerGang[playerid][PGANG_ID]][GANG_TOTALMEMBERS]; i++) {
				if(IsPlayerConnected(gGangs[gPlayerGang[playerid][PGANG_ID]][GANG_MEMBERS][i])) {
					SendClientMessage(gGangs[gPlayerGang[playerid][PGANG_ID]][GANG_MEMBERS][i], COLOR_LIGHTBLUE, string);
				}
			}
		}
		return 0;
	}
	return 1;
}

public OnPlayerPrivmsg(playerid, senderid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[]){
if (!IsPlayerConnected(playerid)){return 1;}
		new cmd[256], string[256], idx;
		cmd = strtok(cmdtext, idx);
	if(cmdtext[1] == '/' && AdminSettings[CL_acwrite] != -1 && AdminSettings[CL_acread] != -1){	Admins_Chat(playerid, cmdtext,1);	return 1;}
	if(strcmp(cmd, "/sthp", true) == 0) {
			new tmp[256],id;
			tmp = strtok(cmdtext, idx);
			if(NameLookup(playerid,tmp,id,1) != 1) return 1;
			new Float:health,text[256];
			text = strtok(cmdtext, idx);
			health = floatstr(text);
			SetPlayerHealth(id,health);
			format(text,sizeof text,"%s New Health %f",PlayerName(id),health);
			SendClientMessage(playerid, COLOR_RED, text);
			return 1;
		}
		
		
		//new cmd[256];
//new idx;
	new smb = 0;

//	cmd = strtok(cmdtext, idx);

    for (new i = 0, j = strlen(cmdtext); i < j; i++)
    {
    if (cmdtext[i] == ' ')
		{
		smb = i;
		break;
		}
	}
	new xstring[256];
	if (smb != 0)
	strmid(xstring, cmdtext, 1, smb);
	else strmid(xstring, cmdtext, 1, strlen(cmdtext));

	if (IsStrLegal(xstring)) {return 0;}
	else
	{
	new xname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, xname, MAX_PLAYER_NAME);
	printf("%s used illegal command:  %s", xname, xstring);
	SendClientMessage(playerid, 0xFF1493, "áô÷åãåú îåøùåú àê åø÷ äñéîðéí äáàéí:[A-Z], [a-z], [0-9]");
	return 1;
	}
	new tmp[256];
	new name[256];
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
    new giveplayerid;
	cmd = strtok(cmdtext, idx);


   cmd = strtok(cmdtext, idx);

        //=======================================
        // Suspend a Licence.
        //=======================================

        if(strcmp(cmd,"/l-suspend",true)==0)
        {
                new tracedID;
                new tracedIDName[MAX_PLAYER_NAME];
                new PName[MAX_PLAYER_NAME];

                tmp = strtok(cmdtext, idx);
                if(strlen(tmp)==0)
                {
                        SendClientMessage(playerid, 0xFF000000, "USAGE: /l-suspend (playerid)");
                        return 1;
                }
                tracedID = strval(tmp);

                if(tracedID!=INVALID_PLAYER_ID)
                {
                        if(IsPlayerConnected(tracedID))
                        {
                                GetPlayerName(tracedID, tracedIDName, sizeof(tracedIDName));
                                GetPlayerName(playerid, PName, sizeof(PName));
                                DSchool=fopen("DSchool",io_readwrite);
                                if(strcmp(dini_Get("DSchool",tracedIDName),"Y",true)==0)
                                {
                                        format(string, sizeof(string), "%s (ID:%d) has had their licence suspended.",tracedIDName,tracedID);
                                        printf("%s (ID:%d) has been licence suspended.",tracedIDName,tracedID);
                                        SendClientMessage(playerid,0xFF000000,string);
                                        format(string, sizeof(string), "%s (ID:%d) has had their licence suspended by %s (ID:%d).",tracedIDName,tracedID,PName,playerid);
                                        SendClientMessageToAll(0xFF800000,string);
                                        Dschool_Dis(tracedID);
                                        fclose(DSchool);
                                        return 1;
                                }
                                else if(strcmp(dini_Get("DSchool",tracedIDName),"N",true)==0)
                                {
                                        format(string, sizeof(string), "%s (ID:%d) have a licence to suspend!",tracedIDName,tracedID);
                                        SendClientMessage(playerid,0xFF000000,string);
                                        printf("%s (ID:%d) is being licence suspended, but doesn't have a licence.",tracedIDName,tracedID);
                                        fclose(DSchool);
                                        return 1;
                                }
                                else if(strcmp(dini_Get("DSchool",tracedIDName),"D",true)==0)
                                {
                                        format(string, sizeof(string), "%s (ID:%d) is already disqualified from driving.",tracedIDName,tracedID);
                                        SendClientMessage(playerid,0xFF000000,string);
                                        printf("%s (ID:%d) is being licence suspended, but the licence is already suspended.",tracedIDName,tracedID);
                                        fclose(DSchool);
                                        return 1;
                                }
                                else
                                {
                                        SendClientMessage(playerid,0xFF000000,"Error: Unable to establish licence status.");
                                        fclose(DSchool);
                                        return 1;
                                }
                        }
                        else
                        {
                                SendClientMessage(playerid,0xFF000000,"That player is not in the server.");
                        }
                }
                else
                {
                    SendClientMessage(playerid,0xFF000000,"You have specified an invalid Player ID.");
                }
                return 1;
        }

        //=======================================
        // Renew a Licence.
        //=======================================

        if(strcmp(cmd,"/l-renew",true)==0)
        {
                new tracedID;
                new tracedIDName[MAX_PLAYER_NAME];
                new PName[MAX_PLAYER_NAME];

                tmp = strtok(cmdtext, idx);
                if(strlen(tmp)==0)
                {
                        SendClientMessage(playerid, 0xFF000000, "USAGE: /l-renew (playerid)");
                        return 1;
                }
                tracedID = strval(tmp);

                if(tracedID!=INVALID_PLAYER_ID)
                {
                        if(IsPlayerConnected(tracedID))
                        {
                                GetPlayerName(tracedID, tracedIDName, sizeof(tracedIDName));
                                GetPlayerName(playerid, PName, sizeof(PName));
                                DSchool=fopen("DSchool",io_readwrite);
                                if(strcmp(dini_Get("DSchool",tracedIDName),"D",true)==0)
                                {
                                        format(string, sizeof(string), "%s (ID:%d) has had their licence renewed.",tracedIDName,tracedID);
                                        SendClientMessage(playerid,0xFF000000,string);
                                        printf("%s (ID:%d) is being licence suspended, but the licence is already suspended.",tracedIDName,tracedID);
                                        format(string, sizeof(string), "%s (ID:%d) has had their licence suspended by %s (ID:%d).",tracedIDName,tracedID,PName,playerid);
                                        SendClientMessageToAll(0xFF800000,string);
                                        Dschool_Yes(tracedID);
                                        fclose(DSchool);
                                        return 1;
                                }
                                else
                                {
                                        SendClientMessage(playerid,0xFF000000,"Error: Unable to establish licence status.");
                                        fclose(DSchool);
                                        return 1;
                                }
                        }
                        else
                        {
                                SendClientMessage(playerid,0xFF000000,"That player is not in the server.");
                        }
                }
                else
                {
                    SendClientMessage(playerid,0xFF000000,"You have specified an invalid Player ID.");
                }
                return 1;
        }

        //=======================================
        // Go to Driving School.
        //=======================================

        if (strcmp(cmdtext, "/dschool", true)==0)
        {
                new tracedIDName[MAX_PLAYER_NAME];
                new strn[255];
                if(DriverTakingTest==-1)
                {
                        if(GetPlayerMoney(playerid)>=500)
                        {
                                GetPlayerName(playerid,tracedIDName,sizeof(tracedIDName));
                                if(strcmp(dini_Get("DSchool",tracedIDName),"Y",true)==0)
                                {
                                        SendClientMessage(playerid, 0xFF000000, "Error: You already have a valid licence!");
                                        return 1;
                                }
                                DriverTakingTest=playerid;
                                GivePlayerMoney(playerid,-500);
                                SetPlayerCheckpoint(playerid,CPDSchoolData[0][0],CPDSchoolData[0][1],CPDSchoolData[0][2],CPDSchoolData[0][3]);
                                DSCP[playerid]=0;
                                SetPlayerPos(playerid,-2077.3,-81.4,34.8);
                                SendClientMessage(playerid, 0xFF000000, "You are now on the Driving School program. Drive safe, yet speedy.");
                                return 1;
                        }
                        else
                        {
                                SendClientMessage(playerid, 0xFF000000, "Error: Insufficient funds to take the test.");
                                return 1;
                        }
                }
        else
        {
                        GetPlayerName(DriverTakingTest,tracedIDName,sizeof(tracedIDName));
                        format(strn, sizeof(strn), "%s(ID:%d) is currently taking the Driving School Test. Try again later.",tracedIDName,DriverTakingTest);
                        SendClientMessage(playerid, 0xFF000000, strn);
                        return 1;
        }
        }

        //=======================================
        // Licence Checker.
        //=======================================

        if(strcmp(cmd,"/licence",true)==0)
        {
                new tracedID;
                new tracedIDName[MAX_PLAYER_NAME];

                tmp = strtok(cmdtext, idx);
                if(strlen(tmp)==0)
                {
                        SendClientMessage(playerid, 0xFF000000, "USAGE: /licence (playerid)");
                        return 1;
                }
                tracedID = strval(tmp);

                if(tracedID!=INVALID_PLAYER_ID)
                {
                        if(IsPlayerConnected(tracedID))
                        {
                                GetPlayerName(tracedID, tracedIDName, sizeof(tracedIDName));
                                DSchool=fopen("DSchool",io_readwrite);
                                if(strcmp(dini_Get("DSchool",tracedIDName),"Y",true)==0)
                                {
                                        format(string, sizeof(string), "%s (ID:%d) has a valid drivers licence.",tracedIDName,tracedID);
                                        printf("%s (ID:%d) has been licence checked. Status: Clean licence.",tracedIDName,tracedID);
                                        SendClientMessage(playerid,0xFF000000,string);
                                        fclose(DSchool);
                                        return 1;
                                }
                                else if(strcmp(dini_Get("DSchool",tracedIDName),"N",true)==0)
                                {
                                        format(string, sizeof(string), "%s (ID:%d) doesn't carry a drivers licence.",tracedIDName,tracedID);
                                        SendClientMessage(playerid,0xFF000000,string);
                                        SendClientMessage(playerid,0xFF000000,"COA: Jail them, or send them to driving school.");
                                        printf("%s (ID:%d) has been licence checked. Status: No licence.",tracedIDName,tracedID);
                                        fclose(DSchool);
                                        return 1;
                                }
                                else if(strcmp(dini_Get("DSchool",tracedIDName),"D",true)==0)
                                {
                                        format(string, sizeof(string), "%s (ID:%d) has been disqualified from driving.",tracedIDName,tracedID);
                                        SendClientMessage(playerid,0xFF000000,string);
                                        SendClientMessage(playerid,0xFF000000,"COA: Jail them, at reasonable cost.");
                                        printf("%s (ID:%d) has been licence checked. Status: Disqualified licence.",tracedIDName,tracedID);
                                        fclose(DSchool);
                                        return 1;
                                }
                                else
                                {
                                        SendClientMessage(playerid,0xFF000000,"Error: Unable to establish licence status.");
                                        fclose(DSchool);
                                        return 1;
                                }
                        }
                        else
                        {
                                SendClientMessage(playerid,0xFF000000,"That player is not in the server.");
                        }
                }
                else
                {
                    SendClientMessage(playerid,0xFF000000,"You have specified an invalid Player ID.");
                }
                return 1;
        }
//Fisrt the Police Cmds And Pass:

if(strcmp(cmd, "/jobs", true) == 0) {
                    SendClientMessage(playerid,COLOR_GREEN,".:JOBS HELP:.");
                    SendClientMessage(playerid,COLOR_GREY,"** /jobcop - be a cop.");
                    SendClientMessage(playerid,COLOR_GREY,"** /jobtaxi - be a taxi driver.");
                    SendClientMessage(playerid,COLOR_GREY,"** /jobbistro - be a bistro.");
                    SendClientMessage(playerid,COLOR_GREY,"** /jobpilot - be a pilot.");
	return 1;
	}

if(strcmp(cmd, "/jobcop", true) == 0) { // makes tha players name blue, give you a Deagle and a nightstick
		SendClientMessage(playerid, COLOR_RED1, "You Are logged into cops!! You have a deagle And A nightstick!!");
        SendClientMessage(playerid, COLOR_RED1, "Your Cmd's Are: /pu /jail /unjail, /polheli and /cophq");
        SendClientMessage(playerid, COLOR_RED1, "SKINS: /cop1 /cop2 /cop3 /cop4");
		gTeam[playerid] = TEAM_COP;
		SetPlayerColor(playerid, COLOR_BLUE);
		SetPlayerPos(playerid, 2295.0293,2459.4961,10.8203);
		GivePlayerWeapon(playerid, 24, 400);
        GivePlayerWeapon(playerid, 3, 1);

		SetPlayerSkin(playerid, 280);
	return 1;
	}


if(strcmp(cmd, "/polheli", true) == 0) { // goes to the LVPD roof wich is a good place for helis
    if(gTeam[playerid] == TEAM_COP)
	{
	SetPlayerPos(playerid, 2282.6584,2449.6414,46.9775);
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED1, "You Are NOT official Police!!");
	}
	return 1;
	}



	if(strcmp(cmd, "/cophq", true) == 0) { // teles the cop back to the LVPD spawn!
    if(gTeam[playerid] == TEAM_COP)
	{
	SetPlayerInterior(playerid, 0);
	SetPlayerPos(playerid, 2295.0293,2459.4961,10.8203);
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED1, "You Are NOT an official Cop!!");
	}
	return 1;
	}



if(strcmp(cmd, "/jail", true) == 0) { // jails a specified player!

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        SendClientMessage(playerid, COLOR_GREEN, "Usage: /jail [Player ID]");
                        return 1;
                }
        giveplayerid = strval(tmp);

        if (gTeam[playerid] == TEAM_COP) {
            if (IsPlayerConnected(giveplayerid)) {
                      GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                                format(string, sizeof(string), "You have been jailed by Cop %s!", sendername, playerid);
                                SendClientMessage(giveplayerid, COLOR_RED1, string);
                                format(string, sizeof(string), "%s (ID:%d) has been jailed by Cop %s!", giveplayer, giveplayerid, sendername, playerid);
                                SendClientMessageToAll(COLOR_RED1, string);
                                printf(string);
                                SetPlayerInterior(giveplayerid,3);
                                SetPlayerPos(giveplayerid,198.3797,160.8905,1003.0300);
                                SetPlayerFacingAngle(giveplayerid,177.0350);
                                SetCameraBehindPlayer(giveplayerid);
                                PlayerPlaySound(giveplayerid,1082,198.3797,160.8905,1003.0300);
                                TogglePlayerControllable(giveplayerid,0);   // so that can't /kill
                                DisablePlayerCheckpoint(giveplayerid);
                                return 1;
                                        }else{
        format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
                                SendClientMessage(playerid, COLOR_YELLOW, string);
}
                }else{
        format(string, sizeof(string), "You Are Not official Police!!", giveplayerid);
                                SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}
if(strcmp(cmd, "/unjail", true) == 0) { //unjails the specified player

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        SendClientMessage(playerid, COLOR_GREEN, "Usage: /jail [Player ID]");
                        return 1;
                }
        giveplayerid = strval(tmp);

        if (gTeam[playerid] == TEAM_COP) {
            if (IsPlayerConnected(giveplayerid)) {
                      GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                                format(string, sizeof(string), "You have been unjailed by %s (ID:%d)!", sendername, playerid);
                                SendClientMessage(giveplayerid, COLOR_GREEN, string);
                                format(string, sizeof(string), "%s (ID:%d) has been unjailed by %s (ID:%d)", giveplayer, giveplayerid, sendername, playerid);
                                SendClientMessageToAll(COLOR_GREEN, string);
                                printf(string);
                                SetPlayerInterior(giveplayerid,0);
                                SetPlayerFacingAngle(giveplayerid,90.00);
                                SetPlayerPos(giveplayerid,2296.4031,2468.7754,10.8203);
                                SetPlayerFacingAngle(giveplayerid,177.0350);
                                SetCameraBehindPlayer(giveplayerid);
                                TogglePlayerControllable(giveplayerid,1);
                                return 1;
                                        }else{
        format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
                                SendClientMessage(playerid, COLOR_YELLOW, string);
}
                }else{
        format(string, sizeof(string), "You Are not official Police!!", giveplayerid);
                                SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}

if(strcmp(cmd, "/cop1", true) == 0) { //cop skin
if (gTeam[playerid] == TEAM_COP) {
SetPlayerSkin(playerid, 280);
}else{
SendClientMessage(playerid, COLOR_RED, "You are not official police!!");
}
return 1;
}
if(strcmp(cmd, "/cop2", true) == 0) { //cop skin
if (gTeam[playerid] == TEAM_COP) {
SetPlayerSkin(playerid, 284);
}else{
SendClientMessage(playerid, COLOR_RED, "You are not official police!!");
}

return 1;
}
if(strcmp(cmd, "/cop3", true) == 0) { //cop skin
if (gTeam[playerid] == TEAM_COP) {
SetPlayerSkin(playerid, 281);
}else{
SendClientMessage(playerid, COLOR_RED, "You are not official police!!");
}

return 1;
}
if(strcmp(cmd, "/cop4", true) == 0) { //cop skin
if (gTeam[playerid] == TEAM_COP) {
SetPlayerSkin(playerid, 282);
}else{
SendClientMessage(playerid, COLOR_RED, "You are not official police!!");
}

return 1;
}

	if(strcmp(cmd, "/pu", true) == 0) { //Displays the text: "This is the LVPD, Pullover Immedietly" to all players
	if(gTeam[playerid] == TEAM_COP)
	{
	SendClientMessageToAll(COLOR_BLUE, "This Is The LVPD, Pullover Immediately!!");
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED1, "You Are NOT official Police!!");
	}


	return 1;
	}

//Now for the Taxi/limo Service

if(strcmp(cmd, "/jobtaxi", true) == 0) { //makes the players name yellow tells people the buisness is open and teles you to the HQ
    SendClientMessage(playerid, COLOR_RED, "You are logged into The Taxi/Limo service!!");
    SetPlayerColor(playerid, COLOR_YELLOW);
    SendClientMessage(playerid, COLOR_RED, "Your Cmd's Are: /pick-up and /location");
    GameTextForAll("The Taxi And Limo Service is open!!",6000,4);
	SetPlayerPos(playerid, 1099.3607,-1221.0271,17.8047);
	SetPlayerSkin(playerid, 255);
    gTeam[playerid] = TEAM_TAXI;
	return 1;
	}

    if(strcmp(cmd, "/pick-up", true) == 0) {// Displays the text: "Type /taxi or /limo to be Transported In style!"
    if (gTeam[playerid] == TEAM_TAXI) {
	SendClientMessageToAll(COLOR_YELLOW, "Type /taxi or /limo to be Transported In style!");
	}else{
	SendClientMessage(playerid, COLOR_RED, "You are Not an official Taxi Driver!!");
 	}
	return 1;
	}



	if(strcmp(cmd, "/location", true) == 0) {// Displays the text: "What Is your current location?"
    if (gTeam[playerid] == TEAM_TAXI) {
	SendClientMessageToAll(COLOR_YELLOW, "What Is your current location?");
	}else{
	SendClientMessage(playerid, COLOR_RED, "You are Not an official Taxi Driver!!");
 	}

	return 1;
	}

if(strcmp(cmd, "/taxi", true) == 0) { // says: "[PLAYERID] Needs a taxi"
 	GetPlayerName(playerid,name,sizeof(name));
	format(string,sizeof(string),"%s Needs a taxi!!",name);
	SendClientMessageToAll(COLOR_YELLOW, string);

return 1;
}

if(strcmp(cmd, "/limo", true) == 0) { // says: "[PLAYERID] Needs a Limo"
						GetPlayerName(playerid,name,sizeof(name));
	format(string,sizeof(string),"%s Needs a Limo!!",name);
	SendClientMessageToAll(COLOR_YELLOW, string);


return 1;
}

//Start of Bistro System!




if(strcmp(cmd, "/jobbistro", true) == 0) { //doesnt change your name color, teles you to saint marks bistro (liberty city)
	gTeam[playerid] = TEAM_BISTRO;
	SetPlayerInterior(playerid, 1);
    SetPlayerFacingAngle(playerid, 359);
 	SetPlayerPos(playerid, -782.8555,498.3182,1371.7422);
   	SendClientMessage(playerid, COLOR_YELLOW, "You have logged into the bistro!!");
    SendClientMessage(playerid, COLOR_YELLOW, "Your Cmd's Are /givecake[playerid] and /givesandwich[playerid]");
	SetPlayerSkin(playerid, 240);
	return 1;
	}

if(strcmp(cmd, "/givecake", true) == 0) { // Gives a cake to the desired person!(Fills there health!)

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        SendClientMessage(playerid, COLOR_YELLOW, "Usage: /givecake [Player ID]");
                        return 1;
                }
        giveplayerid = strval(tmp);

    if (IsPlayerConnected(giveplayerid)) {
        if (gTeam[playerid] == TEAM_BISTRO) {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                            SetPlayerHealth(giveplayerid, 100);
                            GivePlayerMoney(playerid, 100);
                            GivePlayerMoney(giveplayerid, -100);
								format(string, sizeof(string), "You have been given a cake by %s ", sendername, playerid);
                                SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                                format(string, sizeof(string), "%s has been given a cake!!!", giveplayer, giveplayerid, sendername, playerid);
                                SendClientMessageToAll(COLOR_YELLOW, string);
                                printf(string);
                    return 1;
           }else{
                SendClientMessage(playerid, COLOR_RED1, "You Are not official Bistro staff!!!");
}
                        }else{
        format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
                                SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}
if(strcmp(cmd, "/givesandwich", true) == 0) { // Gives a sandwich to the desired person!(Fills there health!)

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        SendClientMessage(playerid, COLOR_YELLOW, "Usage: /givesandwich [Player ID]");
                        return 1;
                }
        giveplayerid = strval(tmp);

    if (IsPlayerConnected(giveplayerid)) {
        if (gTeam[playerid] == TEAM_BISTRO) {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                            SetPlayerHealth(giveplayerid, 100);
                            GivePlayerMoney(playerid, 100);
                            GivePlayerMoney(giveplayerid, -100);
								format(string, sizeof(string), "You have been given a Sandwich by %s ", sendername, playerid);
                                SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                                format(string, sizeof(string), "%s has been given a Sandwich!!!", giveplayer, giveplayerid, sendername, playerid);
                                SendClientMessageToAll(COLOR_YELLOW, string);
                                printf(string);
                    return 1;
           }else{
                SendClientMessage(playerid, COLOR_RED1, "You Are not official Bistro staff!!!");
}
                        }else{
        format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
                                SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}

if(strcmp(cmd, "/cake", true) == 0) { // Displays the Text: "[PLAYEID] would like a Cake please!"
					GetPlayerName(playerid,name,sizeof(name));
	format(string,sizeof(string),"%s would like a Cake please!",name);
	SendClientMessageToAll(COLOR_YELLOW, string);




return 1;
}
if(strcmp(cmd, "/sandwich", true) == 0) { // Displays the Text: "[PLAYEID] would like a Sandwich please!"
		 GetPlayerName(playerid,name,sizeof(name));
	format(string,sizeof(string),"%s would like a sandwich please!",name);
	SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}

if(strcmp(cmd, "/bistro", true) == 0) { //Teles you to the bistro and tells you to type /menu
	SetPlayerInterior(playerid, 1);
	SetPlayerFacingAngle(playerid, 270);
 	SetPlayerPos(playerid, -780.7914, 494.8177, 1376.195);
    GameTextForPlayer(playerid,"~W~Welcome To The Liberty Bistro!!!",6000,5);
	SendClientMessage(playerid, COLOR_YELLOW, "Type /menu to see todays selection!!");
	return 1;
	}

if(strcmp(cmd, "/menu", true) == 0) { //Tells you what you can eat!
	SendClientMessage(playerid, COLOR_YELLOW, "Todays menu: /Cake($100) and A /Sandwich($100)!!");
	return 1;
	}

if(strcmp(cmd, "/bistrohq", true) == 0) { //Teles a bistro worker to the bistro!
    if(gTeam[playerid] == TEAM_PILOT)
	{
	SetPlayerInterior(playerid, 1);
	SetPlayerFacingAngle(playerid, 359);
 	SetPlayerPos(playerid, -782.8555,498.3182,1371.7422);
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED1, "You Are NOT official Bistro Staff!!");
	}
	return 1;
	}

if(strcmp(cmd, "/hostage", true) == 0) { // Holds the desired person hostage in the Garden of the bistro

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        SendClientMessage(playerid, COLOR_GREEN, "Usage: /hostage [Player ID]");
                        return 1;
                }
        giveplayerid = strval(tmp);

        if (gTeam[playerid] == TEAM_BISTRO) {
            if (IsPlayerConnected(giveplayerid)) {
                      GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                            format(string, sizeof(string), "You are keeping this person hostage: %s (ID:%d)", giveplayer, giveplayerid);
                                SendClientMessage(playerid, COLOR_GREEN, string);
                                format(string, sizeof(string), "You are being held hostage by %s (ID:%d)!", sendername, playerid);
                                SendClientMessage(giveplayerid, COLOR_RED1, string);
                                format(string, sizeof(string), "%s (ID:%d) is being held hostage by %s (ID:%d)", giveplayer, giveplayerid, sendername, playerid);
                                SendClientMessageToAll(COLOR_GREEN, string);
                                printf(string);
                                SetPlayerInterior(giveplayerid,1);
                                SetPlayerPos(giveplayerid,-839.3268,529.0875,1357.1016);
                                SetPlayerFacingAngle(giveplayerid,177.0350);
                                SetCameraBehindPlayer(giveplayerid);
                                PlayerPlaySound(giveplayerid,1082,198.3797,160.8905,1003.0300);
                                TogglePlayerControllable(giveplayerid,0);   // sp that can't /kill
                                DisablePlayerCheckpoint(giveplayerid);
								return 1;
                                        }else{
        format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
                                SendClientMessage(playerid, COLOR_YELLOW, string);
}
                }else{
        format(string, sizeof(string), "You Are Not official Bistro ~~staff!!!", giveplayerid);
                                SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}
if(strcmp(cmd, "/unhostage", true) == 0) { //Releases the person from being held hostage!!

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        SendClientMessage(playerid, COLOR_GREEN, "Usage: /unhostage [Player ID]");
                        return 1;
                }
        giveplayerid = strval(tmp);

        if (gTeam[playerid] == TEAM_BISTRO) {
            if (IsPlayerConnected(giveplayerid)) {
                      GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                            format(string, sizeof(string), "You have released %s (ID:%d)", giveplayer, giveplayerid);
                                SendClientMessage(playerid, COLOR_GREEN, string);
                                format(string, sizeof(string), "You have been released by %s (ID:%d)!", sendername, playerid);
                                SendClientMessage(giveplayerid, COLOR_GREEN, string);
                                format(string, sizeof(string), "%s (ID:%d) has been released by %s (ID:%d)", giveplayer, giveplayerid, sendername, playerid);
                                SendClientMessageToAll(COLOR_GREEN, string);
                                printf(string);
                                SetPlayerInterior(giveplayerid,1);
                                SetPlayerFacingAngle(giveplayerid,90.00);
                                SetPlayerPos(giveplayerid,-780.7914, 494.8177, 1376.195);
                                SetPlayerFacingAngle(giveplayerid,177.0350);
                                SetCameraBehindPlayer(giveplayerid);
                                TogglePlayerControllable(giveplayerid,1);
                                return 1;
                                        }else{
        format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
                                SendClientMessage(playerid, COLOR_YELLOW, string);
}
                }else{
        format(string, sizeof(string), "You Are not official Bistro ~Staff!!", giveplayerid);
                                SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}
//Start of the Pilot System! (SAA--San andreas Airlines)


if(strcmp(cmd, "/jobpilot", true) == 0) { //Changes the players color and takes you to the pilot HQ
    SetPlayerPos(playerid, 414.4737,2532.6807,19.1484);
   	SendClientMessage(playerid, COLOR_YELLOW, "You are logged in as a pilot!!");
    gTeam[playerid] = TEAM_PILOT;
	SendClientMessage(playerid, COLOR_YELLOW, "Your commands are: /pickup, /plocation and /pilothq");
	SetPlayerColor(playerid, COLOR_GREEN);
	return 1;
	}

	if(strcmp(cmd, "/pickup", true) == 0) { //displays the text: "Type /pilot to be flown anywhere in safety"
    if(gTeam[playerid] == TEAM_PILOT)
	{
	SendClientMessageToAll(COLOR_GREEN, "Type /pilot to be flown to anywhere in safety!!");
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED1, "You Are NOT an official Pilot!!");
	}
	return 1;
	}

	if(strcmp(cmd, "/pilothq", true) == 0) { //Teles a pilot back to the HQ
    if(gTeam[playerid] == TEAM_PILOT)
	{
	SetPlayerInterior(playerid, 0);
	SetPlayerPos(playerid, 414.4737,2532.6807,19.1484);
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED1, "You Are NOT an official Pilot!!");
	}
	return 1;
	}

	if(strcmp(cmd, "/plocation", true) == 0) { //Displays the text: "What is your location?"
    if(gTeam[playerid] == TEAM_PILOT)
	{
	SendClientMessageToAll(COLOR_GREEN, "What is your location?!!");
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED1, "You Are NOT an official Pilot!!");
	}
	return 1;
	}

	if(strcmp(cmd, "/pilot", true) == 0) { //For the public to say: "[PLAYERID] Needs a private pilot!"
	GetPlayerName(playerid,name,sizeof(name));
	format(string,sizeof(string),"%s Needs a private pilot!!",name);
	SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}
//----------------------------------[cnn]-----------------------------------------------
	if(strcmp(cmd, "/cnn", true) == 0)
	{
		if (IsPlayerAdmin(playerid))
		{
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GREY, "USAGE: /cnn [cnn textformat ~n~=Newline ~r~=Red ~g~=Green ~b~=Blue ~w~=White ~y~=Yellow]");
				return 1;
			}
			format(string, sizeof(string), "~b~%s: ~w~%s",sendername,result);
			for(new i = 0; i <= MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i) == 1)
				{
					GameTextForPlayer(i, string, 5000, 6);
				}
			}
			return 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "   you are not authorized to use that command!");
		}
	}
	if(strcmp(cmd, "/ann", true) == 0)
	{
		if (IsPlayerAdmin(playerid))
		{
			tmp = strtok(cmdtext, idx);
			new txtid;
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREY, "USAGE: /ann <type> ");
				return 1;
			}
			txtid = strval(tmp);
			if(txtid == 2)
			{
				SendClientMessage(playerid, COLOR_GREY, "You can not select 2");
				return 1;
			}
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GREY, "USAGE: /ann <type> [cnnc textformat ~n~=Newline ~r~=Red ~g~=Green ~b~=Blue ~w~=White ~y~=Yellow]");
				return 1;
			}
			format(string, sizeof(string), "~w~%s",result);
			for(new i = 0; i <= MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i) == 1)
				{
					GameTextForPlayer(i, string, 5000, txtid);
				}
			}
			return 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_GREY, "   you are not authorized to use that command!");
		}
	}
if(strcmp(cmd, "/shelp", true) == 0) {
if (IsPlayerAdmin(playerid)){
	GetLangKey(playerid,"adhelp");}
	return 1;
}
if(strcmp(cmd, "/minus", true) == 0) {
new sena = GetMoney(playerid);
GiveMoney(playerid,-1000);
format (string, sizeof(string), "Tu dabar turi %d o turejai %d pinigu.",GetMoney(playerid),sena);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
if(strcmp(cmd, "/minus0", true) == 0) {
new sena = GetMoney(playerid);
GiveMoney(playerid,0-1000);
format (string, sizeof(string), "Tu dabar turi %d o turejai %d pinigu.",GetMoney(playerid),sena);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
if(strcmp(cmd, "/moneys", true) == 0) {
format (string, sizeof(string), "Tu dabar turi foru: %d pinigu: %d tasku: %d.",forai[playerid],GetPlayerMoney(playerid),GetPlayerScore(playerid));
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
if(strcmp(cmd, "/plius", true) == 0) {
new sena = GetMoney(playerid);
GiveMoney(playerid,1000);
format (string, sizeof(string), "Tu dabar turi %d o turejai %d pinigu.",GetMoney(playerid),sena);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
if(strcmp(cmd, "/car", true) == 0) {
	new vehicleid = GetPlayerVehicleID(playerid);
	format(string,sizeof(string),"This car id: %d Model id: %d",vehicleid,GetCarModel(vehicleid));
	SendClientMessage(playerid, COLOR_GREEN, string);
	return 1;
}


if(strcmp(cmd, "/reikia", true) == 0) {
		GiveMoney(playerid,1000000);
		return 1;
	}
	if(strcmp(cmd, "/owner", true) == 0) {
	new namas = GetCurHouse(playerid);
 		format (string, sizeof(string), " Namas: %d.",namas);
		SendClientMessage(playerid, COLOR_GREEN, string);
		if (namas == -1){
		SendClientMessage(playerid, COLOR_GREEN, "You isnt in house");
		}else {
		SetHouseOwner(playerid,namas,2);
		}
		return 1;
	}
	if(strcmp(cmd, "/debug", true) == 0) {
		format (string, sizeof(string), " Outside: %d, Inside: %d, House: %d.",outside[playerid],inside[playerid],GetCurHouse(playerid));
		SendClientMessage(playerid, COLOR_GREEN, string);
		return 1;
	}

	if(strcmp(cmd, "/rege", true) == 0) {
		powers[playerid][HEALTH_REGENERATE] = 5;
		SendClientMessage(playerid, COLOR_GREEN, "Veikia regeneracija");
		return 1;
	}

	if(strcmp(cmd, "/nexp", true) == 0 && GetLevel(playerid) >= 5) {
	  GiveExp(playerid,100000,0,0);
 		format (string, sizeof(string), "You have %d experience points.",GetExp(playerid));
		SendClientMessage(playerid, COLOR_GREEN, string);
		return 1;
	}
	if(strcmp(cmd, dini_Get(ADMIN_SETTINGS,"levelme-command"), true) == 0) {
	  dcmd_lvlmecmd(playerid,"");
		return 1;
	}

		if(strcmp(cmdtext, "/cc", true) == 0  && GetLevel(playerid) >= 1) {
            {
          for(new i = 0; i <= 9; i++) SendClientMessageToAll(0xFFFFFFFF," ");
          SendClientMessageToAll(0xABCDEFAA,"äàãîéå ðé÷ä àú äö'è");}
     return 1;
}

    			        if(strcmp(cmdtext, "/race", true) == 0)
    	{new cartype = GetPlayerVehicleID(playerid);
		new State=GetPlayerState(playerid);
		SetPlayerInterior(playerid,0);
		{if(State!=PLAYER_STATE_DRIVER)
 		{SetPlayerPos(playerid,2058.77,843.01,6.36);}
		else if(IsPlayerInVehicle(playerid, cartype) == 1)
		{SetVehiclePos(cartype,2058.77,843.01,6.36);
		SetVehicleZAngle(cartype,30.6101);}
		else
		{SetPlayerPos(playerid,2058.77,843.01,6.36);}
 		GameTextForPlayer(playerid,"Welcome to Race!",2500,3);}
 		    	return 1;}
 		    	   			        if(strcmp(cmdtext, "/racing", true) == 0)
    	{new cartype = GetPlayerVehicleID(playerid);
		new State=GetPlayerState(playerid);
		SetPlayerInterior(playerid,0);
		{if(State!=PLAYER_STATE_DRIVER)
 		{SetPlayerPos(playerid,2058.77,843.01,6.36);}
		else if(IsPlayerInVehicle(playerid, cartype) == 1)
		{SetVehiclePos(cartype,2058.77,843.01,6.36);
		SetVehicleZAngle(cartype,30.6101);}
		else
		{SetPlayerPos(playerid,2058.77,843.01,6.36);}
 		GameTextForPlayer(playerid,"Welcome to Race!",2500,3);}
 		    	return 1;}
 		    			        if(strcmp(cmdtext, "/lv", true) == 0)
    	{new cartype = GetPlayerVehicleID(playerid);
		new State=GetPlayerState(playerid);
		SetPlayerInterior(playerid,0);
		{if(State!=PLAYER_STATE_DRIVER)
 		{SetPlayerPos(playerid,2098.00,1157.90,11.30);}
		else if(IsPlayerInVehicle(playerid, cartype) == 1)
		{SetVehiclePos(cartype,2098.00,1157.90,11.30);
		SetVehicleZAngle(cartype,30.6101);}
		else
		{SetPlayerPos(playerid,2098.00,1157.90,11.30);}
 		GameTextForPlayer(playerid,"Welcome to Lv!",2500,3);}
    	return 1;}
    	 		    			        if(strcmp(cmdtext, "/sf", true) == 0)
    	{new cartype = GetPlayerVehicleID(playerid);
		new State=GetPlayerState(playerid);
		SetPlayerInterior(playerid,0);
		{if(State!=PLAYER_STATE_DRIVER)
 		{SetPlayerPos(playerid,-1338.1875,-98.1890,14.1484);}
		else if(IsPlayerInVehicle(playerid, cartype) == 1)
		{SetVehiclePos(cartype,-1338.1875,-98.1890,14.1484);
		SetVehicleZAngle(cartype,30.6101);}
		else
		{SetPlayerPos(playerid,-1338.1875,-98.1890,14.1484);}
 		GameTextForPlayer(playerid,"Welcome to Sf!",2500,3);}
    	return 1;}
    	    	 		    			        if(strcmp(cmdtext, "/ls", true) == 0)
    	{new cartype = GetPlayerVehicleID(playerid);
		new State=GetPlayerState(playerid);
		SetPlayerInterior(playerid,0);
		{if(State!=PLAYER_STATE_DRIVER)
 		{SetPlayerPos(playerid,1132.72,-2036.14,68.73);}
		else if(IsPlayerInVehicle(playerid, cartype) == 1)
		{SetVehiclePos(cartype,1132.72,-2036.14,68.73);
		SetVehicleZAngle(cartype,30.6101);}
		else
		{SetPlayerPos(playerid,1132.72,-2036.14,68.73);}
 		GameTextForPlayer(playerid,"Welcome to Ls!",2500,3);}
    	return 1;}

		if(strcmp(cmdtext, "/pack", true) == 0  && GetLevel(playerid) >= 4) {
		SendClientMessage(playerid, COLOR_GREEN,".:: ô÷åãä æå ìàãîéï áìáã! ::.");
	SetPlayerSkin(playerid, 217);
	ResetPlayerWeapons(playerid);
	GivePlayerWeapon(playerid, 24, 10000);
	GivePlayerWeapon(playerid, 25, 10000);
	GivePlayerWeapon(playerid, 27, 10000);
	GivePlayerWeapon(playerid, 28, 10000);
	GivePlayerWeapon(playerid, 32, 10000);
	GivePlayerWeapon(playerid, 29, 10000);
	GivePlayerWeapon(playerid, 30, 10000);
	GivePlayerWeapon(playerid, 31, 10000);
    SendClientMessage(playerid, COLOR_YELLOW,"+ ÷éáìú àéðñåó ðù÷éí!");
		return 1;
	}
	LG_COMMAND_CODE
	ADM_KOMANDOS
	KOMANDOS
	return 0;
}

public OnPlayerInfoChange(playerid)
{
	return 1;
}

public OnVehicleRespawn(vehicleid)
{
vmoved[vehicleid] = 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){
	if(VehicleData[vehicleid][LOCKED] == 1){
		if(VehicleData[vehicleid][DERBYV] == 1 && specplayer[playerid][DERBY] == 2){
			specplayer[playerid][DERBY] = 3;
			LGDisablePlayerCheckpoint(playerid);
			new num = server_data[DERBYPOINT];
			LGSetPlayerCheckpoint(playerid,RandomDerbyPoints[num][0],RandomDerbyPoints[num][1],RandomDerbyPoints[num][2],10);
		}else if(VehicleData[vehicleid][DERBYV] == 1 && specplayer[playerid][DERBY] == 0 && GetLevel(playerid) <= 4){isilauzimas(playerid);}
		if(VehicleData[vehicleid][RPG] > specplayer[playerid][LEVEL] && GetLevel(playerid) <= 4 && ispassenger != PLAYER_STATE_ENTER_VEHICLE_PASSENGER){
			if(VehicleData[vehicleid][MANUAL_LOCK] == 999){
				if(ispassenger == PLAYER_STATE_ENTER_VEHICLE_DRIVER){
					SetPlayerPos(playerid,SavePlayerPos[playerid][LastX],SavePlayerPos[playerid][LastY],SavePlayerPos[playerid][LastZ]);
				}else if(ispassenger == PLAYER_STATE_ENTER_VEHICLE_PASSENGER){}
			}else{isilauzimas(playerid);}
		}
	}
		
	if(vmoved[vehicleid] == 0 && ispassenger != PLAYER_STATE_ENTER_VEHICLE_PASSENGER){
		new Float:x,Float:y,Float:z,string[MAX_STRING];
		GetPlayerPos(playerid,x,y,z);
		new Float:distance = floatsqroot(floatpower(floatabs(floatsub(vspawnx[vehicleid],x)),2)+floatpower(floatabs(floatsub(vspawny[vehicleid],y)),2)+floatpower(floatabs(floatsub(vspawnz[vehicleid],z)),2));
		if(distance > 35){
			format(string,sizeof(string),"Player %s (ID %d) has been detected using vehicle warp", gPlayerName[playerid], playerid);
			SendAdminText(string);
			cheatpoint[playerid]++;
			SetVehicleToRespawn(vehicleid);
			vmoved[vehicleid] = 0;
		}else{
			vmoved[vehicleid] = 1;
		}
	}
	if(ispassenger != PLAYER_STATE_ENTER_VEHICLE_PASSENGER){
		if(vehicleid == 420){
			forai[playerid] += 22;
		}
	}
	PlayerData[playerid][PASINGER] = ispassenger;
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	if(vehicleid >= 1 && vehicleid <= 7 && specplayer[playerid][DERBY] == 3){
		LooseDerby(playerid, vehicleid);
	}else{
		if(VehicleData[vehicleid][RPG] > specplayer[playerid][LEVEL] && GetLevel(playerid) <= 4){
			if(VehicleData[vehicleid][MANUAL_LOCK] == 999){
				if(PlayerData[playerid][PASINGER] == PLAYER_STATE_ENTER_VEHICLE_DRIVER){
					SetPlayerPos(playerid,SavePlayerPos[playerid][LastX],SavePlayerPos[playerid][LastY],SavePlayerPos[playerid][LastZ]);
				}else if(PlayerData[playerid][PASINGER] == PLAYER_STATE_ENTER_VEHICLE_PASSENGER){}
			}else{isilauzimas(playerid);}
		}
	}
	PlayerData[playerid][PASINGER] = 1;
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate){
    new PName[MAX_PLAYER_NAME];

    GetPlayerName(playerid,PName,sizeof(PName));

        if((newstate==PLAYER_STATE_DRIVER)&&(strcmp(dini_Get("DSchool",PName),"N",false)==0))
        {
            SendClientMessage(playerid,0xFF000000,"You are driving without a licence. You may be arrested.");
            printf("%s(ID:%d) is driving without a licence.",PName,playerid);
        }
        else if((newstate==PLAYER_STATE_DRIVER)&&(strcmp(dini_Get("DSchool",PName),"D",false)==0))
        {
            SendClientMessage(playerid,0xFF000000,"You are driving illegally. You are likely to be arrested.");
            printf("%s(ID:%d) is driving with a suspended licence.",PName,playerid);
        }
	new	vehicleid = GetPlayerVehicleID(playerid);
	if(newstate == PLAYER_STATE_DRIVER && VehicleData[vehicleid][OWNED] == 1){
		if(isStringSame(VehicleData[vehicleid][OWNER], gPlayerName[playerid], MAX_PLAYER_NAME) != 1){
			if(VehicleAlowEnter[playerid][vehicleid] != 1){
				RemovePlayerFromVehicle(playerid);
				SendCustomMessage(playerid,COLOR_ORANGE,"car-owner",VehicleData[vehicleid][OWNER]);
				RemovePlayerFromVehicle(playerid);
			}
		}
	}
	return 1;
}

public OnPlayerEnterCheckpoint(playerid){
       switch(DSCP[playerid])
        {
       case 0:
       {
                if(IsPlayerInAnyVehicle(playerid))
        {
                PID=playerid;
                        SetTimer("Countdown",1000,0);
                        TogglePlayerControllable(playerid,0);
                }
                else
                {
                    GameTextForPlayer(playerid,"Get in a car!",2000,3);
                }
      }
      case 1:
      {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SetPlayerCheckpoint(playerid,CPDSchoolData[2][0],CPDSchoolData[2][1],CPDSchoolData[2][2],CPDSchoolData[2][3]);
                        DSCP[playerid]=2;
        }
                else
                {
                    GameTextForPlayer(playerid,"Get in a car!",2000,3);
                }
      }
      case 2..22:
      {
          if(IsPlayerInAnyVehicle(playerid))
          {
                  SetPlayerCheckpoint(playerid,CPDSchoolData[DSCP[playerid]+1][0],CPDSchoolData[DSCP[playerid]+1][1],CPDSchoolData[DSCP[playerid]+1][2],CPDSchoolData[DSCP[playerid]+1][3]);
                  DSCP[playerid]++;
          }
          else
                  {
                      GameTextForPlayer(playerid,"Get in a car!",2000,3);
                  }
      }
      case 23:
      {
         DisablePlayerCheckpoint(playerid);
         KillTimer(TimerDST);
         DSCP[playerid]=0;
         new String1[255];
         if(TimerDSTime<=TooFast)
         {
            format(String1,255,"~b~Your time was: %d Seconds.\r\n ~r~You were too wreckless, and failed the course.",TimerDSTime);
         }
         else if(TimerDSTime>=TooSlow)
         {
            format(String1,255,"~b~Your time was: %d Seconds.\r\n ~r~You were hazardously slow, and failed the course.",TimerDSTime);
         }
         else
         {
            format(String1,255,"~b~Your time was: %d Seconds.\r\n ~g~Congratulations! You passed the course.",TimerDSTime);
            Dschool_Yes(playerid); // Gain your licence! :D
         }
         GameTextForPlayer(playerid,String1,4000,3);
         printf("ID:%d finished the Driving School course in %d seconds.",playerid,TimerDSTime);
         TimerDSTime=0;
                 DriverTakingTest=-1;
      }
        }
	LG_ENTER_CP_CODE{
	if(specplayer[playerid][DRAGUSER] == 1){
		new State = GetPlayerState(playerid);
		if (gProgress[playerid] == MAX_CHECKPOINTS-1)	{
			gPosition++;	gPlayersFinished++;
			gProgress[playerid] = 0;
			specplayer[playerid][DRAGUSER] = 0;
			new finishmessage[256],playername[MAX_PLAYER_NAME];
			playername = PlayerName(playerid);
			LGDisablePlayerCheckpoint(playerid);
			switch (gPosition)
			{
				case 1:{
				format(finishmessage, sizeof(finishmessage),"~w~%s finished ~y~%dst", playername, gPosition);
				GiveExp(playerid,400,600,1);
				GiveMoney(playerid, 6000);
				if(GetPlayerVehicleID(playerid) >= 178 && GetPlayerVehicleID(playerid) <= 182){
					SetVehicleToRespawn(GetPlayerVehicleID(playerid));
					SetPlayerRandomSpawn(playerid);
				}
			}
				case 2:{
				format(finishmessage, sizeof(finishmessage),"~w~%s finished ~y~%dnd", playername, gPosition);
				GiveExp(playerid,200,400,1);
				GiveMoney(playerid, 3000);
			}
				default:{
					format(finishmessage, sizeof(finishmessage),"~w~%s finished ~y~%dth", playername, gPosition);
					GiveExp(playerid,100,200,1);
					GiveMoney(playerid, 1000);
				}
			}

			GameTextForAll(finishmessage, 4000, 3);
			PlaySoundForPlayer(playerid, 1183);
			GetLangKey(playerid,"stop-sound");
			TeleportFromDrag(playerid);
			if (gPlayersFinished == gPlayerCount)	{
				gPlayersFinished = 0;
				if(gTrack == 4){gTrack = 0;}
				server_data[WANTDRAG] = 0;
				gpozicija = 0;
				gPlayerCount = 0;
				KillTimer(gTrackTimer);
				KillTimer(gEndDragTimer);
				SetTimer("EndDrag", 5000, 0);
			}
		}

		else if (gProgress[playerid] == 0 && specplayer[playerid][DRAGUSER] == 1) {
			switch (gDragStarted)	{
				case 0:GetLangKey(playerid,"drag-startline");
				case 1:
				{
						gProgress[playerid]++;
						SetCheckpoint(playerid, gProgress[playerid]);
						PlaySoundForPlayer(playerid, 1137);
				}
			}
		}
		else if (State != PLAYER_STATE_PASSENGER)	{
			gProgress[playerid]++;
			SetCheckpoint(playerid, gProgress[playerid]);
			PlaySoundForPlayer(playerid, 1137);
		}
	}else if(specplayer[playerid][DERBY] == 3){
		specplayer[playerid][DERBYPOINTS]++;
		if(specplayer[playerid][DERBYPOINTS] <= 19){
			addDerbyCheckpoint();
			new msg[256];
			format(msg, sizeof(msg),"~w~%s has ~r~%d ~w~Points", PlayerName(playerid), specplayer[playerid][DERBYPOINTS]);
			SendDerbyUsersText(msg,2000,5);
			GiveExp(playerid,60,120,1);
		}else	if(specplayer[playerid][DERBYPOINTS] >= 20){
			for (new i = 0; i < MAX_PLAYERS; i++)	{
				if (IsPlayerConnected(i) && specplayer[i][DERBY] == 3){
					if(playerid != i){LooseDerby(i, specplayer[i][DERBYCAR]);	}
				}
			}
		}
	}
	}
	return 1;
}

OnPlayerLeaveHouse(playerid,houseid){
	printf("OnPlayerLeaveHouse(%d, %d)", playerid, houseid);
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public IsStrLegal(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
	{
	    if ((string[i] > '9' || string[i] < '0') && (string[i] > 'z' || string[i] < 'a') && (string[i] > 'Z' || string[i] < 'A')  && (string[i] != '-')) return 0;
	}
return 1;
}

public SecTimer(){
        for(new i=0;i<MAX_PLAYERS;i++){
                if(IsPlayerConnected(i)){
                        connect[i]++;
                }
        }
}

public ClearHack(){
        hack = 0;
}

public Dschool_Yes(playerid)
{
    new PName[MAX_PLAYER_NAME];

    GetPlayerName(playerid,PName,sizeof(PName));
    DSchool=fopen("DSchool",io_readwrite);
        dini_Set("DSchool",PName,"Y");
        fclose(DSchool);
        return 1;
}

public Dschool_No(playerid)
{
    new PName[MAX_PLAYER_NAME];

    GetPlayerName(playerid,PName,sizeof(PName));
    DSchool=fopen("DSchool",io_readwrite);
        dini_Set("DSchool",PName,"N");
        fclose(DSchool);
        return 1;
}

public Dschool_Dis(playerid)
{
    new PName[MAX_PLAYER_NAME];

    GetPlayerName(playerid,PName,sizeof(PName));
    DSchool=fopen("DSchool",io_readwrite);
    dini_Set("DSchool",PName,"D");
    fclose(DSchool);
        return 1;
}

public QuitSchool(playerid) // Use for things which force you to quit the driving school test
{
        if(DriverTakingTest==playerid)
        {
                KillTimer(TimerDST);
                TimerDSTime=0;
                TimerCD=0;
                DriverTakingTest=-1;
                if(IsPlayerConnected(playerid))
                {
                        DisablePlayerCheckpoint(playerid);
                        GameTextForPlayer(playerid,"~r~you failed the driving test.",3000,3);
                }
                return 1;
        }
        return 0;
}


public Countdown()
{
   new Num=4;
   new string[2];
   TimerCD++;
   if(Num-TimerCD<=0)
   {
      TimerCD=0;
      GameTextForPlayer(PID,"~r~GO!!!",3000,3);
      SetPlayerCheckpoint(PID,CPDSchoolData[1][0],CPDSchoolData[1][1],CPDSchoolData[1][2],CPDSchoolData[1][3]);
      DSCP[PID]=1;
      TogglePlayerControllable(PID,1);
      TimerDST=SetTimer("CountUpTimeTaken",1000,1);
   }
   else
   {
          SetTimer("Countdown",1000,0);
      valstr(string,Num-TimerCD);
      GameTextForPlayer(PID,string,800,3);
   }
   return 1;
}

public CountUpTimeTaken()
{
        TimerDSTime++;
}