All pastes #666498 Raw Edit

Mine

public text v1 · immutable
#666498 ·published 2007-08-22 05:32 UTC
rendered paste body
#include <a_samp>
#include <dutils>
#include <Dini>
#include <dudb>
#include <float>

#undef KEY_UP
#undef KEY_DOWN
#undef KEY_LEFT
#undef KEY_RIGHT

#define KEY_UP  	65408
#define KEY_DOWN	128
#define KEY_LEFT    65408
#define KEY_RIGHT   128

#define TEAM_STUNT 0

#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_WHITE 0xFFFFFFFF

#define MAX_PING 600

#define ONE_SECOND 1000
#define ONE_MINUTE 60000 //sixty thousand = 1 minute

#define E_FAIL 0
#define E_PASS 1
#define never 10000

//--------------------------------

new gTeam[MAX_PLAYERS];
new gPlayerClass[MAX_PLAYERS];

//--------------------------------

new IsAuth[ MAX_PLAYERS ];
new IsWarned[ MAX_PLAYERS ];
new IsWarnedTime[ MAX_PLAYERS ];
new AuthLevel[ MAX_PLAYERS ];
new PlayerMaxObjects[ MAX_PLAYERS ];

//--------------------------------

new Invulnerable[ MAX_PLAYERS ];

//--------------------------------

new PingWarnings[ MAX_PLAYERS ];

//--------------------------------

new TotalVehicles = 0;

//-------------------------------

new UserObjects[ MAX_PLAYERS ][ MAX_OBJECTS ][ 1 ];

//--------------------------------

#define MAX_SAVE_POS 50
new Float:PlayerSaveSpawn[ MAX_PLAYERS ][ MAX_SAVE_POS ][ 3 ];
new IsSavedLocation[ MAX_PLAYERS ][ MAX_SAVE_POS ];
new IsTeleportingOn = 1;

//--------------------------------

new PlayerLastVehicle[ MAX_PLAYERS ];
new PlayerCount[ MAX_PLAYERS ];
new IsPlayerCounting[ MAX_PLAYERS ];

//--------------------------------

enum eCars
{
     model_id,
     Float:pos_x,
	    Float:pos_y,
	    Float:pos_z,
	    Float:z_angle,
	    respawn_delay
};


new CarSpawns[186][eCars] =
{
    {405,2205.2,-1177.0,25.7,270.8,never},//carid 90
    {554,2205.1,-1169.1,25.7,270.8,never},
    {426,2216.7,-1170.6,25.7,268.3,never},
    {445,2228.5,-1177.3,25.7,88.4,never},
    {492,2229.2,-1170.2,25.7,86.9,never},
    {507,2228.9,-1162.7,25.7,87.8,never},
    {545,2217.0,-1157.2,25.7,269.8,never},
    {540,169.1929,-1342.3611,69.7396,180.4404,never},
    {482,422.8060,-1263.5979,51.6681,21.4204,never},
    {547,405.9748,-1264.3921,50.1237,24.2110,never},
    {550,2242.3, -1235.4, 24.3,359.7513,never},
    {551,2223.9, -1237.3, 24.4,358.8547,never},
    {560,2106.4695,-1248.7920,24.0461,0.1524,never},
    {566,2196.2891,-1277.7905,24.2147,180.4522,never},
    {402,198.6057,-1437.2435,13.1844,318.3837,never},
    {405,216.5521,-1431.4004,13.0853,132.5749,never},
    {554,334.2231,-1343.7405,14.3828,209.9581,never},
    {426,481.0428,-1320.8564,15.4095,35.6808,never},
    {507,697.4343,-1230.9486,16.5063,298.7916,never},
    {545,723.9850,-1121.5535,18.1450,333.9010,never},
    {540,912.2176,-996.2035,38.1402,7.5764,never},
    {482,982.1829,-921.8636,41.8776,262.3163,never},
    {547,981.8715,-917.3546,41.5443,88.0589,never},
    {550,1188.4082,-925.1859,42.8590,277.5563,never},
    {400,1307.5226,-914.4717,39.0082,269.3765,never},
    {405,1450.2,-937.1,36.2,269.6909,never}, //116
    {492,2148.3257,-1175.2518,24.1959,269.6909,never},
    {507,2161.4871,-1163.1450,23.6760,269.1628,never},
    {545,2216.8965,-1165.9469,25.4697,89.8643,never},
    {540,2348.2910,-1167.9983,27.3637,323.1586,never},
    {482,2502.0388,-1134.9507,39.1953,150.9506,never},
    {547,2909.4895,-1180.3746,11.0176,222.1346,never},
    {550,2853.1858,-1326.8011,11.1511,278.9301,never},
    {551,2797.2690,-1549.3374,10.4935,93.0282,never},
    {533,2796.9031,-1567.2024,10.6386,272.4041,never},
    {482,2813.2175,-1673.0276,9.6638,2.3369,never},
    {547,2827.6736,-1703.9755,9.7308,77.2896,never},
    {550,2809.3872,-1837.2391,9.7398,268.9880,never},
    {551,2870.8789,-1943.2599,11.4834,359.2344,never},
    {566,2411.5386,-2134.7576,13.9352,0.7795,never},
    {554,1389.7467,-2695.9370,13.4164,121.1818,never},
    {405,783.1359,-1601.8208,13.2577,270.9069,never},
    {554,782.7205,-1619.3584,13.2653,93.0550,never},
    {426,923.0841,-1361.7990,13.0324,181.1371,never},
    {445,911.7986,-1352.7415,13.1543,359.3287,never},
    {492,1174.6599,-922.1939,43.1189,276.8927,never},
    {507,1363.0210,-1288.3124,13.2839,180.1453,never},
    {545,1363.2723,-1260.8229,13.0954,179.5841,never},
    {540,2383.5627,-1927.9207,13.2436,359.6281,never},
    {482,2377.0374,-1927.8434,13.1071,0.7843,never},
    {547,2391.7234,-1978.0658,13.1963,90.1736,never},
    {550,2396.6899,-1966.8123,13.2793,271.6838,never},
    {551,2391.1135,-1500.6554,23.6355,269.7709,never},
    {560,2390.7446,-1490.9093,23.5335,271.1926,never},
    {405,321.2212,-1809.3561,4.2627,179.7758,never},
    {554,334.3586,-1789.3143,4.6717,178.7722,never},
    {426,343.8039,-1808.9827,4.3090,181.8368,never},
    {445,499.4850,-1764.0182,5.3367,89.7930,never},
    {492,646.4998,-1771.6411,13.2905,348.7706,never},
    {507,740.4332,-1797.7659,13.9196,349.9927,never},//150
    {545,652.4496,-1656.7273,14.4585,91.3294,never},
    {540,546.0256,-1622.4747,16.4585,180.7857,never},
    {482,438.9431,-1625.4088,25.7951,0.1850,never},
    {547,453.3896,-1494.3240,30.7917,7.7513,never},
    {550,487.6469,-1516.2312,20.0235,185.5384,never},
    {551,300.5775,-1490.8882,24.3748,235.1359,never},
    {560,297.9918,-1535.9011,24.3758,231.2773,never},
    {566,524.0590,-1375.0093,15.8231,193.3626,never},
    {405,598.9131,-1519.1414,14.8214,180.4083,never},
    {554,593.2022,-1519.3578,14.9461,181.5466,never},
    {426,733.5679,-1438.4880,13.3203,266.7551,never},
    {445,770.4971,-1431.1127,13.3247,0.7436,never},
    {492,735.9440,-1346.2430,13.3003,88.3069,never},
    {507,736.8572,-1337.1550,13.3140,271.3832,never},
    {545,856.7003,-1363.1852,13.4093,179.8542,never},//165
    {482,888.1506,-1659.2727,13.3296,1.2414,never},
    {547,879.1024,-1669.2560,13.3305,180.5853,never},
    {550,888.0242,-1678.5981,13.3294,358.4990,never},
    {551,920.4441,-1823.0966,12.3452,84.1821,never},
    {560,986.5818,-1761.2992,13.4014,181.9385,never},
    {566,1062.6744,-1757.9412,13.1956,89.0572,never},
    {405,1084.3831,-1763.8369,13.1501,269.0443,never},
    {554,1081.8948,-1629.9564,13.4064,90.0880,never},
    {426,981.7941,-1523.5115,13.3379,267.2751,never},
    {445,1014.7464,-1434.4586,13.3292,266.3129,never},
    {492,2684.6,-1990.2,13.3,180.0931,never},
    {507,2684.6,-2019.0,13.3 ,0.8777,never},
    {545,1096.1,-1379.9,13.3,270.1909,never},//178
    {540,1151.6812,-1203.2323,20.2889,273.5155,never},//179
    {482,1182.2568,-1219.2407,18.4163,0.5578,never},
    {547,1260.9978,-1187.1921,23.3559,183.3606,never},
    {550,1331.9304,-1081.3899,24.9941,90.4092,never},
    {551,1284.8755,-1525.5013,13.3451,269.4388,never},
    {560,1279.1887,-1539.2032,13.3201,94.8070,never},
    {566,1275.9120,-1646.7448,13.3273,267.2669,never},
    {405,1318.2792,-1785.7821,13.2429,182.4215,never},
    {554,1253.9153,-1833.3832,13.1734,175.3692,never},
    {426,1279.2875,-1814.4156,13.1657,93.6385,never},
    {445,1198.5004,-1835.2216,13.1820,93.6780,never},
    {492,1479.9131,-1737.8813,13.2418,269.5805,never},
    {507,1508.1047,-1737.7089,13.2418,270.0250,never},
    {545,1618.0411,-1891.1044,13.3278,0.3364,never},
    {540,1623.7291,-1892.7234,13.3307,180.0126,never},
    {482,1742.8494,-1857.7446,13.1960,271.1740,never},
    {547,1743.5837,-1844.6041,13.3557,180.3384,never},
    {550,1838.1904,-1871.3842,13.1703,358.5452,never},
    {551,1841.4791,-1871.6549,13.1687,179.3825,never},
    {560,1777.1376,-1910.0310,13.1681,91.0725,never},
    {566,1803.1235,-1920.5144,13.1758,266.0453,never},
    {566,1981.0780,-1986.3513,13.3275,2.1479,never},
    {405,1987.6057,-1994.9520,13.3296,359.9128,never},
    {554,1978.0371,-2066.7500,13.1640,358.2871,never},
    {426,1984.7471,-2066.7776,13.1625,359.7226,never},
    {445,1938.0565,-2086.8459,13.3429,268.3414,never},
    {492,1947.1119,-2136.3887,13.3286,90.9804,never},
    {507,1932.1523,-2141.5220,13.3429,1.8383,never},
    {545,1793.9172,-2148.5300,13.3781,359.7861,never},
    {540,1748.0751,-2084.2090,13.3324,0.4337,never},
    {482,1560.5026,-2260.5457,13.3258,268.7398,never},
    {547,1461.6943,-1505.1688,13.2541,356.9007,never},
    {550,1426.4930,-1402.3170,13.1800,181.0290,never},
    {551,1435.0645,-1325.6835,13.2580,270.9400,never},
    {560,1513.9486,-1272.5691,14.2685,181.0697,never},
    {566,1583.7561,-1338.7435,16.1896,359.8619,never},
    {405,1573.8772,-1209.9202,17.1378,92.7502,never},
    {554,1476.2012,-1120.3083,23.5660,359.9746,never},
    {426,1430.2316,-1054.8555,22.8693,359.3625,never},
    {445,1574.1168,-1036.7643,23.6151,145.6786,never},
    {492,1617.6676,-1009.8663,23.6052,356.8697,never},
    {507,1645.3188,-1036.5238,23.6027,0.7258,never},
    {545,1735.2826,-1010.5402,23.6588,346.3133,never},
    {540,1770.4874,-1060.9886,23.6658,179.2750,never},
    {482,1739.9854,-1084.5490,23.6660,176.8026,never},
    {547,1653.1766,-1134.8994,23.6110,178.6835,never},
    {550,1617.3746,-1132.8293,23.6117,91.7300,never},
    {551,1790.0190,-1292.9065,13.2653,267.2964,never},
    {560,1754.3009,-1476.8170,13.2402,269.6320,never},
    {554,2003.3417,-1121.4993,26.3879,357.4926,never},
    {426,2084.2334,-1170.0986,24.2042,91.8975,never},
    {445,2229.1128,-1357.8774,23.6930,268.2194,never},
    {492,2229.2278,-1345.4033,23.6892,93.3009,never},
    {507,2332.5684,-1362.4845,23.7297,358.1198,never},
    {545,2384.1567,-1275.6326,23.9198,101.6528,never},
    {540,2432.3149,-1226.0785,24.9941,17.9805,never},
    {482,2426.9612,-1224.4158,25.0000,202.7159,never},
    {547,2438.4309,-1321.6925,24.1225,269.7535,never},
    {551,2612.9702,-1262.6970,48.2461,269.4752,never},
    {560,2659.4529,-1428.4343,30.1790,266.5051,never},
    {566,2659.7053,-1422.6743,30.1714,89.8159,never},
    {405,2485.5313,-1556.1823,23.7478,178.8338,never},
    {554,2478.7664,-1555.7006,23.7226,183.6043,never},
    {426,2605.3967,-1365.8829,34.6461,359.9891,never},
    {445,2754.7136,-1373.0253,40.1154,91.4169,never},
    {492,2717.3662,-1468.0308,30.0894,1.0298,never},
    {507,2816.7195,-1449.4285,15.9549,268.9106,never},
    {545,2816.9937,-1441.5880,15.9544,90.7779,never},
    {540,2681.9016,-1673.3879,9.1290,0.5605,never},
    {482,2442.5845,-1642.7507,13.1644,180.3454,never},
    {547,2361.3120,-1674.6146,13.2505,357.4959,never},
    {550,2298.3535,-1633.7542,14.3849,80.8107,never},
    {551,2297.9077,-1639.9464,14.4352,94.4292,never},
    {560,2255.4045,-1664.5736,15.1304,74.6898,never},
    {566,2234.1057,-1726.9386,13.1665,271.7536,never},
    {405,2319.3833,-1716.6823,13.2518,359.8540,never},
    {554,2474.5105,-1755.9194,13.2522,270.5967,never},
    {426,2501.8213,-1754.2794,13.1208,176.4916,never}, //= 255
    {445,2489.1560,-1952.6886,13.1366,178.1629,never},
    {492,2495.4326,-1953.2922,13.1299,356.5514,never},
    {507,2306.7168,-1989.6796,13.2639,184.8385,never},
    {482,2056.1807,-1904.7751,13.2502,2.2910,never},
    {550,2064.9871,-1919.1674,13.2504,180.8575,never},
    {551,1886.4812,-2022.9338,13.0964,179.4265,never},
    {560,1824.8976,-2019.8374,13.0875,272.5273,never},
    {566,1942.1669,-1862.6425,13.2679,264.5590,never},
    {405,1923.9409,-1795.5616,13.0877,90.0886,never},
    {554,1807.0905,-1571.7120,13.1659,125.1048,never},
    {426,1809.9016,-1676.0603,13.2422,180.7589,never},
    {445,1809.6266,-1653.3402,13.2365,180.6530,never},
    {492,1809.7056,-1660.3019,13.2380,180.6262,never},
    {507,1978.4003,-1675.0157,15.6741,269.7336,never},
    {545,1974.8230,-1693.5488,15.6741,92.1162,never},
    {540,1929.2253,-1584.6954,13.2700,185.5542,never},
    {482,1731.9725,-1590.8959,13.1630,77.7249,never},
    {547,1721.5776,-1589.2834,13.1526,80.9057,never},
    {550,1695.1428,-1519.2667,13.1671,0.7121,never},
    {551,1694.7080,-1501.7454,13.1675,357.8150,never}
 };

//=====================================================================================================
//important functions here

public GetPlayerTeamColor( playerid )
{
       return COLOR_LIGHTBLUE;
}

public GetPlayerCaption( playerid )
{
       new szName[ 256 ];
       GetPlayerName( playerid, szName, sizeof( szName ) );
       return szName;
}

public GetPlayerIPA( playerid )
{
       new szIP[ 256 ];
       GetPlayerIp(playerid, szIP, sizeof( szIP ));
       return szIP;
}

public minrand( min, max )
{
       return random(max - min) + min;
}

public RandomPlayerID( )
{
       new iRet = 2000;
       while( IsPlayerConnected( iRet ) == 0 )
       {
              iRet = minrand( 0, MAX_PLAYERS );
       }
       return iRet;
}

public IsValidObjectModel( modelid )
{
       switch( modelid )
       {
               case 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232,
               1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242,
               1243, 1445, 1487, 1299, 4022, 620, 4550, 15030, 15029, 15031,
               15042, 1768, 1818, 1717, 2100, 2023, 2297, 2126, 2249, 2138,
               2139, 2136, 2135, 2121, 2109, 13592, 13666, 13641, 13639,
               13634, 8493, 3374, 1305, 2918, 1472, 9766, 5130, 4563, 1468, 1583,
               1584, 1574, 1248, 1512, 1598, 1608, 1594, 1607, 1813, 3642, 3616,
               9322, 2780, 3425, 3461, 3515, 3524, 3528, 3586, 6865,
               7916, 8484, 8979, 14608, 16776, 3397, 10009, 13831, 14467, //jacob objects

               902, 903, 953, 1461, 1599, 1600, 1601, 1602, 1603, 1604, 1605,
               1606, 1609, 1610, 1611, 1637, 1640, 1641, 1642,
               1643, 2404, 2405, 2406, 2410, 2782, //beach and sea

               1612, 3406, 3578, 3620, 3753, 3879, 3886, 5108, 5109, 5115, 5143, 5145,
               5146, 5154, 5155, 5156, 5157, 5158, 5160, 5166, 5167, 5176, 5184, 6188,
               6189, 6230, 6300, 8373, 9090, 9229, 9230, 9253, 9257, 9329, 9584, 9585,
               9586, 9590, 9612, 9613, 9818, 9819, 9820, 9821, 9822, 9829, 9858, 9902,
               9954, 9955, 9956, 9958, 10140, 10226, 10227, 10229, 10230, 10300, 10301,
               10305, 10771, 10793, 10794, 10795, 10824, 10826, 10827, 10828, 10830, 10831,
               10833, 10834, 10841, 11009, 11145, 11146, 11237, 11495, 12990, 16502, 17068,
               18024, //ships docks etc

               3249, 6869, 6985, 6987, 6988, 6989, 7071, 7263, 7265, 7289, 7521, 8395, 8399,
               8400, 8501, 8663, 9070, 9071, 9072, 9076, 9104, 9582, 10398, 10713, 13132, 14399,
               14463, 14533, 14536, 14537, 14546, 14560, 14563, 14581, 14590, 14606, 14607, 14614,
               14623, 14624, 14625, 14738, 14777, 14785, 14808, 14809, 14815, 14821, 14831, 14832,
               14835, 14836, 14838, 16021, 16051, 16146, 16150, 16690, 17523, 17700, 18018, 18028,
               18090, //bar & casino

               3689, 3707, 3755, 3776, 4860, 5129, 5131, 5135, 5137, 5138, 5139, 5174, 5175, 5177,
               5180, 5183, 5192, 5278, 5309, 5310, 5313, 5397, 5728, 6340, 6404, 6490, 6925, 7019,
               7020, 7021, 7035, 7269, 7490, 7492, 7494, 7495, 7496, 7497, 7513, 7627, 7832, 7861,
               8057, 8058, 8059, 8060, 8061, 8062, 8063, 8064, 8065, 8066, 8067, 8069, 8254, 8255,
               8260, 8300, 8544, 8545, 8546, 9243, 9244, 9247, 9260, 9680, 10775, 10776, 10840, 10843,
               10844, 10845, 10846, 10847, 10856, 10965, 10966, 11010, 11011, 11012, 11081, 11085, 11086,
               11087, 11089, 11090, 11093, 11233, 11234, 11235, 11236, 11244, 11290, 11293, 11295, 11461,
               11543, 12847, 12931, 12941, 12981, 12988, 13059, 13060, 13061, 13065, 13066, 13077, 13078,
               13198, 14572, 14577, 14588, 14784, 14795, 16271, 16272, 16385, 16398, 16399, 16400, 17012,
               17013, 17014, 17015, 17016, 17017, 17021, 17022, 17023, 17024, 17038, 17040, 17049, 17050,
               17051, 17072, 17073, 17538, 17546, 17636, 18200, 18365, 18496, //factories and warehouses

               1675, 1677, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3178, 3241, 3242, 3246,
               3250, 3253, 3283, 3284, 3285, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 3310, 3311, 3312,
               3313, 3314, 3315, 3316, 3317, 3351, 3353, 3355, 3356, 3362, 3414, 3415, 3417, 3418, 3442,
               3443, 3444, 3445, 3446, 3449, 3454, 3455, 3456, 3457, 3464, 3466, 3483, 3484, 3485, 3486,
               3487, 3488, 3501, 3555, 3556, 3557, 3558, 3580, 3582, 3583, 3584, 3587, 3588, 3589, 3590,
               3595, 3596, 3597, 3598, 3599, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609,
               3612, 3613, 3614, 3617, 3618, 3619, 3622, 3623, 3624, 3626, 3628, 3634, 3635, 3639,
               3640, 3641, 3644, 3646, 3648, 3649, 3651, 3653, 3655, 3661, 3676, 3677, 3678, 3684,
               3697, 3698, 3700, 3702, 3704, 3711, 3713, 3741, 3759, 3762, 3764, 3765, 3783, 3820, 3821,
               3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 3830, 3842, 3843, 3844, 3845, 4178, 4861,
               4886, 5060, 5151, 5341, 5416, 5421, 5423, 5425, 5444, 5445, 5446, 5447, 5448, 5450, 5451,
               5452, 5453, 5461, 5462, 5475, 5476, 5520, 5626, 5642, 5643, 5655, 5656, 5722, 5723, 5775,
               5874, 5891, 5892, 5986, 6038, 6039, 6041, 6042, 6047, 6057, 6058, 6132, 6133, 6134, 6135,
               6136, 6137, 6138, 6284, 6285, 6286, 6294, 6436, 6522, 6868, 6920, 6921, 6922, 6923, 6926,
               7200, 7287, 7489, 7491, 7533, 7534, 7535, 7681, 7885, 7929, 7932, 7940, 8425, 8427, 8428,
               8433, 8437, 8513, 9098, 9220, 9221, 9227, 9228, 9238, 9258, 9259, 9270, 9271, 9272, 9273,
               9274, 9275, 9319, 9320, 9323, 9324, 9325, 9326, 9327, 9328, 9341, 9495, 9496, 9497,
               9498, 9499, 9500, 9501, 9502, 9503, 9504, 9506, 9507, 9509, 9510, 9511, 9512, 9513, 9515,
               9516, 9517, 9518, 9520, 9521, 9522, 9523, 9524, 9529, 9547, 9549, 9550, 9572, 9573, 9576,
               9577, 9578, 9579, 9580, 9581, 9592, 9598, 9599, 9737, 9738, 9739, 9740, 9741, 9742, 9748,
               9749, 9750, 9751, 9752, 9753, 9754, 9762, 9763, 9764, 9765, 9894, 9895, 9903, 9904, 9909,
               9916, 9920, 9927, 9947, 9948, 9952, 10013, 10014, 10015, 10016, 10017, 10019, 10020, 10021,
               10022, 10043, 10048, 10050, 10053, 10055, 10080, 10084, 10086, 10101, 10187, 10188, 10189,
               10278, 10287, 10289, 10306, 10427, 10634, 10988, 10989, 10990, 10991, 10992, 10993, 10995,
               10998, 11001, 11002, 11004, 11433, 11490, 11491, 11501, 11502, 11503, 12937, 12938, 12939,
               12940, 12991, 13681, 13687, 13694, 13695, 13696, 13697, 13701, 13721, 13724, 13729, 13746,
               13747, 13753, 13754, 13755, 13816, 14385, 14388, 14389, 14390, 14417, 14418, 14419, 14420,
               14421, 14422, 14423, 14424, 14425, 14426, 14427, 14428, 14429, 14430, 14431, 14471, 14474,
               14475, 14476, 14484, 14485, 14492, 14495, 14500, 14512, 14525, 14526, 14534, 14639, 14700,
               14701, 14702, 14703, 14706, 14707, 14708, 14709, 14710, 14711, 14712, 14713, 14714, 14717,
               14718, 14735, 14736, 14746, 14748, 14750, 14754, 14755, 14756, 14758, 14759, 14760, 14771,
               14801, 14803, 14859, 14865, 14889, 15041, 15046, 15048, 15054, 15055, 15058,
               15059, 16105, 16280, 16285, 16689, 17005, 17008, 17041, 17044, 17045, 17067, 17335, 17547,
               17549, 17551, 17552, 17553, 17554, 17555, 17560, 17562, 17573, 17575, 17679, 17690, 17697,
               17698, 17699, 17804, 17807, 17809, 17859, 17888, 17893, 17894, 17901, 17922, 17926,
               17928, 17934, 17944, 18230, 18258, 18259, 18267, //buildings, apartments

               3781, 4002, 4005, 4006, 4007, 4008, 4017, 4019, 4021, 4023, 4028, 4033, 4113, 4193,
               4558, 4559, 4564, 4569, 4570, 4571, 4572, 4573, 4576, 4585, 4586, 4587, 4600, 4601,
               4602, 4603, 4681, 4690, 4718, 5033, 5735, 5736, 5740, 5767, 5881, 5882, 5999, 6059, 6063,
               6087, 6088, 6099, 6100, 6102, 6148, 6159, 6199, 6205, 6211, 6212, 6288, 6332, 6336, 6342,
               6351, 6364, 6366, 6368, 6371, 6373, 6388, 6389, 6390, 6391, 6966, 6993, 7009, 7528, 7584,
               7585, 7696, 8391, 8392, 8393, 8419, 8421, 8422, 8424, 8434, 8480, 8482, 8485, 8488, 8489,
               8490, 8527, 8528, 8555, 8565, 8566, 8568, 9361, 9907, 9919, 10027, 10041, 10044, 10056, 10060,
               10063, 10143, 10308, 10610, 10619, 10676, 10871, 10945, 10947, 10948, 11431, 11566, 13006, 14593,
               14594, 14595, 14597, 14602, 16004, 16326, 17533, //offices and skyscrapers

               967, 1638, 1684, 3243, 3292, 3293, 3504, 3615, 3866, 3873, 3887, 3976, 3980, 3986, 3998, 4013,
               4014, 4079, 4101, 4103, 4552, 4554, 5116, 5402, 5403, 5408, 5426, 5705, 5706, 5708, 5710, 5711,
               5712, 5716, 5720, 5763, 5835, 5837, 5863, 5864, 5865, 5886, 6036, 6037, 6040, 6296, 6337, 6863,
               6864, 6866, 6871, 6872, 6873, 6874, 6875, 6962, 6994, 7011, 7023, 7027, 7094, 7511, 7525, 8034,
               84079, 8130, 8131, 8136, 8168, 8169, 8230, 8231, 8237, 8397, 8431, 8500, 8575, 8578, 8591,
               8620, 8675, 8867, 8870, 8881, 8882, 8955, 9037, 9039, 9052, 9078, 9106, 9114, 9310, 9593, 9623,
               9624, 9834, 9835, 9836, 9900, 9901, 9918, 9931, 9949, 9950, 9951, 10023, 10031, 10049, 10270,
               10368, 10377, 10378, 10379, 10380, 10381, 10401, 10433, 10631, 10829, 10832, 10941, 10942,
               11008, 11015, 11088, 11425, 11426, 11427, 11428, 11440, 11441, 11442, 11443, 11444, 11445,
               11446, 11447, 11451, 11454, 11457, 11458, 11459, 11492, 12805, 12925, 12928, 12929, 12935,
               12942, 12943, 12959, 12960, 12978, 12983, 13007, 13027, 13190, 13295, 13725, 14408, 14412,
               14413, 14415, 14444, 14445, 14447, 14466, 14530, 14576, 14592, 16095, 16096, 16137, 16138,
               16287, 16344, 16348, 16352, 16354, 16359, 16364, 16376, 16386, 16387, 16563, 16564, 16769,
               16770, 16774, 17688, 17946, 18033, 18036, 18045, 18049, 18065, 18234, 18235, 18236, 18274,
               18552, //other buildings

               3436, 3469, 4016, 4141, 4857, 4887, 4888, 5168, 5189, 5406, 5413, 5418, 5430, 5718, 5732,
               5814, 6010, 6257, 6283, 6907, 7037, 7240, 7387, 7389, 7426, 7509, 7596, 7972, 7973, 8409,
               8411, 8498, 8499, 8534, 8535, 8710, 9615, 9824, 9859, 9860, 9898, 10193, 10194, 10195, 10196,
               10197, 10310, 10412, 10425, 10446, 10606, 10718, 10744, 11469, 11549, 11674, 12924, 12976, 13361,
               14383, 14479, 14506, 14655, 14674, 14675, 15033, 15034, 15053, 16012, 16066, 16067,
               16070, 16106, 16143, 16144, 16562, 16568, 16605, 16673, 16767, 16781, 17534, 18009, 18020, 18021,
               18022, 18023, 18029, 18056, 18058, 18237, 18239, 18242, //resturant and hotels

               3452, 3453, 3819, 5390, 5400, 6066, 7416, 7417, 7420, 7421, 7422, 7600, 7601, 7602, 7603, 7604, 7617,
               7983, 8201, 8333, 8417, 10385, 10405, 10406, 10407, 10408, 10409, 10410, 10561, 10954, 10955,
               13595, 13598, 13599, 13602, 13603, 13606, 13607, 13608, 13609, 13610, 13611, 13612, 13613, 13614, 13615,
               13616, 13617, 13618, 13619, 13620, 13621, 13624, 13625, 13627, 13631, 13628, 13632, 13629, 13633, 13630,
               13642, 13650, 13651, 13657, 13661, 13662, 13659, 13660, 13801, 14449, 14486, 14488, 14778,
               14779, 14780, 14781, 14782, 14786, 14787, 14788, 14789, 14790, 14791, 14792, 14794, 14825, 14827, 17511,
               17513, 17515, 17563, 17582, 17841, //sports and stadium

               3988, 4001, 4004, 4011, 4018, 4048, 4058, 4059, 4060, 4112, 4114, 4117, 4123, 4176, 4555, 4593, 4594,
               4682, 4683, 4708, 4848, 4850, 4877, 4880, 4894, 5016, 5017, 5040, 5042, 5110, 5134, 5136, 5140, 5142, 5173,
               5179, 5181, 5182, 5187, 5267, 5392, 5393, 5410, 5414, 5521, 5532, 5628, 5704, 5709, 5717, 5719, 5721, 5725,
               5726, 5727, 5729, 5730, 5731, 5733, 5734, 5737, 5738, 5760, 5761, 5762, 5765, 5768, 5769, 5771, 5781, 5782,
               5784, 5787, 5792, 5810, 5813, 5819, 5848, 5870, 5896, 6048, 6053, 6060, 6061, 6095, 6096, 6098, 6103, 6104,
               6130, 6145, 6150, 6151, 6157, 6158, 6186, 6187, 6282, 6334, 6338, 6354, 6355, 6369, 6406, 6488, 6908, 6919,
               6924, 6944, 6946, 6947, 6977, 7088, 7234, 7424, 7493, 7506, 7507, 7508, 7510, 7526, 7529, 7531, 7554, 7599,
               7650, 7658, 7985, 8068, 8242, 8401, 8403, 8432, 8435, 8436, 8494, 8495, 8496, 8503, 8504, 8505, 8506, 8507,
               8508, 8509, 8516, 8567, 8569, 8570, 8571, 8581, 8639, 8643, 8668, 8687, 8688, 8689, 8839, 8842, 8849, 9054,
               9055, 9162, 9163, 9299, 9300, 9301, 9302, 9303, 9494, 9514, 9595, 9906, 9908, 9910, 9911, 9912, 9913, 9914,
               9917, 9921, 9922, 9923, 9924, 9925, 9926, 9928, 9929, 9953, 10025, 10028, 10030, 10035, 10037, 10038, 10039,
               10045, 10046, 10052, 10054, 10142, 10148, 10288, 10369, 10375, 10376, 10383, 10388, 10390, 10391, 10392, 10393,
               10423, 10428, 10429, 10430, 10431, 10432, 10434, 10435, 10439, 10441, 10447, 10624, 10625, 10626, 10627, 10628,
               10630, 10633, 10722, 10891, 10925, 10949, 10950, 10951, 10952, 10953, 10973, 10974, 10975, 10977, 10978, 10979,
               10980, 10981, 10982, 10994, 10996, 10997, 10999, 11000, 11092, 11301, 11312, 11314, 11315, 11317, 11434, 11436,
               11449, 11450, 11456, 11471, 11475, 11497, 11545, 11546, 11615, 12822, 12841, 12843, 12844, 12845, 12849, 12850,
               12855, 12862, 12863, 12923, 12944, 12945, 12946, 12947, 12948, 12949, 12951, 12953, 12962, 12963, 12964, 12979,
               12980, 12982, 12984, 13008, 13012, 13013, 13014, 13015, 13022, 13131, 13363, 13364, 13761, 14531, 14661, 14664,
               14665, 14667, 14670, 14671, 14672, 14676, 14682, 14689, 14668, 14669, 16005, 16007, 16011, 16053, 16054, 16064,
               16065, 16068, 16069, 16361, 16396, 16475, 17066, 17503, 17508, 17517, 17519, 17520, 17521, 17522, 17524, 17526,
               17529, 17531, 17536, 17537, 17542, 17543, 17544, 17577, 17853, 17862, 18007, 18008, 18025, 18026, 18027, 18030,
               18031, 18038, 18082, 18083, 18088, 18203, 18233, 18238, 18240, 18241, 18261, 18264, 18265, 18266,
               18282, //Stores and Shops

               1376, 1378, 1380, 1381, 1383, 1384, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 3474, 5126, 10825,
               11400, 11401, 11406, 16328, 16332, 16337, 16355, 16356, //cranes

               925, 930, 931, 944, 964, 1271, 1348, 1362, 1431, 1685, 2038, 2039, 2040, 2041, 2042, 2043, 2358, 2359, 2464, 2465,
               2466, 2468, 2476, 2477, 2478, 2479, 2480, 2481, 2483, 2567, 2654, 2669, 2678, 2679, 2694, 3565, 3566, 3568, 3569, 3570,
               3571, 3572, 3573, 3574, 3575, 3576, 3577, 3621, 3630, 3632, 3633, 3722, 3724, 3761, 3796, 3798, 3799, 3800, 5132, 5259,
               5260, 5261, 5262, 5269, 5855, 7025, 7040, 7102, 7104, 7172, 7186, 7317, 7515, 7516, 7527, 7561, 7620, 7621, 7622, 7834,
               7836, 8073, 8074, 8075, 8076, 8077, 8078, 8335, 8337, 8339, 8341, 8883, 8884, 8885, 8886, 9587, 9588, 9589, 9604, 10231,
               10248, 10576, 10773, 10774, 10811, 10814, 12821, 12859, 12860, 12861, 12913, 12927, 12930, 12955, 12977, 13025, 13489, 14549,
               14552, 14558, 14612, 14613, 14800, 14878, 16599, 16601, 17019, 17020, 17055, 18257, 18260, //crates drums racks

               914, 915, 919, 920, 927, 929, 934, 943, 958, 959, 1353, 1354, 1420, 1617, 1618, 1623, 1624, 1625, 1626, 1628, 1629, 1630, 1635,
               1687, 1688, 1689, 1690, 1691, 2649, 2653, 3214, 3255, 3256, 3257, 3258, 3259, 3272, 3273, 3287, 3384, 3427, 3470, 3502, 3529,
               3530, 3631, 3636, 3637, 3638, 3643, 3673, 3675, 3804, 3805, 3812, 3813, 3865, 6867, 6928, 6929, 6930, 6931, 6932, 6933, 6934,
               7024, 7103, 7105, 7201, 7236, 7238, 7291, 7947, 7950, 10675, 11147, 11148, 11149, 11484, 11485, 11486, 11487, 12911, 12912,
               12986, 14573, 14584, 14635, 14882, 16071, 16072, 16073, 16074, 16075, 16076, 16078, 16079, 16080, 16081, 16083, 16086, 16087,
               16267, 16301, 16309, 16311, 16314, 16316, 16318, 16340, 16342, 16345, 16346, 16349, 16395, 16446, 16481, 16530, 16531, 16532,
               16533, 16534, 16535, 16666, 16766, 17001, 18201, //general industrial

               1455, 1484, 1485, 1486, 1488, 1509, 1510, 1511, 1517, 1520, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1551,
               1664, 1665, 1666, 1667, 1668, 1669, 1732, 1950, 1951, 14565, 16151, 16152, //BAR ITEMS

               1515, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861,
               1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882,
               1895, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916,
               1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937,
               1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1947, 1948, 1952, 1953, 1955, 1956, 1978, 1979, 2188, 2189, 2324, 2325, 2326,
               2327, 2347, 2348, 2349, 2618, 2640, 2681, 2754, 2778, 2779, 2783, 2785, 2872, 3430, 3437, 3438, 3440, 3441, 3494, 3498, 3499,
               3503, 14566, 14567, 14568, 14582, //CASINO OBJECTS

               936, 937, 941, 1416, 1417, 1421, 1645, 1646, 1647, 1730, 1740, 1741, 1742, 1743, 1744, 1754, 1755,
               1758, 1759, 1762, 1765, 1767, 1769, 1814, 1815, 1816, 1817, 1819, 1820, 1821, 1822, 1823,
               2000, 2007, 2014, 2015, 2016, 2018, 2019, 2020, 2021, 2022, 2024, 2025, 2046, 2063, 2065, 2066, 2067,
               2078, 2081, 2082, 2083, 2084, 2087, 2088, 2089, 2092, 2094, 2095, 2128, 2129, 2133, 2134, 2137,
               2140, 2141, 2142, 2143, 2145, 2148, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159,
               2160, 2161, 2162, 2163, 2164, 2167, 2168, 2187, 2191, 2197, 2199, 2200, 2204, 2208, 2210, 2211, 2234,
               2235, 2236, 2291, 2292, 2295, 2303, 2304, 2305, 2306, 2307, 2323, 2328, 2329, 2330, 2334, 2335, 2338,
               2341, 2416, 2418, 2419, 2451, 2462, 2463, 2475, 2482, 2502, 2509, 2529, 2530, 2531, 2532, 2533, 2534,
               2562, 2568, 2569, 2570, 2573, 2574, 2576, 2591, 2604, 2606, 2608, 2609, 2610, 2708, 2737, 5171, 9362,
               11334, 13003, 13890, 14455, 14472, 14477, 14491, 14493, 14502, 14503, 14504, 14505, 14507, 14508, 14509,
               14510, 14535, 14540, 14543, 14544, 14556, 14632, 14633, 14640, 14704, 14719, 14720, 14721, 14739, 14741,
               14745, 14802, 14805, 14813, 14816, 14817, 14828, 14839, 14850, 14888, 14895, 15025, 15026, 15032, 15036,
               15052, 16154, 16378, 18019, 18077, //FURNITURE

               1513, 1514, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1883, 1884, 1885, 1886, 1887, 1888, 1889,
               1890, 1891, 1959, 1972, 1973, 1981, 1982, 1983, 1984, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
               1995, 1996, 2012, 2362, 2365, 2366, 2367, 2368, 2369, 2375, 2376, 2379, 2385, 2387, 2388, 2393, 2403, 2412,
               2413, 2414, 2422, 2423, 2424, 2433, 2434, 2435, 2436, 2439, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447,
               2448, 2449, 2450, 2454, 2455, 2457, 2458, 2459, 2460, 2461, 2467, 2484, 2485, 2486, 2487, 2488, 2489, 2490,
               2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2505, 2506, 2507, 2508, 2535, 2536, 2537, 2538,
               2539, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556,
               2557, 2577, 2578, 2579, 2581, 2582, 2583, 2584, 2585, 2586, 2589, 2590, 2593, 2594, 2597, 2598, 2601, 2620,
               2621, 2622, 2623, 2624, 2625, 2626, 2652, 2698, 2699, 2701, 2749, 2750, 2751, 2752, 2753, 2771, 2803, 2804,
               2805, 2806, 2871, 12854, 14403, 14650, 14651, 14652, 14653, 14654, 14660, 14666, 14678, 14679, 14685, 14686,
               14693, 14811, 14890, 18061, 18064, 18070, 18092, //shop items

               643, 1256, 1280, 1281, 1368, 1432, 1433, 1516, 1562, 1563, 1663, 1670, 1671, 1679, 1704, 1705, 1708,
               1711, 1714, 1715, 1716, 1720, 1721, 1722, 1723, 1724, 1726, 1727, 1728, 1729, 1735, 1739, 1746, 1805, 1806,
               1810, 1811, 1824, 1825, 1826, 1827, 1896, 1954, 1957, 1963, 1968, 1969, 1970, 1998, 1999, 2008, 2009, 2027,
               2079, 2096, 2120, 2122, 2123, 2124, 2125, 2165, 2166, 2169, 2171, 2172, 2173, 2174, 2175, 2180, 2181,
               2182, 2183, 2184, 2185, 2193, 2198, 2205, 2206, 2207, 2209, 2293, 2308, 2309, 2310, 2311, 2313, 2314, 2315,
               2319, 2321, 2343, 2346, 2350, 2356, 2370, 2592, 2605, 2607, 2635, 2636, 2637, 2638, 2639, 2644, 2723, 2724,
               2725, 2746, 2747, 2748, 2762, 2763, 2764, 2776, 2777, 2784, 2788, 2799, 2800, 2801, 2802, 2807, 2808, 3383,
               3657, 3752, 11631, 11665, 12842, 14401, 14405, 14458, 14490, 14619, 14620, 14657, 14770, 14810, 14833, 14837,
               14869, 18055, 18057, 18059, 18060, //tables & chairs

               3975, 3977, 3978, 3981, 3982, 3983, 3984, 3985, 3987, 3989, 3997, 4000, 4010, 4012, 4020, 4027, 4029, 4030,
               4109, 4110, 4122, 4186, 4197, 4198, 4551, 4556, 4562, 4568, 4584, 4590, 4604, 4643, 4700, 4703, 4712, 4806,
               4811, 4812, 4813, 4814, 4858, 4873, 4879, 5105, 5107, 5111, 5122, 5123, 5144, 5185, 5186, 5270, 5273, 5274,
               5279, 5311, 5342, 5343, 5355, 5404, 5419, 5420, 5459, 5474, 5518, 5519, 5652, 5739, 5741, 5815, 5823, 5845,
               5857, 6064, 6101, 6152, 6160, 6165, 6213, 6217, 6227, 6280, 6281, 6293, 6297, 6312, 6313, 6343, 6347, 6398,
               6416, 6417, 6443, 6497, 6882, 6883, 6884, 6885, 6979, 7044, 7045, 7046, 7047, 7048, 7049, 7050, 7051,
               7098, 7099, 7100, 7101, 7203, 7217, 7218, 7247, 7248, 7249, 7250, 7251, 7252, 7253, 7254, 7357, 7448, 7449,
               7450, 7451, 7452, 7453, 7454, 7455, 7456, 7460, 7462, 7463, 7464, 7465, 7466, 7467, 7468, 7469, 7470, 7471,
               7472, 7473, 7474, 7530, 7553, 7557, 7588, 7882, 7889, 7994, 7996, 7997, 7999, 8000, 8001, 8003, 8004, 8005,
               8006, 8033, 8037, 8071, 8133, 8198, 8199, 8202, 8228, 8232, 8264, 8283, 8288, 8306, 8351, 8352, 8353, 8398,
               8402, 8404, 8463, 8465, 8466, 8467, 8469, 8486, 8497, 8515, 8529, 8531, 8533, 8553, 8554, 8564, 8582, 8583,
               8584, 8585, 8661, 8664, 8671, 8672, 8677, 8844, 8850, 8857, 8859, 9047, 9056, 9057, 9062, 9064, 9065, 9066,
               9083, 9135, 9136, 9137, 9138, 9139, 9140, 9173, 9209, 9215, 9216, 9223, 9224, 9234, 9236, 9246, 9249, 9254,
               9255, 9256, 9261, 9284, 9285, 9286, 9287, 9288, 9289, 9290, 9291, 9304, 9306, 9309, 9311, 9312, 9313, 9315,
               9338, 9342, 9346, 9351, 9483, 9505, 9508, 9530, 9551, 9552, 9553, 9597, 9830, 9864, 9915, 9946, 10036, 10047,
               10083, 10242, 10274, 10350, 10351, 10352, 10353, 10354, 10355, 10370, 10371, 10372, 10373, 10374, 10382, 10387,
               10389, 10395, 10399, 10404, 10413, 10436, 10438, 10443, 10559, 10563, 10564, 10565, 10566, 10567, 10568,
               10569, 10570, 10571, 10608, 10609, 10635, 10850, 10865, 10936, 10938, 10943, 10946, 10969, 10976, 11005, 11006,
               11013, 11082, 11083, 11139, 11287, 11288, 11367, 11420, 11429, 11430, 11488, 11506, 11507, 11508, 11511, 11512,
               11513, 11517, 11518, 11519, 11522, 11523, 11525, 11526, 11527, 11528, 11529, 11531, 11532, 11533, 11535, 11542,
               11553, 11559, 11629, 11647, 12823, 12870, 12908, 12926, 12952, 12969, 13083, 13103, 13106, 13134, 13135, 13136,
               13144, 13145, 13146, 13171, 13175, 13176, 13178, 13179, 13213, 13214, 13486, 13675, 13804, 13805, 13813, 13820,
               16055, 16056, 16057, 16058, 16059, 16097, 16102, 16103, 16109, 16147, 16148, 16149, 16157, 16158, 16159, 16160,
               16161, 16162, 16163, 16164, 16165, 16166, 16167, 16168, 16169, 16170, 16171, 16172, 16173, 16174, 16175, 16176,
               16177, 16178, 16179, 16180, 16181, 16182, 16184, 16185, 16186, 16187, 16188, 16189, 16190, 16191, 16192, 16193,
               16195, 16196, 16197, 16199, 16200, 16201, 16203, 16204, 16205, 16206, 16207, 16208, 16209, 16211, 16212, 16213,
               16214, 16215, 16216, 16217, 16218, 16219, 16220, 16221, 16222, 16224, 16225, 16226, 16227, 16228, 16229, 16230,
               16231, 16232, 16234, 16235, 16236, 16237, 16239, 16240, 16241, 16242, 16243, 16244, 16245, 16246, 16247, 16248,
               16249, 16250, 16251, 16252, 16253, 16254, 16255, 16256, 16257, 16258, 16259, 16260, 16261, 16262, 16263, 16264,
               16397, 16421, 16422, 16423, 16424, 16593, 16693, 16694, 17079, 17080, 17082, 17085, 17086, 17087, 17089, 17092,
               17104, 17105, 17121, 17123, 17124, 17125, 17127, 17128, 17134, 17135, 17472, 17500, 17506, 17507, 17541, 17545,
               17559, 17567, 17568, 17619, 17633, 17645, 17677, 17685, 17689, 17892, 17906, 18293, 18294, 18295, 18296, 18297,
               18298, 18299, 18300, 18301, 18302, 18303, 18304, 18305, 18306, 18307, 18308, 18309, 18310, 18311, 18312, 18313,
               18314, 18315, 18316, 18317, 18318, 18319, 18320, 18321, 18324, 18325, 18326, 18327, 18328, 18329, 18330, 18335,
               18336, 18337, 18342, 18346, 18347, 18348, 18349, 18353, 18355, 18360, 18361, 18362, 18363, 18364,
               18469, //concrete and rock landmasses

               3522, 4701, 4702, 4810, 4815, 4842, 4843, 4844, 4845, 4847, 4851, 4852, 4859, 4875, 4876, 4897, 4898, 5036, 5114,
               5172, 5424, 5427, 5428, 5429, 5443, 5457, 5458, 5471, 5624, 5640, 5743, 5812, 5871, 5875, 5878, 5887, 5987, 6006,
               6007, 6065, 6094, 6203, 6233, 6234, 6236, 6315, 6356, 6487, 7032, 7353, 7359, 7457, 7458, 7459, 7461, 7475, 7536,
               7537, 7579, 7582, 7616, 7998, 8002, 8007, 8008, 8072, 8091, 8200, 8459, 8460, 8461, 8462, 8468, 8532, 8654, 8655,
               8868, 8983, 9046, 9082, 9086, 9087, 9206, 9207, 9208, 9210, 9211, 9212, 9213, 9214, 9217, 9218, 9219, 9225, 9226,
               9235, 9242, 9248, 9276, 9305, 9345, 9353, 9519, 9554, 9555, 9556, 9596, 9605, 9606, 9607, 9609, 9610, 9611, 9614,
               9616, 9617, 9863, 9889, 9891, 9930, 10034, 10087, 10151, 10273, 10290, 10358, 10384, 10386, 10400, 10403, 10411, 10414,
               10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422, 10451, 10453, 10454, 10491, 10492, 10560, 10562, 10601, 10612,
               10613, 10616, 10618, 10637, 10638, 10694, 10851, 10861, 10862, 10863, 10864, 10903, 10904, 10905, 10917, 10926, 10939,
               10959, 10960, 10961, 10962, 10972, 10983, 11097, 11106, 11107, 11223, 11224, 11225, 11226, 11297, 11303, 11332, 11335,
               11340, 11362, 11363, 11364, 11408, 11509, 11510, 11514, 11515, 11516, 11520, 11521, 11524, 11530, 11537, 11538, 11539,
               11540, 11541, 11552, 11554, 11555, 11557, 11560, 11628, 12804, 12814, 12824, 12825, 12864, 12865, 12866, 12868, 12869,
               12871, 12872, 12916, 12989, 13017, 13019, 13021, 13030, 13035, 13036, 13039, 13040, 13041, 13042, 13043, 13044, 13049,
               13050, 13051, 13070, 13071, 13072, 13081, 13082, 13084, 13099, 13100, 13101, 13102, 13104, 13105, 13107, 13120, 13121,
               13122, 13123, 13124, 13125, 13126, 13147, 13148, 13149, 13150, 13156, 13157, 13158, 13163, 13165, 13167, 13172, 13177,
               13180, 13181, 13207, 13208, 13209, 13210, 13211, 13212, 13235, 13236, 13237, 13297, 13370, 13371, 13490, 13679, 13686,
               13691, 13692, 13698, 13700, 13702, 13710, 13711, 13715, 13716, 13719, 13723, 13734, 13737, 13740, 13741, 13742, 13756,
               13757, 13795, 13809, 13818, 13821, 13823, 13824, 13825, 13826, 13871, 13872, 16183, 16194, 16198, 16202, 16210, 16233,
               16238, 16684, 16685, 17075, 17081, 17083, 17084, 17088, 17090, 17091, 17093, 17094, 17095, 17096, 17097, 17098, 17099,
               17100, 17101, 17102, 17103, 17106, 17107, 17108, 17109, 17113, 17114, 17115, 17116, 17117, 17118, 17119, 17122, 17126,
               17129, 17130, 17131, 17132, 17133, 17136, 17137, 17138, 17139, 17140, 17141, 17142, 17143, 17144, 17145, 17301, 17302,
               17471, 17548, 17574, 17589, 17594, 17601, 17614, 17615, 17616, 17617, 17618, 17620, 17664, 17665, 17678, 17691, 17696,
               17864, 17865, 17866, 17877, 17878, 17880, 17881, 18231, 18322, 18323, 18331, 18332, 18333, 18334, 18338, 18339, 18340,
               18341, 18343, 18344, 18345, 18350, 18351, 18352, 18354, 18356, 18357, 18358, 18359, 18473, 18475, 18485, //grass and dirt landmasses

               955, 956, 1209, 1302, 1775, 1776, 1977, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2342,
               2353, 2354, 2355, 2420, 2425, 2427, 2429, 2438, 2453, 2647, 2663, 2683, 2702, 2703, 2767, 2768, 2769, 2814, 2821, 2823,
               2837, 2838, 2839, 2840, 2856, 2857, 2858, 2859, 2860, 2861, 2866, 2867, 2880, 2881, //food and drinks

               1426, 1428, 1436, 1437, 1464, 1465, 1466, 1467, 1469, 1470, 1471, 1473, 1474, 1475, 1476, 1477, 1519, 1521, 1656,
               1698, 2633, 3361, 3399, 3671, 3674, 3867, 4106, 4120, 4121, 4170, 4171, 4180, 4231, 4565, 4575, 4737, 4738, 4824, 4881,
               4882, 5268, 5301, 5308, 5627, 5822, 7659, 8572, 8580, 8613, 8614, 8615, 9316, 9484, 9566, 9618, 9767, 9814,
               9815, 9816, 10008, 10026, 10033, 10042, 10152, 10153, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181,
               10185, 10234, 10309, 10672, 11472, 11479, 11493, 11496, 11544, 12839, 12950, 12958, 12985, 12987, 13011, 13644, 13749, 14387,
               14394, 14395, 14407, 14409, 14410, 14411, 14414, 14416, 14596, 14874, 14877, 16082, 16322, 16649, 16651, 16661, 16731, 17904,
               18366, 18368, //Ladders,Stairs, and Scaffolding

               3268, 3271, 3277, 3279, 3280, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3400, 3401, 3786, 3787,
               3788, 3789, 3790, 3791, 3792, 3793, 3794, 3795, 3797, 3885, 16093, 16639, 16640, 16641, 16642, 16643, 16644, 16645,
               16647, 16648, 16654, 16656, 16657, 16658, 16660, 16662, 16663, 16665, 16681, 16682, //industrial Military

               918, 1217, 1218, 1222, 1244, 1676, 1686, 1985, 3057, 3267, 3426, 3472, 3525,
               3534, 3743, 3864, 3877, 6965, 7073, 7268, 7388, 7392, 8483, 8491, 8492, 8980, 9831, 9833, 10397,
               10764, 11417, 13562, 13667, 16135, 16368, 16777, 16778, 16779, 16782, //industrial Special

               1211, 1214, 1215, 1216, 1223, 1257, 1258, 1262, 1263, 1269, 1270, 1278, 1283, 1284, 1285, 1286,
               1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1306, 1307, 1308, 1315, 1319, 1340, 1341, 1342, 1346,
               1350, 1351, 1352, 1363, 1366, 1367, 1478, 1568, 1570, 1571, 2600, 3398, 3407, 3408, 3447, 3459, 3460, 3463, 3516, 3853, 3854,
               3855, 3860, 3861, 3862, 3863, 3875, 6289, 6299, 6462, //street and road items ( poles etc. )

               625, 626, 627, 628, 630, 631, 632, 633, 635, 636, 637, 638, 639, 640, 644, 646, 647, 650, 651, 653, 675, 677, 678, 679, 682,
               692, 701, 702, 728, 741, 742, 743, 753, 754, 755, 756, 757, 759, 760, 761, 762, 800, 801, 802, 803, 804, 805, 806, 808, 809,
               810, 811, 812, 813, 814, 815, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 855, 856, 857, 859, 860, 861, 862, 863,
               864, 865, 866, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 948, 949, 950, 1360, 1361, 1364, 1597, 1807, 2001, 2010, 2011,
               2194, 2195, 2203, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2250, 2251, 2252, 2253, 2254, 2345, 2811, 3409,
               3439, 3450, 3520, 3532, 3660, 3802, 3806, 3810, 3811, 4034, 4172, 4173, 4174, 4175, 4184, 4185, 4981, 4982, 4984, 4985, 4986,
               4992, 4993, 5023, 5024, 5025, 5078, 5150, 5234, 5265, 5266, 5290, 5322, 5324, 5325, 5327, 5328, 5339, 5407, 5412, 5417, 5565,
               5629, 5633, 5634, 5635, 5636, 5637, 5638, 5641, 5682, 5847, 5877, 5888, 6046, 6204, 6214, 6237, 6362, 6372, 6386, 6399, 6403,
               6421, 6430, 6431, 6444, 6499, 7095, 7595, 7662, 7884, 7952, 7953, 7954, 7986, 8319, 8321, 8617, 8619, 8623, 8660, 8679, 8825,
               8826, 8827, 8828, 8835, 8836, 8837, 8846, 8852, 8887, 8888, 8889, 8982, 8989, 8990, 8991, 9019, 9034, 9035, 9152, 9153, 9317,
               9318, 9331, 9333, 9334, 9335, 9336, 9344, 9347, 9348, 9350, 9812, 10445, 11413, 11414, 13174, 13699, 13748, 13802, 14400, 14402,
               14468, 14469, 14804, 14834, 15038, 16390, 17528, 17532, 17872, 17874, 17875, 17876, 17879, 17886, 17887, 17891, 17905, 17907, 17937,
               17938, 17939, 17941, 17942, 17947, 17958, 18011, 18012, 18013, 18014, 18015, //plants

               744, 745, 746, 747, 748, 749, 750, 751, 752, 758, 807, 816, 828, 867, 868, 879, 880, 896, 897, 898, 899, 900, 901, 905, 906,
               1207, 1303, 1304, 4816, 9044, 9045, 9743, 9744, 9745, 9746, 10166, 10984, 10985, 10986, 11498, 11556, 13023, 13635, 16104,
               16110, 16111, 16112, 16113, 16114, 16115, 16116, 16117, 16118, 16119, 16120, 16121, 16122, 16123, 16124, 16125, 16126, 16127, 16128,
               16129, 16130, 16131, 16133, 16139, 16140, 16141, 16142, 16145, 16411, 16503, 16667, 16675, 16692, 17025, 17026, 17027, 17028, 17029,
               17030, 17031, 17032, 17033, 17034, 17035, 17069, 17071, 17076, 17299, 17456, 18225, 18226, 18227, 18228, //rock

               615, 616, 617, 618, 619, 621, 622, 623, 624, 629, 634, 641, 645, 648, 649, 652, 654, 655, 656, 657, 658, 659, 660, 661, 664,
               669, 670, 671, 672, 673, 674, 676, 680, 681, 683, 685, 686, 687, 688, 689, 690, 691, 693, 694, 695, 696, 697, 698, 700, 703, 704,
               705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 729, 730, 731,
               732, 733, 734, 735, 736, 737, 738, 739, 740, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779,
               780, 781, 782, 789, 790, 791, 792, 858, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895, 904, 3505, 3506,
               3507, 3508, 3509, 3510, 3511, 3512, 3517, 16060, 16061, 18268, 18269, 18270, 18271, 18272, 18273, //trees

               1681, 1682, 1683, 2469, 2470, 2472, 2473, 2510, 2511, 2512, 2773, 2774, 2775, 2781, 2792, 2793, 2794, 2795, 2796, 2797, 3489, 3491,
               3526, 3629, 3658, 3659, 3666, 3814, 3816, 3881, 3882, 4726, 4727, 4828, 4829, 4830, 4831, 4832, 4833, 4838, 4854, 4855, 4856, 4862,
               4863, 4864, 4865, 4866, 4867, 4869, 4874, 4890, 4990, 4991, 4995, 4996, 4997, 4998, 4999, 5000, 5002, 5003, 5004, 5006, 5009, 5034,
               6973, 7153, 7978, 7981, 8038, 8171, 8172, 8240, 8247, 8249, 8251, 8253, 8281, 8343, 8344, 8350, 8354, 8355, 8356, 8357, 8550, 9241,
               10029, 10755, 10756, 10757, 10758, 10760, 10761, 10763, 10766, 10767, 10768, 10769, 10810, 10815, 10816, 10817, 10818, 10819, 11283,
               11285, 14404, 14548, 14550, 14553, 16098, 16100, 16407, 16408, 16409, 16771, //airport objects

               3448, 3493, 4032, 4232, 4597, 4598, 4638, 4639, 4640, 4641, 4642, 4697, 6387, 6971, 6997, 7010, 7184, 7244, 7245, 7419, 7488, 7984,
               8040, 8390, 8407, 8410, 8420, 8841, 9957, 10010, 10051, 10621, 10629, 10778, 10779, 10780, 10781, 10782, 10783, 10784, 10785, 10786,
               10787, 10788, 17556, 17557, 17558, //car parks

               1451, 1452, 1453, 1454, 1457, 1458, 1479, 1480, 1482, 1483, 3252, 3286, 3375, 3402, 3403, 3419, 12915, 12917, 12918, 12919, 12920,
               12921, 12922, 13002, 13206, 13367, 14871, 14873, 14875, 16108, 16388, 16389, 16404, 16405, 16406, 17000, 17009, 17010, 17011, 17039,
               17052, 17053, 17054, 17057, 17058, 17059, 17060, 17061, 17063, 17074, 17298, 17324, 17457, //farm objects

               966, 968, 969, 970, 971, 972, 973, 974, 975, 976, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993,
               994, 995, 996, 997, 998, 1250, 1251, 1282, 1374, 1407, 1408, 1410, 1411, 1412, 1413, 1414, 1418, 1419, 1422, 1423, 1424,
               1425, 1427, 1434, 1435, 1446, 1447, 1456, 1459, 1460, 1552, 1553, 1648, 1652, 1653, 1662, 2098, 2395, 2400, 2650, 2651, 2755,
               3260, 3275, 3276, 3282, 3451, 3475, 3550, 3749, 3771, 3850, 4099, 4100, 4190, 4195, 4196, 4201, 4202, 4724, 5001, 5005, 5007, 5030,
               5062, 5070, 5071, 5072, 5073, 5074, 5075, 5076, 5077, 5051, 5068, 5081, 5082, 5190, 5306, 5338, 5893, 6049, 6960, 6961, 6967, 6968,
               6969, 6970, 7022, 7026, 7028, 7029, 7030, 7031, 7033, 7034, 7038, 7039, 7191, 7192, 7196, 7197, 7198, 7209, 7210, 7212, 7223, 7224,
               7227, 7277, 7292, 7319, 7361, 7367, 7368, 7369, 7370, 7371, 7377, 7378, 7379, 7380, 7381, 7418, 7423, 7504, 7505, 7514, 7517, 7518,
               7522, 7524, 7538, 7539, 7540, 7556, 7560, 7592, 7593, 7611, 7612, 7613, 7614, 7615, 7623, 7624, 7625, 7657, 7663, 7664, 7665, 7692,
               7837, 7838, 7839, 7840, 7841, 7842, 7893, 7894, 7919, 7920, 7921, 7922, 7923, 7924, 7933, 7939, 7956, 8041, 8042, 8147, 8148, 8149,
               8150, 8151, 8152, 8153, 8154, 8155, 8165, 8167, 8173, 8174, 8175, 8176, 8177, 8178, 8185, 8186, 8187, 8188, 8189, 8194, 8206, 8207,
               8208, 8209, 8210, 8229, 8262, 8263, 8311, 8313, 8314, 8315, 8320, 8342, 8369, 8416, 8481, 8549, 8556, 8559, 8645, 8646, 8647, 8648,
               8649, 8650, 8651, 8652, 8653, 8656, 8657, 8658, 8659, 8662, 8673, 8674, 8680, 8681, 8682, 8683, 8684, 8685, 8686, 8869, 8871, 9029,
               9030, 9031, 9032, 9033, 9041, 9292, 9293, 9294, 9295, 9296, 9297, 9298, 9330, 9332, 9337, 9339, 9340, 9343, 9349, 9482, 9608, 9893,
               10252, 10396, 10402, 10437, 10442, 10611, 10682, 10683, 10806, 10807, 10808, 10809, 10835, 10836, 10874, 10875, 10885, 10889, 10890,
               11014, 11091, 11238, 11239, 11240, 11241, 11242, 11243, 11247, 11438, 11452, 11473, 11474, 11499, 11551, 11567, 11568, 11571, 11607,
               11623, 12848, 12858, 12933, 13016, 13018, 13024, 13045, 13096, 13097, 13098, 13118, 13153, 13336, 13438, 13445, 13663, 13665, 13705,
               14464, 14459, 14843, 14856, 14883, 16016, 16017, 16018, 16019, 16020, 16022, 16052, 16094, 16136, 16281, 16293, 16294, 16295, 16296,
               16297, 16298, 16299, 16300, 16312, 16313, 16315, 16320, 16321, 16324, 16369, 16370, 16627, 16628, 16629, 16630, 16631, 16632, 16633,
               16634, 16635, 16636, 16638, 16664, 16668, 16669, 16670, 16671, 16683, 17510, 18074, 18202, 18216, 18218, 18219, 18220, 18221, 18222,
               18223, 18224, 18255, 18276, 18277, 18278, 18279, 18280, 18281, 18286, 18287, 18288, 18289, 18290, 18291, 18292, 18432, 18433, 18434,
               18440, 18441, 18442, 18443, 18444, 18445, 18446, //Fences, Walls, Gates, and Barriers

               3187, 3359, 3458, 3627, 4199, 4892, 5401, 5409, 5774, 5853, 6909, 6910, 7520, 7971, 8947, 8954, 9169, 9171, 9321, 9899, 10282, 10789,
               11292, 11326, 11387, 11388, 11389, 11390, 11391, 11392, 11393, 11480, 11494, 11504, 11505, 11547, 12853, 13296, 14776, 14783, 14796,
               14797, 14798, 14826, 14876, 16107, 16360, 16362, 16477, 17036, 17037, 17064, 17065, 17852,
               17950, 18232, 18283, 18284, 18452, 18474, //Structure Garages and Petrol Stations

               1245, 1503, 1631, 1632, 1633, 1634, 1655, 1660, 1696, 1697, 1894, 2931, 3269, 3270, 3363, 3364, 3625, 3663, 3664, 3665, 3852, 5152,
               5153, 6052, 7979, 7980, 16401, 8302, 8375, 12914, 12956, 13590, 13593, 13604, 13636, 13638, 13640, 13643, 13645,
               13648, 16077, 16084, 16085, 16134, 16302, 16303, 16304, 16305, 16317, 16367, 17565, 18262, 18367, 18451, 18565, 18566, 18567, 18568,
               18569, 18609, //ramps

               4817, 4818, 4819, 4853, 4884, 4885, 5064, 5117, 5118, 5119, 5127, 5272, 5275, 5277, 5347, 5396, 5398, 5399, 5477, 5478, 5479, 5480,
               5513, 5674, 5679, 5772, 5773, 6248, 6249, 6250, 6251, 6252, 6290, 6292, 6501, 6502, 6912, 6913, 6914, 6915, 6916, 6917, 6980, 6981,
               6982, 6983, 6984, 7498, 7499, 7500, 7501, 7502, 7503, 8538, 8539, 8540, 8541, 8542, 8586, 8587, 8588, 8624, 8625, 8626, 8627, 8628,
               8629, 8630, 8631, 8632, 8633, 8634, 8635, 8858, 8860, 9164, 9165, 9166, 9167, 9168, 9705, 10752, 10927, 10931, 10933, 10934, 10935,
               11101, 11228, 11229, 11230, 11231, 11232, 11464, 11465, 11466, 11467, 11468, 12831, 12832, 12833, 12835, 12836, 12837, 12838, 13312,
               13491, 16024, 16025, 16026, 16027, 16028, 16029, 16030, 16031, 16032, 16033, 16034, 16035, 16036, 16156, 17283, 17284, 17285, 17286,
               17287, 17288, 17289, 17290, 17291, 17292, 17296, 17297, //Railroads

               3330, 3331, 3381, 3411, 3412, 3990, 3991, 3992, 3993, 3994, 3995, 3996, 4085, 4086, 4087, 4088, 4089, 4090, 4091, 4107, 4108, 4125,
               4127, 4128, 4129, 4131, 4133, 4139, 4142, 4144, 4146, 4148, 4150, 4152, 4154, 4156, 4158, 4160, 4163, 4165, 4168, 4182, 4203, 4207,
               4209, 4233, 4553, 4557, 4567, 4589, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4656, 4658, 4660, 4662, 4664,
               4666, 4679, 4692, 4694, 4695, 4710, 4807, 4808, 4809, 4820, 4821, 4822, 4823, 4827, 4834, 4835, 4836, 4837, 4839, 4840, 4841, 4846,
               4868, 4870, 4871, 4872, 4878, 4895, 5013, 5021, 5026, 5028, 5038, 5046, 5052, 5106, 5112, 5113, 5120, 5121, 5124, 5125, 5128, 5133,
               5141, 5147, 5149, 5178, 5188, 5191, 5250, 5271, 5276, 5296, 5297, 5298, 5314, 5329, 5330, 5333, 5349, 5353, 5391, 5394, 5395, 5411,
               5431, 5432, 5433, 5434, 5435, 5436, 5437, 5438, 5439, 5440, 5441, 5442, 5456, 5469, 5470, 5472, 5473, 5481, 5482, 5483, 5484, 5485,
               5486, 5487, 5488, 5489, 5490, 5491, 5492, 5493, 5494, 5495, 5496, 5497, 5498, 5499, 5500, 5501, 5502, 5503, 5504, 5505, 5506, 5507,
               5508, 5509, 5510, 5511, 5512, 5528, 5650, 5668, 5703, 5707, 5744, 5745, 5746, 5747, 5748, 5749, 5750, 5751, 5752, 5753, 5754, 5755,
               5756, 5757, 5758, 5759, 5793, 5794, 5795, 5796, 5797, 5798, 5799, 5800, 5801, 5802, 5803, 5804, 5805, 5806, 5807, 5808, 5809, 5859,
               5860, 5861, 5862, 5866, 5994, 5995, 6035, 6054, 6055, 6111, 6112, 6113, 6114, 6115, 6116, 6117, 6118, 6119, 6120, 6121, 6122, 6123,
               6124, 6125, 6126, 6127, 6128, 6129, 6225, 6231, 6235, 6291, 6301, 6302, 6303, 6304, 6305, 6306, 6307, 6308, 6309, 6310, 6311, 6314,
               6316, 6317, 6318, 6319, 6320, 6321, 6322, 6323, 6324, 6325, 6326, 6327, 6329, 6330, 6331, 6333, 6341, 6345, 6427, 6428, 6448, 6449,
               6450, 6507, 6508, 6509, 6876, 6877, 6878, 6879, 6880, 6881, 6886, 6887, 6888, 6897, 6898, 6899, 6900, 6945, 6948, 6949, 6950, 6951,
               6952, 6953, 6956, 6974, 6990, 6991, 6999, 7036, 7041, 7042, 7043, 7052, 7053, 7054, 7055, 7056, 7057, 7064, 7069, 7320, 7321, 7324,
               7326, 7327, 7334, 7335, 7336, 7337, 7355, 7362, 7364, 7383, 7427, 7428, 7429, 7430, 7431, 7432, 7433, 7434, 7435, 7436, 7437, 7438,
               7439, 7440, 7441, 7442, 7443, 7444, 7445, 7446, 7447, 7476, 7477, 7478, 7479, 7480, 7481, 7482, 7483, 7484, 7485, 7486, 7544, 7545,
               7546, 7547, 7548, 7549, 7550, 7551, 7552, 7558, 7559, 7580, 7581, 7587, 7589, 7590, 7605, 7629, 7631, 7632, 7633, 7634, 7729, 7730,
               7731, 7755, 7849, 7852, 7854, 7863, 7864, 7865, 7866, 7867, 7868, 7878, 7881, 7938, 7945, 7963, 7965, 7967, 7969, 7987, 7988, 7989,
               7990, 7991, 7992, 7993, 7995, 8009, 8010, 8036, 8039, 8045, 8046, 8047, 8048, 8049, 8050, 8051, 8052, 8053, 8054, 8055, 8056, 8070,
               8080, 8128, 8135, 8137, 8212, 8213, 8214, 8215, 8216, 8217, 8218, 8219, 8236, 8244, 8245, 8246, 8256, 8290, 8305, 8368, 8377, 8380,
               8382, 8383, 8386, 8388, 8438, 8439, 8440, 8441, 8442, 8443, 8444, 8445, 8446, 8447, 8448, 8449, 8450, 8451, 8452, 8453, 8454, 8455,
               8456, 8457, 8458, 8471, 8472, 8473, 8474, 8475, 8476, 8477, 8510, 8511, 8512, 8514, 8517, 8518, 8519, 8520, 8521, 8522, 8523, 8524,
               8525, 8543, 8552, 8561, 8562, 8609, 8610, 8611, 8612, 8616, 8622, 8637, 8638, 8824, 8832, 8838, 8932, 9000, 9001, 9002, 9003, 9004,
               9005, 9006, 9007, 9008, 9021, 9022, 9023, 9024, 9025, 9026, 9027, 9028, 9036, 9042, 9115, 9116, 9117, 9118, 9119, 9120, 9150, 9205,
               9222, 9231, 9232, 9233, 9250, 9251, 9252, 9262, 9264, 9265, 9266, 9267, 9269, 9476, 9485, 9486, 9487, 9488, 9489, 9490, 9491, 9492,
               9493, 9570, 9571, 9575, 9591, 9600, 9601, 9602, 9603, 9652, 9653, 9683, 9685, 9689, 9690, 9693, 9694, 9696, 9699, 9700, 9701, 9702,
               9703, 9704, 9706, 9707, 9708, 9709, 9710, 9711, 9712, 9713, 9714, 9715, 9716, 9717, 9718, 9719, 9720, 9721, 9722, 9723, 9724, 9725,
               9726, 9727, 9728, 9729, 9730, 9731, 9732, 9733, 9734, 9735, 9736, 9747, 9827, 9832, 9837, 9838, 10018, 10065, 10066, 10067, 10068, 10069,
               10070, 10071, 10072, 10073, 10074, 10075, 10076, 10077, 10078, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120,
               10121, 10122, 10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10165,
               10235, 10247, 10275, 10276, 10294, 10295, 10296, 10359, 10360, 10361, 10362, 10363, 10364, 10365, 10367, 10424, 10426, 10440, 10448, 10449,
               10450, 10452, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462, 10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472,
               10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482, 10483, 10484, 10485, 10486, 10487, 10488, 10489, 10490, 10493, 10614,
               10617, 10636, 10639, 10649, 10750, 10751, 10753, 10754, 10759, 10770, 10777, 10790, 10791, 10792, 10820, 10821, 10822, 10823, 10848, 10849,
               10852, 10854, 10855, 10857, 10858, 10859, 10860, 10866, 10867, 10868, 10869, 10870, 10928, 10929, 10930, 10937, 10940, 10958, 10967, 10968,
               10970, 10971, 11003, 11071, 11072, 11073, 11074, 11075, 11076, 11077, 11078, 11079, 11080, 11084, 11094, 11095, 11096, 11098, 11100, 11104,
               11105, 11110, 11111, 11112, 11113, 11114, 11115, 11116, 11117, 11118, 11119, 11120, 11121, 11122, 11123, 11124, 11125, 11126, 11127, 11128,
               11129, 11130, 11131, 11132, 11133, 11134, 11135, 11136, 11137, 11138, 11252, 11253, 11254, 11255, 11256, 11257, 11258, 11259, 11260, 11261,
               11299, 11302, 11308, 11345, 11351, 11365, 11386, 11409, 11421, 11462, 12800, 12801, 12802, 12803, 12806, 12809, 12810, 12811, 12812, 12813,
               12815, 12816, 12817, 12818, 12819, 12820, 12826, 12827, 12828, 12829, 12830, 12851, 12852, 12856, 12857, 12867, 12873, 12874, 12875, 12876,
               12877, 12878, 12879, 12880, 12881, 12882, 12883, 12884, 12885, 12886, 12887, 12888, 12889, 12890, 12891, 12892, 12893, 12894, 12895, 12896,
               12897, 12898, 12899, 12900, 12901, 12902, 12903, 12904, 12905, 12906, 12907, 12909, 12910, 12965, 12966, 12967, 12968, 12970, 12971, 12972,
               12973, 12974, 12975, 12992, 12993, 12994, 12995, 12996, 12997, 12998, 12999, 13000, 13001, 13020, 13033, 13034, 13038, 13058, 13088, 13092,
               13095, 13119, 13127, 13128, 13129, 13138, 13139, 13141, 13142, 13168, 13169, 13170, 13173, 13321, 13323, 13324, 13325, 13332, 13342, 13345,
               13347, 13348, 13349, 13368, 13422, 13470, 13626, 13652, 13655, 13664, 13672, 13673, 13674, 13676, 13677, 13678, 13680, 13682, 13683, 13684,
               13685, 13688, 13689, 13690, 13693, 13703, 13704, 13706, 13707, 13708, 13709, 13713, 13717, 13718, 13720, 13726, 13727, 13730, 13732, 13733,
               13735, 13736, 13738, 13739, 13751, 13752, 13784, 13789, 13814, 13845, 13865, 13882, 13887, 16037, 16266, 16357, 16358, 16384, 16430, 16571,
               16610, 17002, 17003, 17004, 17043, 17062, 17077, 17078, 17110, 17111, 17112, 17120, 17146, 17148, 17150, 17152, 17154, 17156, 17158, 17160,
               17162, 17164, 17166, 17168, 17170, 17172, 17174, 17176, 17178, 17180, 17182, 17184, 17186, 17188, 17190, 17192, 17194, 17196, 17198, 17200,
               17202, 17204, 17208, 17210, 17212, 17214, 17216, 17218, 17220, 17222, 17224, 17226, 17228, 17230, 17232, 17234, 17236, 17238, 17240, 17242,
               17244, 17246, 17248, 17250, 17252, 17254, 17256, 17258, 17260, 17262, 17267, 17269, 17271, 17273, 17275, 17277, 17279, 17281, 17293, 17294,
               17295, 17300, 17303, 17305, 17307, 17308, 17309, 17310, 17326, 17327, 17329, 17331, 17333, 17334, 17501, 17502, 17525, 17550, 17561, 17576,
               17595, 17596, 17597, 17598, 17599, 17600, 17602, 17603, 17604, 17605, 17606, 17607, 17608, 17609, 17610, 17611, 17612, 17613, 17621, 17622,
               17623, 17624, 17625, 17626, 17627, 17628, 17629, 17630, 17631, 17632, 17634, 17635, 17637, 17638, 17639, 17640, 17641, 17642, 17643, 17644,
               17646, 17647, 17648, 17649, 17650, 17651, 17652, 17653, 17654, 17655, 17656, 17657, 17658, 17659, 17660, 17661, 17662, 17663, 17666, 17667,
               17668, 17669, 17670, 17671, 17672, 17673, 17674, 17675, 17676, 17680, 17681, 17682, 17683, 17684, 17686, 17687, 17692, 17693, 17695, 17829,
               17849, 17867, 17920, 17921, 17927, 17936, 17968, 18229, 18256, 18369, 18370, 18371, 18372, 18373, 18374, 18375, 18376, 18377, 18378, 18379,
               18380, 18381, 18382, 18383, 18384, 18385, 18386, 18387, 18388, 18389, 18390, 18391, 18392, 18393, 18394, 18449, 18450, 18561 //roads
               :
               {
                 return 1;
               }
               default:return 0;
       }
       return 0;
}

public IsValidVehicleModelID( modelid )
{
       switch( modelid )
       {
               case 581, 523, 462, 521, 463, 522, 461, 448, 468, 586, 509, 481, 510, 472, 473, 493, 595, 484, 430, 453,
               452, 446, 454, 445, 602, 416, 485, 568, 429, 433, 499, 424, 536, 496, 504, 422, 609, 498, 401, 575, 518,
               402, 541, 482, 431, 438, 457, 527, 483, 524, 415, 542, 589, 437, 532, 480, 596, 599, 597, 598, 578, 486,
               507, 562, 585, 427, 419, 587, 490, 528, 533, 544, 407, 565, 455, 530, 526, 466, 604, 492, 474, 588, 434,
               502, 503, 494, 579, 545, 411, 546, 559, 508, 571, 400, 403, 517, 410, 551, 500, 418, 572, 423, 414, 516,
               582, 467, 443, 470, 404, 514, 603, 600, 413, 426, 436, 547, 489, 441, 594, 564, 515, 479, 534, 432, 505,
               442, 440, 475, 543, 605, 495, 567, 428, 405, 535, 458, 580, 439, 561, 409, 560, 506, 601, 574, 566, 549,
               420, 459, 576, 525, 531, 408, 583, 451, 558, 552, 540, 491, 412, 478, 421, 529, 456, 554, 477, 548, 425,
               417, 487, 497, 563, 501, 465, 447, 469, 488, 406, 573, 444, 556, 557, 592, 577, 511, 512, 593, 520, 553,
               464, 476, 519, 460, 513, 539, 471, 435, 450, 591, 606, 607, 610, 584, 608, 611, 590, 449:
               {
                    return 1;
               }
               default:return 0;
       }
       return 0;
}


public SetPlayerAuthLevel( playerid, authid, auth, announce )
{
       if( IsPlayerAdmin( playerid ) == 0 )
       {
           if( announce )
           {
               SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           }
           return 0;
       }

       if( IsPlayerConnected( authid ) == 0 )
       {
           if( announce )
           {
               SendClientMessage( playerid, COLOR_RED, "Invalid player id!" );
           }
           return 0;
       }

       if( !udb_Exists( GetPlayerCaption( authid ) ) )
       {
           if( announce )
           {
               new szMsg[ 256 ];
               format( szMsg, sizeof( szMsg ), "Account for player '%s' does not exist!", GetPlayerCaption( authid ) );
               SendClientMessage( playerid, COLOR_RED, szMsg );
           }
           return 0;
       }

       if( IsAuth[ authid ] == 0 )
       {
           if( announce )
           {
               new szMsg[ 256 ];
               format( szMsg, sizeof( szMsg ), "Player '%s' not logged in!", GetPlayerCaption( authid ) );
               SendClientMessage( playerid, COLOR_RED, szMsg );
           }
           return 0;
       }

       AuthLevel[ authid ] = auth;
       dUserSetINT( GetPlayerCaption( authid ) ).( "auth", AuthLevel[ authid ] );

       if( announce )
       {
           new szMsg[ 256 ];
           format( szMsg, sizeof( szMsg ), "Auth for player '%s' set to %i", GetPlayerCaption( authid ), AuthLevel[ authid ] );
           SendClientMessage( playerid, COLOR_GREEN, szMsg );
       }

       return 1;
}

public GetPlayerAuthLevel( playerid )
{
       if( IsPlayerConnected( playerid ) == 0 )
       {
           return 0;
       }

       if( !udb_Exists( GetPlayerCaption( playerid ) ) )
       {
           return 0;
       }

       if( IsAuth[ playerid ] == 0 )
       {
           return 0;
       }

       AuthLevel[ playerid ] = dUserINT( GetPlayerCaption( playerid ) ).( "auth" );
       return AuthLevel[ playerid ];
}

public GetNumberOfPlayers( )
{
       new b = 0;
       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( IsPlayerConnected( i ) == 1 )
            {
                b++;
            }
       }
       return b;
}

public IsPlayerDriver(playerid)
{
       if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
       {
             return 1;
       }
       return 0;
}

public IsPlayerPassenger(playerid)
{
       if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
       {
             return 1;
       }
       return 0;
}

public IsPlayerOnFoot(playerid)
{
       if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
       {
             return 1;
       }
       return 0;
}

public Float:GetDistanceBetweenPlayers(p1,p2)
{
      new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
      GetPlayerPos(p1,x1,y1,z1);
      GetPlayerPos(p2,x2,y2,z2);
      return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}

public RegisterPlayer( playerid, password[] )
{
       if( IsAuth[ playerid ] == 1 )
       {
           SendClientMessage( playerid, COLOR_RED, "You're already logged in!" );
           return 0;
       }

       if( udb_Exists( GetPlayerCaption( playerid ) ) )
       {
          SendClientMessage( playerid, COLOR_RED, "Account already exists, please use '/login password'." );
          return 0;
       }

       if( strlen( password ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "INVALID PASSWORD" );
           return 0;
       }

       if( !udb_Create( GetPlayerCaption( playerid ), password ) )
       {
           SendClientMessage( playerid, COLOR_RED, "Account create failed, contact the systems administrator." );
           return 0;
       }
       else
       {
           SendClientMessage( playerid, COLOR_GREEN, "Account successfully created. Login with '/login password' now." );

           dUserSetINT( GetPlayerCaption( playerid ) ).( "banned", 0 ); //unban account
           dUserSetINT( GetPlayerCaption( playerid ) ).( "auth", 0 ); //unban account

           return 1;
       }

       return 0;
}

public LoginToServer( playerid, password[] )
{
       if( IsAuth[ playerid ] == 1 )
       {
           SendClientMessage( playerid, COLOR_RED, "You're already logged in!" );
           return 0;
       }

       if( !udb_Exists( GetPlayerCaption( playerid ) ) )
       {
          SendClientMessage( playerid, COLOR_RED, "Account doesn't exist, please use '/register password'." );
          return 0;
       }

       if( strlen( password ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "INVALID PASSWORD" );
           return 0;
       }

    if( udb_CheckLogin( GetPlayerCaption( playerid ), password ) )
    {
        SendClientMessage( playerid, COLOR_LIGHTBLUE, "Login Success!" );
        IsAuth[ playerid ] = 1;
        IsWarned[ playerid ] = 0;
        AuthLevel[ playerid ] = GetPlayerAuthLevel( playerid );
        GetLocationsFromSaveFile( playerid );

        new save_skin = dUserINT( GetPlayerCaption( playerid ) ).( "skin" );
        PlayerMaxObjects[ playerid ] = dUserINT( GetPlayerCaption( playerid ) ).( "max_obj" );

        if( save_skin != 0 )
        {
            SendClientMessage( playerid, COLOR_GREEN, "Saved skin restored, to use another skin type '/ssel'!" );
            SetPlayerSkin( playerid, save_skin - 1 );
        }
        else
        {
            SendClientMessage( playerid, COLOR_ORANGE, "No saved skin data found! use '/ssel' to choose one!" );
        }

        if( PlayerMaxObjects[ playerid ] > 0 )
        {
            new szObj[ 256 ];
            format( szObj, sizeof( szObj ), "Maximum objects restored to %i", PlayerMaxObjects[ playerid ] );
            SendClientMessage( playerid, COLOR_YELLOW, szObj );
        }

        if( AuthLevel[ playerid ] > 0 )
        {
            new szMsg[ 256 ];
            format( szMsg, sizeof( szMsg ), "Your auth level is: %i", AuthLevel[ playerid ] );
            SendClientMessage( playerid, COLOR_YELLOW, szMsg );
        }

        return 1;
    }
    else
    {
        SendClientMessage( playerid, COLOR_RED, "Login failed!" );
        return 0;
    }

    return 0;
}

public ChangePassword( playerid, newpass[], a )
{
       if( !udb_Exists( GetPlayerCaption( playerid ) ) )
       {
          SendClientMessage( playerid, COLOR_RED, "Account doesn't exist, please use '/register password'." );
          return 0;
       }

       if( strlen( newpass ) < 3 )
       {
           SendClientMessage( playerid, COLOR_RED, "Password too short!" );
           return 0;
       }

       if( IsAuth[ playerid ] == 0 )
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "Login first!" );
           return 0;
       }

       new newhash = udb_hash( newpass );
       dUserSetINT( GetPlayerCaption( playerid ) ).( "password_hash", newhash );

       if( dUserINT( GetPlayerCaption( playerid ) ).( "password_hash" ) == newhash )
       {
           if( a )
           {
               new szMsg[ 256 ];
               format( szMsg, sizeof( szMsg ), "Password changed to '%s'!", newpass );
               SendClientMessage( playerid, COLOR_YELLOW, szMsg );
           }
           return 1;
       }
       else
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "Error writing to the database!" );
       }

       return 0;
}

public SavePlayerStats( playerid )
{
       printf( "SavePlayerStats( %i )", playerid );
}

public substr(const string[], const substr[] )
{
       new found_str = strfind( string, substr );
          new szRet[ 256 ];

          if( found_str )
          {
                 strmid( szRet, string, found_str + 1, strlen( string ) );
       }
          return szRet;
}

public InterpCommand( cmdtext[], index )
{
       return strtok( cmdtext, index );
}

public SendMessageToTeam( teamid, color, msg[ ] )
{
       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( gTeam[ i ] == teamid )
            {
                SendClientMessage( i, color, msg );
            }
       }
}

public IsPlayerInRange(playerid, Float: Range, Float: Z_Range, Float:tar_x, Float:tar_y, Float:tar_z)
{
       new Float:player_x, Float:player_y, Float:player_z;
       GetPlayerPos(playerid, player_x, player_y, player_z);
       if( player_x <= ( Range + tar_x )
           && player_y <= ( Range + tar_y )
           && player_z <= ( Z_Range + tar_z )
           )
       {
           return 1;
       }
       return 0;
}

public IsStr( cmd[], str[] )
{
       if( strcmp( cmd, str ) == 0 )return 1;
       return 0;
}

public GetMoneyFraction( playerid, fract )
{
       return GetPlayerMoney( playerid ) / fract;
}

public AdjustGrav( playerid, Float:grav )
{
       if( IsPlayerAdmin( playerid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           return 0;
       }
       SetGravity( grav );

       new szGrav[ 256 ];
       format( szGrav, sizeof( szGrav ), "Gravity set to %f by %s", grav, GetPlayerCaption( playerid ) );
       SendClientMessageToAll( COLOR_YELLOW, szGrav );
       return 1;
}

public RestoreGrav( playerid )
{
       if( IsPlayerAdmin( playerid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           return 0;
       }
       SetGravity( 0.008 );
       SendClientMessageToAll( COLOR_YELLOW, "Gravity restored to default ( 0.008 )" );
       return 1;
}

public AdjustTime( playerid, time )
{
       if( IsPlayerAdmin( playerid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           return 0;
       }

       new szTime[ 256 ];
       format( szTime, sizeof( szTime ), "Time set to %i by %s.", time, GetPlayerCaption( playerid ) );
       SetWorldTime( time );
       SendClientMessageToAll( COLOR_YELLOW, szTime );
       return 1;
}

public SpawnVehicle( playerid, vid )
{
       if( IsPlayerAdmin( playerid ) == 0 && GetPlayerAuthLevel( playerid ) <= 1 )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           return 0;
       }

       if( !IsValidVehicleModelID( vid ) )
       {
           SendClientMessage( playerid, COLOR_RED, "INVALID VEHICLE ID" );
           return 0;
       }

       new Float:x, Float:y, Float:z;
       new Float:new_y;
       GetPlayerPos( playerid, x, y, z );
       new_y = ( y + 10.0 );
       new vehicleid = CreateVehicle( vid, x, new_y, z, 72.0, COLOR_WHITE, COLOR_WHITE, 110 );

       if( IsPlayerInAnyVehicle( playerid ) == 0 )
       {
           PutPlayerInVehicle( playerid, vehicleid, 0 );
       }

       if( TotalVehicles >= MAX_VEHICLES )
       {
           SendClientMessage( playerid, COLOR_RED, "Too many vehicles!" );
           return 0;
       }

       TotalVehicles++;

       new szRide[ 256 ];
       format( szRide, sizeof( szRide ), "Car model: %i - number: %i spawned by %s.", vid, TotalVehicles, GetPlayerCaption( playerid ) );
       SendClientMessageToAll( COLOR_YELLOW, szRide );

       return 1;
}

public KillUser( playerid, deathid )
{
       if( IsPlayerAdmin( playerid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           return 0;
       }

       new szDie[ 256 ];
       format( szDie, sizeof( szDie ), "%s killed by admin %s.", GetPlayerCaption( deathid ), GetPlayerCaption( playerid ) );
       SetPlayerHealth( deathid, 0 );
       SendClientMessageToAll( COLOR_RED, szDie );
       return 1;
}

public BanAccount( playerid, banid )
{

       if( IsPlayerAdmin( playerid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           return 0;
       }

       if( IsPlayerConnected( banid ) == 1 )
       {
           SendClientMessage( playerid, COLOR_RED, "Invalid player id." );
           return 0;
       }

       if( udb_Exists( GetPlayerCaption( playerid ) ) )
       {
           dUserSetINT( GetPlayerCaption( playerid ) ).( "banned", 1 );
       }

       new szBan[ 256 ];
       format( szBan, sizeof( szBan ), "%s was banned by admin %s.", GetPlayerCaption( banid ), GetPlayerCaption( playerid ) );
       SendClientMessageToAll( COLOR_YELLOW, szBan );

       Ban( playerid );
       Kick( playerid );

       return 1;
}

public SetObjectToFaceCords(objectid, Float:x1,Float:y1,Float:z1)
{
       new Float:x2,Float:y2,Float:z2;
       GetObjectPos(objectid, x2,y2,z2);
          new Float:DX = floatabs(x2-x1);
          new Float:DY = floatabs(y2-y1);
          new Float:DZ = floatabs(z2-z1);
       new Float:yaw = 0;
       new Float:pitch = 0;
          if(DY == 0 || DX == 0)
          {
                if(DY == 0 && DX > 0)
             {
                      yaw = 0;
                        pitch = 0;
             }
             else if(DY == 0 && DX < 0)
             {
                  yaw = 180;
                  pitch = 180;
             }
                   else if(DY > 0 && DX == 0)
             {
                  yaw = 90;
                  pitch = 90;
             }
             else if(DY < 0 && DX == 0)
             {
                  yaw = 270;
                  pitch = 270;
             }
             else if(DY == 0 && DX == 0)
             {
                  yaw = 0;
                  pitch = 0;
             }
       }
          else
          {
                 yaw = atan(DX/DY);
                 pitch = atan(floatsqroot(DX*DX + DZ*DZ) / DY);
                 if(x1 > x2 && y1 <= y2)
           {
                 yaw = yaw + 90;
                 pitch = pitch - 45;
           }
           else if(x1 <= x2 && y1 < y2)
           {
                yaw = 90 - yaw;
                pitch = pitch - 45;
           }
           else if(x1 < x2 && y1 >= y2)
           {
                yaw = yaw - 90;
                pitch = pitch - 45;
           }
           else if(x1 >= x2 && y1 > y2)
           {
                yaw = 270 - yaw;
                pitch = pitch + 315; }
                if(z1 < z2)pitch = 360-pitch;
           }
           SetObjectRot(objectid, 0, 0, yaw);
           SetObjectRot(objectid, 0, pitch, yaw);
}

public DeleteAllObjects( playerid )
{
       if( IsPlayerAdmin( playerid ) == 0 && GetPlayerAuthLevel( playerid ) <= 5 )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN/TRUSTED ONLY" );
           return 0;
       }

       for( new b = 0; b < MAX_PLAYERS; b++ )
       {
            for( new i = 0; i < MAX_OBJECTS; i++ )
            {
                 if( IsObjectOwner( b, i ) == 1 )
                 {
                     DestroyObject( i );
                     SetObjectOwner( b, i, 0 );
                 }
            }
       }

       new szMsg[ 256 ];
       format( szMsg, sizeof( szMsg ), "All objects deleted by %s!", GetPlayerCaption( playerid ) );
       SendClientMessageToAll( COLOR_YELLOW, szMsg );
       return 1;
}


public DeleteAllUserObjects( playerid )
{
       for( new i = 0; i < MAX_OBJECTS; i++ )
       {
            if( IsValidObject( i ) == 1 )
            {
                if( IsObjectOwner( playerid, i ) == 1 )
                {
                    DestroyObject( i );
                    SetObjectOwner( playerid, i, 0 );
                }
            }
       }
       return 1;
}

public GetUserObjects( playerid )
{
       new b = 0;
       for( new i = 0; i < MAX_OBJECTS; i++ )
       {
            if( UserObjects[ playerid ][ i ][ 0 ] == 1 )
            {
                b++;
            }
       }
       return b;
}

public GetLastUserObject( playerid )
{
       new high = 0;
       for( new i = 0; i < MAX_OBJECTS; i++ )
       {
            if( IsObjectOwner( playerid, i ) == 1 )
            {
                if( i > high )
                {
                    high = i;
                }
            }
       }
       return high;
}

public SetObjectOwner( playerid, objectid, owned )
{
       UserObjects[ playerid ][ objectid ][ 0 ] = owned;
}

public IsObjectOwner( playerid, objectid )
{
       return UserObjects[ playerid ][ objectid ][ 0 ];
}

public GetTotalObjects( )
{
       new b = 0;
       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            for( new c = 0; c < MAX_OBJECTS; c++ )
            {
                 if( IsObjectOwner( i, c ) == 1 )
                 {
                     b++;
                 }
            }
       }
       return b;
}

public DeleteSingleObject( playerid, objectid, a )
{
       if( IsPlayerAdmin( playerid ) == 0 && GetPlayerAuthLevel( playerid ) <= 1 )
       {
           if(a)SendClientMessage( playerid, COLOR_RED, "ADMIN/TRUSTED ONLY" );
           return 0;
       }

       if( IsObjectOwner( playerid, objectid ) == 1 )
       {
           if( GetUserObjects( playerid ) > 0 )
           {
               SetObjectOwner( playerid, objectid, 0 );
           }
           DestroyObject( objectid );

           new szMsg[ 256 ];
           format( szMsg, sizeof( szMsg ), "Object %i  deleted by %s", objectid, GetPlayerCaption( playerid ) );
           if( a )SendClientMessageToAll( COLOR_YELLOW, szMsg );

           return 1;
       }
       else
       {
           if(a)SendClientMessage( playerid, COLOR_RED, "Invalid object id." );
           return 0;
       }

       return 1;
}

public SpawnObject( playerid, modelid )
{
       return SpawnObjectZ( playerid, modelid, 0.0 );
}

public SpawnObjectZ( playerid, modelid, Float:Z )
{
       if( IsPlayerAdmin( playerid ) == 0 && GetPlayerAuthLevel( playerid ) <= 1 )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN/TRUSTED ONLY" );
           return 0;
       }

       if( IsPlayerAdmin( playerid ) == 0 && GetUserObjects( playerid ) >= PlayerMaxObjects[ playerid ] )
       {
           new szMsg[ 256 ];
           format( szMsg, sizeof( szMsg ), "You can spawn a maximum of %i objects, consult an admin for more privledges.", PlayerMaxObjects[ playerid ] );
           SendClientMessage( playerid, COLOR_RED, szMsg );
           return 0;
       }

       if( GetTotalObjects( ) >= MAX_OBJECTS )
       {
           SendClientMessage( playerid, COLOR_RED, "Too many objects on the map!" );
           return 0;
       }

       if( IsValidObjectModel( modelid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "Invalid or unsafe model id!" );
           return 0;
       }

       new Float:SpawnRotZ;

       if( IsPlayerDriver( playerid ) == 0 )
       {
           new Float:PlayerX, Float:PlayerY, Float:PlayerZ;
           GetPlayerPos( playerid, PlayerX, PlayerY, PlayerZ );
           GetPlayerFacingAngle( playerid, SpawnRotZ );
           SetObjectOwner( playerid, CreateObject( modelid, PlayerX, PlayerY, PlayerZ + Z, 0.0, 0.0, SpawnRotZ ), 1 );
           SetPlayerPos( playerid, PlayerX, PlayerY, PlayerZ + 10.0 );
           printf( "Object Spawned( model %i - x[%f] - y[%f] - z[%f] - rot[%f]", modelid, PlayerX, PlayerY, PlayerZ, SpawnRotZ );
       }
       else if( IsPlayerDriver( playerid ) == 1 )
       {
            new Float:CarX, Float:CarY, Float:CarZ;
            GetVehiclePos( GetPlayerVehicleID( playerid ), CarX, CarY, CarZ );
            GetVehicleZAngle( GetPlayerVehicleID( playerid ), SpawnRotZ );
            SetObjectOwner( playerid, CreateObject( modelid, CarX, CarY, CarZ + Z, 0.0, 0.0, SpawnRotZ ), 1 );
            SetVehiclePos( GetPlayerVehicleID( playerid ), CarX, CarY, CarZ + 10.0 );
            printf( "Object Spawned( model %i - x[%f] - y[%f] - z[%f] - rot[%f]", modelid, CarX, CarY, CarZ, SpawnRotZ );
       }
       
       

       new szMsg[ 256 ];
       format( szMsg, sizeof( szMsg ), "Model %i ( Object %i ) spawned by %s.", modelid, GetLastUserObject( playerid ), GetPlayerCaption( playerid ) );
       SendClientMessageToAll( COLOR_YELLOW, szMsg );
       return 1;
}

public SpawnStuntObject( playerid, rampid )
{
       new nrampid = 1655;
       new Float:ZPos = 0.0;

       switch( rampid )
       {
               case 1:
               {
                    nrampid = 1655; //regular ramp
                    ZPos = -0.09;
               }
               case 2:
               {
                    nrampid = 1632; //skinnier [ regular ]
                    ZPos = 0.0;
               }
               case 3:
               {
                    nrampid = 1660; //concrete jump
                    ZPos = -1.0;
               }
               case 4:
               {
                    nrampid = 8302; //wood box jump
                    ZPos = 0.0;
               }
               case 5:
               {
                    nrampid = 2931; //skinny bike jump
                    ZPos = -1.0;
               }
               case 6:
               {
                    nrampid = 13592; //loop de loop
                    ZPos = 8.9;
               }
               default:
               {
                    nrampid = 1655;
                    ZPos = -0.09;
               }
       }
       return SpawnObjectZ( playerid, nrampid, ZPos );
}

public SetSpawnStunt( playerid )
{
       SetPlayerPos( playerid, 1887.5493, -1376.8995, 19.1406 );
       return 0;
}

public MovePlayer( playerid, Float:X, Float:Y, Float:Z )
{
       if( IsPlayerDriver( playerid ) == 1 )
       {
           SetVehiclePos( GetPlayerVehicleID( playerid ), X, Y, Z );
           return 1;
       }
       else
       {
           SetPlayerPos( playerid, X, Y, Z );
           return 1;
       }
       return 0;
}

public GetPlayerTruePosition( playerid, &Float:X, &Float:Y, &Float:Z )
{
       if( IsPlayerDriver( playerid ) == 1 )
       {
           GetVehiclePos( GetPlayerVehicleID( playerid ), X, Y, Z );
           return 1;
       }
       else
       {
           GetPlayerPos( playerid, X, Y, Z );
           return 1;
       }
       return 0;
}

public SetTeleportMode( playerid, mode )
{
       if( IsPlayerAdmin( playerid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           return 0;
       }

       IsTeleportingOn = mode;
       return 1;
}

public TeleportPlayerToPlayer( playerid, targetid )
{
       if( IsTeleportingOn == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "The admin has disabled teleporting!" );
           return 0;
       }

       if( IsPlayerConnected( targetid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "Invalid player id." );
           return 0;
       }

       if( playerid == targetid )
       {
           SendClientMessage( playerid, COLOR_RED, "You can NOT warp to yourself!" );
           return 0;
       }

       if( IsPlayerAdmin( playerid ) == 0 )
       {
           if( gTeam[ playerid ] != TEAM_STUNT )
           {
               SendClientMessage( playerid, COLOR_RED, "Command only useable by admins and stunt players." );
               return 0;
           }

           if( gTeam[ targetid ] != TEAM_STUNT )
           {
               SendClientMessage( playerid, COLOR_RED, "You can not teleport to non-stunt players!" );
               return 0;
           }
       }

       new Float:WarpX, Float:WarpY, Float:WarpZ;
       GetPlayerPos( targetid, WarpX, WarpY, WarpZ );


       MovePlayer( playerid, WarpX, WarpY + 10.0, WarpZ );
       if( GetPlayerInterior( targetid ) > 0 )SetPlayerInterior( playerid, GetPlayerInterior( targetid ) );

       new WarpMsg[ 256 ];
       format( WarpMsg, sizeof( WarpMsg ), "Player %s warped to player %s ( /teleid [ id ] )", GetPlayerCaption( playerid ), GetPlayerCaption( targetid ) );
       SendClientMessageToAll( COLOR_YELLOW, WarpMsg );

       return 1;
}

new RandCars[50][1] = {
{404},{405},{410},{413},{418},
{419},{421},{422},{426},{436},
{439},{445},{458},{466},{467},
{474},{475},{479},{482},{483},
{491},{492},{496},{500},{507},
{516},{517},{518},{526},{527},
{529},{533},{540},{542},{545},
{546},{547},{549},{550},{551},
{555},{566},{579},{580},{585},
{587},{589},{600},{602},{603}
};

public AddCar(carcoords)
{
       new randcol = minrand( 0x00000000, 0xFFFFFFFF );
          new randcol2 = minrand( 0x00000000, 0xFFFFFFFF );
          return CreateVehicle( RandCars[ minrand(0,50) ][ 0 ], CarSpawns[carcoords][pos_x], CarSpawns[carcoords][pos_y], CarSpawns[carcoords][pos_z], CarSpawns[carcoords][z_angle], randcol, randcol2, never);
}

public IsCar( vid )
{
       new modelid = GetVehicleModel( vid );
       switch( modelid )
       {
               case 448,461,462,463,468,471,481,509,510,521,522,523,581,586, //bikes
               590, 569, 537, 538, 570, 449, //trains
               472, 473, 493, 595, 484, 430, 453, 452, 446, 454, //boats
               592, 577, 511, 512, 593, 520,553,464,476,519, 460,513,539,548,425,417,487,497,563,501,465, 447,469,488: //planes
               {
                    return 0;
               }
               default:
               {
                    return 1;
               }
       }
       return 0;
}

public SetPlayerMaxObject( playerid, targetid, max_obj, a )
{
       if( !IsPlayerAdmin( playerid ) )
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           return 0;
       }

       if( !IsPlayerConnected( targetid ) )
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "Invalid player id." );
           return 0;
       }

       PlayerMaxObjects[ targetid ] = max_obj;
       dUserSetINT( GetPlayerCaption( targetid ) ).( "max_obj", PlayerMaxObjects[ targetid ] );

       if( a )
       {
           new szMsg[ 256 ], szMsg2[ 256 ];
           format( szMsg, sizeof( szMsg ), "Set %s's max objects to %i", GetPlayerCaption( targetid ), max_obj );
           format( szMsg2, sizeof( szMsg2 ), "You're max objects was set to %i by admin %s", max_obj, GetPlayerCaption( playerid ) );
           SendClientMessage( playerid, COLOR_GREEN, szMsg );
           SendClientMessage( targetid, COLOR_YELLOW, szMsg2 );
       }

       return 1;
}

public GetPlayerMaxObject( playerid )
{
       return PlayerMaxObjects[ playerid ];
}

public AddVehicleNOS( playerid )
{
       if( IsPlayerDriver( playerid ) == 0 )
       {
           return 0;
       }

       new vehicleid = GetPlayerVehicleID( playerid );
       if( IsCar( vehicleid ) )
       {
           AddVehicleComponent( vehicleid, 1010 );
           return 1;
       }
       return 0;
}

public TakePlayerMoney( playerid, targetid, money )
{
       if( IsPlayerAdmin( playerid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           return 0;
       }

       if( IsPlayerConnected( targetid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "Invalid player id." );
           return 0;
       }

       SetPlayerMoney( targetid, GetPlayerMoney( targetid ) - money );
       return 1;
}

public DropPlayer( playerid, targetid, h )
{
       if( IsPlayerAdmin( playerid ) == 0 && playerid != targetid )
       {
           SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           return 0;
       }

       if( IsPlayerConnected( targetid ) == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "Invalid player id." );
           return 0;
       }

       if( h == 0 )
       {
           h = 1;
       }

       new Float:X, Float:Y, Float:Z;
       GetPlayerTruePosition( targetid, X, Y, Z );

       Z = ( Z + ( 200.0 * h ) );

       MovePlayer( targetid, X, Y, Z );
       return 1;
}

public add_log(file[], text[])
{
       new File:fp = fopen(file, io_append), tmp[1024];
       format(tmp, 1024, "%s\n", text);
       fwrite(fp, tmp);
       fclose(fp);
}

public StuntDisableWeapons( )
{
       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( IsPlayerConnected( i ) )
            {
                ResetPlayerWeapons( i );
            }
       }
}


public GetLocationsFromSaveFile( playerid )
{
       if( IsAuth[ playerid ] == 0 )
       {
           return 0;
       }

       if( IsPlayerConnected( playerid ) == 0 )
       {
           return 0;
       }

       if( udb_Exists( GetPlayerCaption( playerid ) ) == 0 )
       {
           return 0;
       }

       for( new i = 0; i < MAX_SAVE_POS; i++ )
       {
            new SaveFile[ 256 ];

            format( SaveFile, sizeof( SaveFile ), "saveloc%iu", i );
            IsSavedLocation[ playerid ][ i ] = dUserINT( GetPlayerCaption( playerid ) ).( SaveFile );

            if( IsSavedLocation[ playerid ][ i ] == 1 )
            {
                format( SaveFile, sizeof( SaveFile ), "saveloc%ix", i );
                PlayerSaveSpawn[ playerid ][ i ][ 0 ] = dUserFLOAT( GetPlayerCaption( playerid ) ).( SaveFile );

                format( SaveFile, sizeof( SaveFile ), "saveloc%iy", i );
                PlayerSaveSpawn[ playerid ][ i ][ 1 ] = dUserFLOAT( GetPlayerCaption( playerid ) ).( SaveFile );

                format( SaveFile, sizeof( SaveFile ), "saveloc%iz", i );
                PlayerSaveSpawn[ playerid ][ i ][ 2 ] = dUserFLOAT( GetPlayerCaption( playerid ) ).( SaveFile );
            }
       }
       return 1;
}

public RestorePlayerLocation( playerid, index )
{
       if( index > MAX_SAVE_POS )
       {
           SendClientMessage( playerid, COLOR_RED, "Invalid save id ( 0 - 50 )!" );
           return 0;
       }

       if( IsSavedLocation[ playerid ][ index ] == 0 )
       {
           SendClientMessage( playerid, COLOR_RED, "No save data for that id!" );
           return 0;
       }

       MovePlayer( playerid, PlayerSaveSpawn[ playerid ][ index ][ 0 ], PlayerSaveSpawn[ playerid ][ index ][ 1 ], PlayerSaveSpawn[ playerid ][ index ][ 2 ] );

       new szMsg[ 256 ];
       format( szMsg, sizeof( szMsg ), "%s restored location %i! ( /rloc [ save id] )", GetPlayerCaption( playerid ), index );
       SendClientMessageToAll( COLOR_GREEN, szMsg );

       return 1;
}

public SaveLoc( playerid, index, Float:X, Float:Y, Float:Z, saved )
{
       if( index > MAX_SAVE_POS )
       {
           if( index > MAX_SAVE_POS )
           {
               SendClientMessage( playerid, COLOR_RED, "Invalid save id ( 0 - 50 )!" );
               return 0;
           }
       }

       new SaveFile[ 256 ];
       format( SaveFile, sizeof( SaveFile ), "saveloc%ix", index );
       dUserSetFLOAT( GetPlayerCaption( playerid ) ).( SaveFile, X );

       format( SaveFile, sizeof( SaveFile ), "saveloc%iy", index );
       dUserSetFLOAT( GetPlayerCaption( playerid ) ).( SaveFile, Y );

       format( SaveFile, sizeof( SaveFile ), "saveloc%iz", index );
       dUserSetFLOAT( GetPlayerCaption( playerid ) ).( SaveFile, Z );

       format( SaveFile, sizeof( SaveFile ), "saveloc%iu", index );
       dUserSetINT( GetPlayerCaption( playerid ) ).( SaveFile, saved );

       return 1;
}

public SaveLocation( playerid, index )
{
       if( IsPlayerConnected( playerid ) == 0 )
       {
           return 0;
       }

       new Float:X, Float:Y, Float:Z;
       GetPlayerPos( playerid, X, Y, Z );
       PlayerSaveSpawn[ playerid ][ index ][ 0 ] = X;
       PlayerSaveSpawn[ playerid ][ index ][ 1 ] = Y;
       PlayerSaveSpawn[ playerid ][ index ][ 2 ] = Z;
       IsSavedLocation[ playerid ][ index ] = 1;

       new szMsg[ 256 ];
       format( szMsg, sizeof( szMsg ), "%s saved location %i ( /sloc [save id] )", GetPlayerCaption( playerid ), index );
       SendClientMessageToAll( COLOR_YELLOW, szMsg );

       if( udb_Exists( GetPlayerCaption( playerid ) ) )
       {
           if( IsAuth[ playerid ] == 1 )
           {
               return SaveLoc( playerid, index, X, Y, Z, 1 );
           }
       }
       return 0;
}

public GivePlayerParachute( playerid, a )
{
       if( IsPlayerConnected( playerid ) == 0 )
       {
           return 0;
       }

       GivePlayerWeapon( playerid, 46, 1 );

       if( a )
       {
           new szMsg[ 256 ];
           format( szMsg, sizeof( szMsg ), "%s spawned a parachute! ( /para )", GetPlayerCaption( playerid ) );
           SendClientMessageToAll( COLOR_YELLOW, szMsg );
       }

       return 1;
}

public DropMe( playerid, h )
{
       if( DropPlayer( playerid, playerid, h ) )
       {
           new szMsg[ 256 ];
           format( szMsg, sizeof( szMsg ), "%s dropped himself into the air! ( /dropme [height] )", GetPlayerCaption( playerid ) );
           SendClientMessageToAll( COLOR_YELLOW, szMsg );
       }
}

public CleanupPlayerStats( playerid )
{
       if( IsPlayerConnected( playerid ) == 0 )return 0;
       IsAuth[ playerid ] = 0;
       AuthLevel[ playerid ] = 0;
       IsWarned[ playerid ] = 0;
       IsWarnedTime[ playerid ] = 0;
       PlayerLastVehicle[ playerid ] = 0;
       Invulnerable[ playerid ] = 1;
       PlayerMaxObjects[ playerid ] = 0;

       for( new i = 0; i < MAX_SAVE_POS; i++ )
       {
            PlayerSaveSpawn[ playerid ][ i ][ 0 ] = 0.0;
            PlayerSaveSpawn[ playerid ][ i ][ 1 ] = 0.0;
            PlayerSaveSpawn[ playerid ][ i ][ 2 ] = 0.0;
            IsSavedLocation[ playerid ][ i ] = 0;
       }
       return 1;
}

#define BOOM_EXPLOSION_RADIUS 32.0
public ExplodePlayer( playerid, targetid, type )
{
       if( IsPlayerConnected( targetid ) == 0 )
       {
           return 0;
       }

       if( IsPlayerAdmin( playerid ) == 0 && playerid != targetid )
       {
           return 0;
       }

       if( GetPlayerAuthLevel( playerid ) <= 4 )
       {
           return 0;
       }

       if( IsPlayerDriver( targetid ) == 1 || IsPlayerPassenger( targetid ) == 1 )
       {
           new vehicleid = GetPlayerVehicleID( targetid );
           new Float:CarX, Float:CarY, Float:CarZ;
           GetVehiclePos( vehicleid, CarX, CarY, CarZ );
           CreateExplosion( CarX, CarY, CarZ, type, BOOM_EXPLOSION_RADIUS );
           return 1;
       }
       else
       {
           new Float:CarX, Float:CarY, Float:CarZ;
           GetPlayerPos( targetid, CarX, CarY, CarZ );
           CreateExplosion( CarX, CarY, CarZ, type, BOOM_EXPLOSION_RADIUS );
           return 1;
       }
       return 0;
}

public FindVehicleOwner( vehicleid )
{
       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( IsPlayerDriver( i ) == 1 )
            {
                if( GetPlayerVehicleID( i ) == vehicleid )return i;
            }
       }
       return -1;
}

public IsValidVehicle( vehicleid )
{
       new Float:vh = 0.0;
       GetVehicleHealth( vehicleid, vh );
       if( vh == 0.0 )
       {
           return 0;
       }
       return 1;
}

public DeleteVehicle( playerid, vehicleid, announce )
{
       if( IsPlayerAdmin( playerid ) == 0 && GetPlayerAuthLevel( playerid ) <= 1 )
       {
           if( announce )SendClientMessage( playerid, COLOR_RED, "INSUFFICIENT AUTH" );
           return 0;
       }

       if( IsPlayerInVehicle(playerid, vehicleid) == 1 )
       {
           if( announce )SendClientMessage( playerid, COLOR_RED, "Get off the car first!" );
           return 0;
       }

       if( FindVehicleOwner( vehicleid ) != -1 )
       {
           if( announce )SendClientMessage( playerid, COLOR_RED, "There is a player driving this vehicle!" );
           return 0;
       }

       if( IsValidVehicle( vehicleid ) == 0 )
       {
           if( announce )SendClientMessage( playerid, COLOR_RED, "Invalid vehicle!" );
           return 0;
       }

       DestroyVehicle( vehicleid );
       return 1;
}

public GivePlayerJetpack( playerid, a )
{
       if( IsPlayerConnected( playerid ) == 0 )
       {
           return 0;
       }

       if( IsPlayerInAnyVehicle( playerid ) == 1 )
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "You can not be in a vehicle to spawn a jetpack!" );
           return 0;
       }

       new Float:X, Float:Y, Float:Z;
       GetPlayerPos( playerid, X, Y, Z );
       AddStaticPickup( 370, 15, X, Y, Z );

       new szMsg[ 256 ];
       format( szMsg, sizeof( szMsg ), "%s spawned a jetpack! ( /sjp )", GetPlayerCaption( playerid ) );
       SendClientMessageToAll( COLOR_YELLOW, szMsg );

       return 1;
}

public SetPlayerVuln( playerid, vulnid, vuln, announce )
{
       if( IsPlayerAdmin( playerid ) == 0 )
       {
           if( announce )
           {
               SendClientMessage( playerid, COLOR_RED, "ADMIN ONLY" );
           }
           return 0;
       }

       if( IsPlayerConnected( vulnid ) == 0 )
       {
           if( announce )
           {
               SendClientMessage( playerid, COLOR_RED, "Invalid player id." );
           }
           return 0;
       }

       new szMsg[ 256 ];
       if( vuln == 0 )
       {
           if( announce )
           {
               format( szMsg, sizeof( szMsg ), "Player %s set to invulnerable by %s!", GetPlayerCaption( vulnid ), GetPlayerCaption( playerid ) );
               SendClientMessageToAll( COLOR_GREEN, szMsg );
           }
           Invulnerable[ playerid ] = 1;
       }
       else
       {
           if( announce )
           {
               format( szMsg, sizeof( szMsg ), "Player %s set to vulnerable by %s!", GetPlayerCaption( vulnid ), GetPlayerCaption( playerid ) );
               SendClientMessageToAll( COLOR_GREY, szMsg );
           }
           Invulnerable[ playerid ] = 0;
       }
       return 1;
}

new IsVehicleLocked[ MAX_VEHICLES ];

public LockVehicle( playerid, a )
{
       if( !IsPlayerConnected( playerid ) )
       {
           if(a)SendClientMessage( playerid, COLOR_RED, "ERROR UNKNOWN" );
           return 0;
       }
       if( !IsPlayerDriver( playerid ) )
       {
           if(a)SendClientMessage( playerid, COLOR_RED, "You must be a driver to do this!" );
           return 0;
       }
       if( !IsCar( GetPlayerVehicleID( playerid ) ) )
       {
           if(a)SendClientMessage( playerid, COLOR_RED, "You are not in a valid vehicle!" );
           return 0;
       }

       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( IsPlayerConnected( i ) == 1 )
            {
                if( i != playerid )
                {
                    SetVehicleParamsForPlayer(GetPlayerVehicleID( playerid ),playerid,0,1);//doors are locked
                }
            }
       }
       IsVehicleLocked[ GetPlayerVehicleID( playerid ) ] = 1;
       return 0;
}

public UnlockVehicle( playerid, a )
{
       if( !IsPlayerConnected( playerid ) )
       {
           if(a)SendClientMessage( playerid, COLOR_RED, "ERROR UNKNOWN" );
           return 0;
       }
       if( !IsPlayerDriver( playerid ) )
       {
           if(a)SendClientMessage( playerid, COLOR_RED, "You must be a driver to do this!" );
           return 0;
       }

       if( !IsCar( GetPlayerVehicleID( playerid ) ) )
       {
           if(a)SendClientMessage( playerid, COLOR_RED, "You are not in a valid vehicle!" );
           return 0;
       }

       if( IsVehicleLocked[ GetPlayerVehicleID( playerid ) ] == 0 )
       {
           if(a)SendClientMessage( playerid, COLOR_RED, "This vehicle is not locked!" );
           return 0;
       }

       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( IsPlayerConnected( i ) == 1 )
            {
                if( i != playerid )
                {
                    SetVehicleParamsForPlayer(GetPlayerVehicleID( playerid ),playerid,0,0);//doors are unlocked
                }
            }
       }
       IsVehicleLocked[ GetPlayerVehicleID( playerid ) ] = 0;
       return 0;
}

new Float:gCityMovements[ 3 ][ 3 ] =
{
    { 2779.6001,-2010.7078,13.5547 }, //LS
    { -1916.0455,293.3197,41.0469 }, //SF
    { 2322.2805,1411.2649,42.8203 } //LV
};

new CityNames[ 3 ][ 256 ] =
{
    { "Los Santos" },
    { "San Fierro" },
    { "Las Venturas" }
};

public CityJump( playerid, cityid, a )
{
       if( cityid >= 3 || cityid <= -1 )
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "Invalid city id! ( 0 - 2 )" );
           return 0;
       }

       new iRet = MovePlayer( playerid, gCityMovements[ cityid ][ 0 ], gCityMovements[ cityid ][ 1 ], gCityMovements[ cityid ][ 2 ] );
       if( iRet == 1 )
       {
           new szMsg[ 256 ];
           format( szMsg, sizeof( szMsg ), "%s warped to city %s ( /wcity [city ( 0 - 2 )] )", GetPlayerCaption( playerid ), CityNames[ cityid ] );
           SendClientMessageToAll( COLOR_YELLOW, szMsg );
       }
       else
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "Error in MovePlayer!" );
       }
       return iRet;
}

public DeleteObjectArea( playerid, object1, object2, a )
{
       new iRet = 0;
       for( new i = object1; i < object2; i++ )
       {
            new iiRet = DeleteSingleObject( playerid, i, 0 );
            if( ( !iRet && iiRet ) || ( iRet == 1 && !iiRet ) )
            {
                 iRet = iiRet;
            }
       }

       new szMsg[ 256 ];
       format( szMsg, sizeof( szMsg ), "Admin deleted objects %i through %i", object1, object2 );
       if(a)SendClientMessageToAll( COLOR_YELLOW, szMsg );
       return iRet;
}

public WarpToLastVehicle( playerid, a )
{
       if( PlayerLastVehicle[ playerid ] == 0 )
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "Invalid vehicle!" );
           return 0;
       }

       PutPlayerInVehicle( playerid, PlayerLastVehicle[ playerid ], 0 );

       if( a )
       {
           new szMsg[ 256 ];
           format( szMsg, sizeof( szMsg ), "Player %s warped to his last vehicle ( use /wtl )", GetPlayerCaption( playerid ) );
           SendClientMessageToAll( COLOR_YELLOW, szMsg );
       }
       return 1;
}

public WarpLastVehicleToPlayer( playerid, a )
{
       if( PlayerLastVehicle[ playerid ] == 0 )
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "Invalid vehicle!" );
           return 0;
       }

       if( IsPlayerInAnyVehicle( playerid ) == 1 )
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "Get out of your vehicle first!!" );
           return 0;
       }

       if( IsPlayerConnected( FindVehicleOwner( PlayerLastVehicle[ playerid ] ) ) == 1 )
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "Some one is already in that vehicle!" );
           return 0;
       }

       new Float:X, Float:Y, Float:Z;
       GetPlayerPos( playerid, X, Y, Z );
       SetVehiclePos( PlayerLastVehicle[ playerid ], X, Y + 5.0, Z);
       if( a )
       {
           new szMsg[ 256 ];
           format( szMsg, sizeof( szMsg ), "Player %s warped his last vehicle to himself! ( use /ltw )", GetPlayerCaption( playerid ) );
           SendClientMessageToAll( COLOR_YELLOW, szMsg );
       }
       return 1;
}



public CountDown( playerid )
{
       PlayerCount[ playerid ]--;
       switch( PlayerCount[ playerid ] )
       {
               case 4:
               {
                    new szMsg[ 256 ];
                    format( szMsg, sizeof( szMsg ), "%s started a countdown!", GetPlayerCaption( playerid ) );
                    SendClientMessageToAll( COLOR_YELLOW, szMsg );
               }
               case 3:SendClientMessageToAll( COLOR_YELLOW, "3..." );
               case 2:SendClientMessageToAll( COLOR_YELLOW, "2..." );
               case 1:SendClientMessageToAll( COLOR_YELLOW, "1..." );
               case 0:SendClientMessageToAll( COLOR_YELLOW, "GO! GO! GO!" );
               default:SendClientMessage( playerid, COLOR_RED, "Countdown error!" );
       }

       if( PlayerCount[ playerid ] != 0 )
       {
           SetTimerEx( "CountDown", 1000, 0, "i", playerid );
       }
       else
       {
           IsPlayerCounting[ playerid ] = 0;
       }
}

public StartCount( playerid )
{
       if( IsPlayerCounting[ playerid ] == 1 )
       {
           SendClientMessage( playerid, COLOR_RED, "One countdown is enough!" );
           return 0;
       }

       IsPlayerCounting[ playerid ] = 1;
       PlayerCount[ playerid ] = 5;
       SendClientMessage( playerid, COLOR_YELLOW, "Countdown started!" );
       SetTimerEx( "CountDown", 1000, 0, "i", playerid );
       return 1;
}

#define MIN_SKIN_ID		0
#define MAX_SKIN_ID		299

public IsInvalidSkin(skinid)
{
       #define	MAX_BAD_SKINS   22
       new badSkins[MAX_BAD_SKINS] = {
       3, 4, 5, 6, 8, 42, 65, 74, 86,
       119, 149, 208, 265, 266, 267,
       268, 269, 270, 271, 272, 273, 289
       };
       for (new i = 0; i < MAX_BAD_SKINS; i++)
       {
           if (skinid == badSkins[i]) return 1;
       }
       return 0;
}

public GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
     if( IsPlayerConnected( playerid ) == 0 )return 0;
     new Float:a;
     GetPlayerPos(playerid, x, y, a);
     GetPlayerFacingAngle(playerid, a);
     if (GetPlayerVehicleID(playerid))
     {
        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
     }
     x += (distance * floatsin(-a, degrees));
     y += (distance * floatcos(-a, degrees));
     return 1;
}

//=====================================================================================================

/*
~k~~VEHICLE_TURRETLEFT~
~k~~VEHICLE_TURRETRIGHT~
~k~~VEHICLE_TURRETUP~
~k~~VEHICLE_TURRETDOWN~
~k~~VEHICLE_HORN~
~k~~VEHICLE_LOOKLEFT~
~k~~VEHICLE_LOOKRIGHT~
~k~~VEHICLE_ENTER_EXIT~
~k~~VEHICLE_ACCELERATE~
~k~~VEHICLE_BRAKE~
~k~~VEHICLE_HANDBRAKE~
~k~~VEHICLE_STEERDOWN~
~k~~VEHICLE_STEERUP~
~k~~VEHICLE_STEERLEFT~
~k~~VEHICLE_STEERRIGHT~
~k~~VEHICLE_FIREWEAPON_ALT~
~k~~VEHICLE_RADIO_STATION_UP~
~k~~VEHICLE_RADIO_STATION_DOWN~
~k~~PED_SPRINT~
~k~~PED_FIREWEAPON~
~k~~PED_ANSWER_PHONE~
~k~~PED_LOCK_TARGET~
~k~~PED_LOOKBEHIND~
~k~~PED_SNIPER_ZOOM_IN~
~k~~PED_SNIPER_ZOOM_OUT~
~k~~PED_CYCLE_WEAPON_LEFT~
~k~~PED_CYCLE_WEAPON_RIGHT~
~k~~PED_DUCK~
~k~~PED_JUMPING~
~k~~GO_LEFT~
~k~~GO_RIGHT~
~k~~GO_BACK~
~k~~GO_FORWARD~
~k~~TOGGLE_SUBMISSIONS~
~k~~CONVERSATION_NO~
~k~~CONVERSATION_YES~
~k~~GROUP_CONTROL_BWD~
~k~~GROUP_CONTROL_FWD~
*/

new IsInSkinSelect[ MAX_PLAYERS ];
new PlayerKeys[ MAX_PLAYERS ][ 3 ];

public InitSkinSelect( playerid )
{
       new Float:x, Float:y, Float:z;
       GetPlayerPos(playerid, x, y, z);
       SetPlayerCameraLookAt(playerid, x, y, z);
       GetXYInFrontOfPlayer(playerid, x, y, 3.5);
       SetPlayerCameraPos(playerid, x, y, z);
       TogglePlayerControllable(playerid, 0);
       IsInSkinSelect[ playerid ] = 1;
       GameTextForPlayer(playerid,"~r~~h~~h~~k~~PED_ANSWER_PHONE~ to select a skin~n~~r~~h~~h~left or right to pick skins",1000*6,5);
}

public KeyTimer()
{
       for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
       {
           if(!IsPlayerConnected(playerid) || !IsInSkinSelect[ playerid ] )continue;
           new SelectedSkin = GetPlayerSkin( playerid );
           new cString[ 128 ];
           new DisplayChange = 0;
           GetPlayerKeys( playerid, PlayerKeys[ playerid ][ 0 ], PlayerKeys[ playerid ][ 1 ], PlayerKeys[ playerid ][ 2 ] );
            if( PlayerKeys[ playerid ][ 2 ] == KEY_RIGHT )
            {
                if(SelectedSkin == MAX_SKIN_ID)
                {
                    SelectedSkin = MIN_SKIN_ID;
                }
                else
                {
                    SelectedSkin++;
                }
                while(IsInvalidSkin(SelectedSkin))
                {
                    SelectedSkin++;
                }
                DisplayChange = 1;
            }
            else if( PlayerKeys[ playerid ][ 2 ] == KEY_LEFT )
            {
                if(SelectedSkin == MIN_SKIN_ID)
                {
                    SelectedSkin = MAX_SKIN_ID;
                }
                else
                {
                    SelectedSkin--;
                }
                while(IsInvalidSkin(SelectedSkin))
                {
                    SelectedSkin--;
                }
                DisplayChange = 1;
           }

           if( DisplayChange )
           {
               format(cString, 128, "Skin ID: %d", SelectedSkin);
               GameTextForPlayer(playerid, cString, 1500, 3);
               SetPlayerSkin(playerid, SelectedSkin);
               if( IsAuth[ playerid ] )
               {
                   dUserSetINT( GetPlayerCaption( playerid ) ).( "skin", SelectedSkin + 1 );
               }
           }

           if(PlayerKeys[ playerid ][ 0 ] & KEY_ACTION)
           {
               SetCameraBehindPlayer(playerid);
               TogglePlayerControllable(playerid, 1);
               format(cString, 128, "[SUCCESS]: You have changed to SKINID %d", SelectedSkin);
               SendClientMessage(playerid, COLOR_GREEN, cString);
               IsInSkinSelect[ playerid ] = 0;
           }
       }
}

public AddStaticVehicle2( id, Float:X, Float:Y, Float:Z, Float:Rot, iuno, duno )
{
       TotalVehicles++;
       return AddStaticVehicle( id, X, Y, Z, Rot, iuno, duno );
}

//=====================================================================================================

main()
{
      print("\n----------------------------------");
      print("  DAS STUNT by [ DAS ]OpiuM");
      print("----------------------------------\n");
}

//=====================================================================================================
//callback functions
public OnGameModeInit()
{
       SetGameModeText( "DAS STUNT WORLD" );
          SetWorldTime( 10 ); //night

       //-----------------------------------
       for( new i = 299; i > 30; i-- )
       {
            if( IsInvalidSkin( i ) == 0 )
            {
                if( i == 299 )
                {
                    AddPlayerClass(i, 2246.2295,2489.3726,10.8203,76.9256, 0, 0, 0, 0, 0, 0);
                    AddPlayerClass( 0, 2246.2295,2489.3726,10.8203,76.9256, 0, 0, 0, 0, 0, 0);
                }
                else
                {
                    AddPlayerClass(i, 2246.2295,2489.3726,10.8203,76.9256, 0, 0, 0, 0, 0, 0);
                }
            }
       }

       //-----------------------------------

       AllowAdminTeleport(1);

       //-----stunt bikes
       AddStaticVehicle2(522,1973.7346,-1445.9835,13.5947,177.0632,40,1); // STUNT_BIKE_1
       AddStaticVehicle2(522,1939.0299,-1445.4941,13.6007,142.9877,40,1); // STUNT_BIKE_2
       AddStaticVehicle2(522,1933.1569,-1445.8197,13.5853,132.5101,40,1); // STUNT_BIKE_3
       AddStaticVehicle2(522,1921.8263,-1446.3594,13.5767,124.1694,40,1); // STUNT_BIKE_4
       AddStaticVehicle2(522,1864.7609,-1442.0099,13.6119,356.2814,40,1); // STUNT_BIKE_5
       AddStaticVehicle2(522,1919.8218,-1413.4073,13.6627,139.5114,40,1); // STUNT_BIKE_6
       AddStaticVehicle2(522,1863.7384,-1408.5516,13.5675,180.6480,40,1); // STUNT_BIKE_7
       AddStaticVehicle2(481,1887.5493,-1362.8995,19.1406,137.9691,40,1); // STUNT_BMX_1
       AddStaticVehicle2(481,1870.8937,-1363.0991,19.1406,137.0291,40,1); // STUNT_BMX_2
       AddStaticVehicle2(481,1869.7489,-1359.9618,19.1406,131.3890,40,1); // STUNT_BMX_3
       AddStaticVehicle2(481,1944.9882,-1365.0441,18.6704,315.8522,40,1); // STUNT_BMX_4
       AddStaticVehicle2(522,1084.7285,-2037.8595,74.0559,0.5236,40,1); // d3bike
       AddStaticVehicle2(443,1909.1537,-1361.1270,14.2035,71.8369,36,1); // packer1
       AddStaticVehicle2(444,1924.4268,-1374.0905,14.0362,68.4131,32,32); // monster1
       AddStaticVehicle2(571,1927.0438,-1369.8301,13.6942,39.9136,2,35); // kart1
       AddStaticVehicle2(554,1931.2034,-1369.0675,16.1437,48.8318,45,32); // truck1
       AddStaticVehicle2(571,1955.6827,-1393.9325,14.6771,71.2146,51,53); // kart2
       AddStaticVehicle2(571,1952.8547,-1394.3510,14.2484,70.3501,91,2); // kart3
       AddStaticVehicle2(571,1949.5503,-1396.5016,13.3156,334.5041,11,22); // kart4
       AddStaticVehicle2(471,1933.8804,-1392.2721,14.3418,69.4289,120,117); // 4weel1
       AddStaticVehicle2(471,1936.9528,-1392.9647,14.5535,73.1837,103,111); // 4weel2
       AddStaticVehicle2(471,1940.1912,-1393.8330,14.4625,74.2497,103,111); // 4weel3
       AddStaticVehicle2(471,1930.2520,-1391.4264,13.5676,70.6764,120,113); // 4weel4
       AddStaticVehicle2(559,1923.3411,-1358.9777,14.5885,73.2526,51,1); // sport1
       AddStaticVehicle2(406,1913.9038,-1361.3058,15.1801,114.9140,1,1); // dumper
       AddStaticVehicle2(423,1900.5787,-1346.3344,13.5123,99.7458,1,17); // mrwooper
       AddStaticVehicle2(414,1887.3474,-1340.1135,13.5014,72.7953,43,1); // bigvan
       AddStaticVehicle2(470,1847.4257,-1355.3745,13.3960,72.1444,43,0); // patriot
       AddStaticVehicle2(432,1822.8608,-1356.2101,14.5965,70.1268,43,0); // rhino
       AddStaticVehicle2(603,1825.2473,-1350.5750,14.3613,71.1248,13,1); // car406a
       AddStaticVehicle2(603,1826.4623,-1337.9685,14.3020,77.5033,45,45); // car406b
       AddStaticVehicle2(603,1825.2587,-1339.9125,14.3211,74.3675,34,1); // car406c
       AddStaticVehicle2(403,1839.3942,-1325.0959,14.1024,71.3848,25,1); // semi1
       AddStaticVehicle2(403,1841.2419,-1310.0580,14.1225,71.4933,28,1); // semi2

          //-------------------
          //timer init
          SetTimer( "PingTimer", 1000*15, 1 ); //once five seconds
          SetTimer( "LoginTimer", 1000, 1 ); //once one second
          SetTimer( "StuntRestore", 1000, 1 ); //once every second
          SetTimer( "WebTimer", ( ( 1000 * 60 ) * 5 ), 1 ); //once every 5 minutes
          SetTimer( "ControllableTimer", 1000, 1 ); //once every second
          SetTimer( "SaveTimer", 1000 * 60 * 2, 1 ); //every 2 minutes
          SetTimer( "ParaTimer", 1000, 1 ); //once every second
          SetTimer( "KeyTimer", 10, 1 ); //blah

          UsePlayerPedAnims( );        // Will cause the players to use CJ running/walking animations
          StuntDisableWeapons( );
          AllowInteriorWeapons(0);
          EnableTirePopping(0);

          return 1;
}

public OnPlayerText(playerid, text[])
{
       new fir[ 256 ];
       new idx;
       fir = strtok( text, idx );

       if( IsStr( fir, "login" ) || IsStr( fir, "register" ) || IsStr( fir, "changepass" ) || IsStr( fir, "cgpass" ) )
       {
           SendClientMessage( playerid, COLOR_RED, "String could not be sent due to login protection(s)!" );
           return 0;
       }

       new szMessage[ 256 ];
       if( IsPlayerAdmin( playerid ) == 0 )
       {
           format( szMessage, sizeof( szMessage ), "( %i )( %s ) %s", playerid, GetPlayerCaption( playerid ), text );
           SendClientMessageToAll( COLOR_WHITE, szMessage );
       }
       else
       {
           format( szMessage, sizeof( szMessage ), "( %i )( ~%s ) %s", playerid, GetPlayerCaption( playerid ), text );
           SendClientMessageToAll( COLOR_ORANGE, szMessage );
       }
       return 0;
}

public FlipPlayerVehicle( playerid, a )
{
       if( IsPlayerInAnyVehicle( playerid ) == 0 )
       {
           if( a )SendClientMessage( playerid, COLOR_RED, "You must be in a vehicle!" );
           return 0;
       }

       if( a )
       {
           new szMsg[ 256 ];
           format( szMsg, sizeof( szMsg ), "%s has flipped himself! ( use '/flipme' )", GetPlayerCaption( playerid ) );
           SendClientMessageToAll( COLOR_YELLOW, szMsg );
       }

       SetVehicleZAngle( GetPlayerVehicleID( playerid ), 0.0 );
       return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
       new cmd[256];
          new param1[ 256 ];
          new param2[ 256 ];
          new iparam1, iparam2;
          new idx;

          cmd = strtok( cmdtext, idx );
          param1 = strtok( cmdtext, idx );
          param2 = strtok( cmdtext, idx );
          iparam1 = strval( param1 );
          iparam2 = strval( param2 );

       if( IsStr( cmd, "/info" ) == 1 )
       {
           SendClientMessage( playerid, COLOR_YELLOW, "This is the dedicated american sex STUNT server, there is no rules just stunt!" );
           return 1;
       }

       if( IsStr( cmd, "/cmd" ) || IsStr( cmd, "/commands" ) || IsStr( cmd, "/com" ) )
       {
           SendClientMessage( playerid, COLOR_GREEN, "Go to http://dedicatedamericansex.com/ for commands!" );
           return 1;
       }

       if( IsStr( cmd, "/register" ) || IsStr( cmd, "/reg" ) )
       {
           RegisterPlayer( playerid, param1 );
           return 1;
       }

       if( IsStr( cmd, "/login" ) || IsStr( cmd, "/ident" ) )
       {
           LoginToServer( playerid, param1 );
           return 1;
       }

       if( IsStr( cmd, "/changepass" ) || IsStr( cmd, "/cgpass" ) )
       {
           ChangePassword( playerid, param1, 1 );
           return 1;
       }

          if( IsStr( cmd, "/grav" ) == 1 )
          {
              AdjustGrav( playerid, floatstr( param1 ) );
              return 1;
          }

          if( IsStr( cmd, "/flipme" ) || IsStr( cmd, "/fm" ) )
          {
              FlipPlayerVehicle( playerid, 1 );
              return 1;
          }

          if( IsStr( cmd, "/rgrav" ) == 1 )
          {
              RestoreGrav( playerid );
              return 1;
          }

          if( IsStr( cmd, "/time" ) == 1 )
          {
              AdjustTime( playerid, iparam1 );
              return 1;
          }

          if( IsStr( cmd, "/scar" ) == 1 )
          {
              SpawnVehicle( playerid, iparam1 );
              return 1;
          }

          if( IsStr( cmd, "/sbike" ) == 1 )
          {
              SpawnVehicle( playerid, 522 );
              return 1;
          }

          if( IsStr( cmd, "/die" ) == 1 )
          {
              KillUser( playerid, iparam1 );
              return 1;
          }

          if( IsStr( cmd, "/banacct" ) == 1 )
          {
              BanAccount( playerid, iparam1 );
              return 1;
          }

          if( IsStr( cmd, "/spawnobj" ) == 1 )
          {
              SpawnObject( playerid, iparam1 );
              return 1;
          }

          if( IsStr( cmd, "/sobjex" ) == 1 || IsStr( cmd, "/soex" ) )
          {
              SpawnObjectZ( playerid, iparam1, floatstr( param2 ) );
              return 1;
          }

          if( IsStr( cmd, "/sr" ) == 1 )
          {
              SpawnStuntObject( playerid, iparam1 );
              return 1;
          }

          if( IsStr( cmd, "/delobj" ) == 1 )
          {
              DeleteAllObjects( playerid );
              return 1;
          }

          if( IsStr( cmd, "/dmo" ) == 1 )
          {
              DeleteAllUserObjects( playerid );
              return 1;
          }

          if( IsStr( cmd, "/dso" ) == 1 )
          {
              DeleteSingleObject( playerid, iparam1, 1 );
              return 1;
          }

          if( IsStr( cmd, "/dlo" ) == 1 )
          {
              DeleteSingleObject( playerid, GetLastUserObject( playerid ), 1 );
              return 1;
          }

          if( IsStr( cmd, "/teleid" ) == 1 )
          {
              TeleportPlayerToPlayer( playerid, iparam1 );
              return 1;
          }

          if( IsStr( cmd, "/takecash" ) == 1 )
          {
              TakePlayerMoney( playerid, iparam1, iparam2 );
              return 1;
          }

          if( IsStr( cmd, "/drop" ) == 1 )
          {
              DropPlayer( playerid, iparam1, 2 );
              return 1;
          }

          if( IsStr( cmd, "/changeskin" ) || IsStr( cmd, "/cgskin" ) )
          {
              if( IsPlayerConnected( iparam1 ) == 1 )
              {
                  SetPlayerSkin( iparam1, iparam2 );
           }
              return 1;
          }

          if( IsStr( cmd, "/auth" ) == 1 )
          {
              SetPlayerAuthLevel( playerid, iparam1, iparam2, 1 );
              return 1;
          }

          if( IsStr( cmd, "/sloc" ) == 1 )
          {
              SaveLocation( playerid, iparam1 );
              return 1;
          }

          if( IsStr( cmd, "/rloc" ) == 1 )
          {
              RestorePlayerLocation( playerid, iparam1 );
              return 1;
          }

          if( IsStr( cmd, "/dropme" ) == 1 )
          {
              DropMe( playerid, iparam1 );
              return 1;
          }

          if( IsStr( cmd, "/exp" ) == 1 )
          {
              if( ExplodePlayer( playerid, iparam1, iparam2 ) )
              {
                  new szMsg[ 256 ];
                  format( szMsg, sizeof( szMsg ), "explosion created at %s by %s.", GetPlayerCaption( iparam1 ), GetPlayerCaption( playerid ) );
                  SendClientMessageToAll( COLOR_YELLOW, szMsg );
              }
              return 1;
          }

          if( IsStr( cmd, "/dcar" ) == 1 )
          {
              DeleteVehicle( playerid, iparam1, 1 );
              return 1;
          }

          if( IsStr( cmd, "/sjp" ) == 1 )
          {
              GivePlayerJetpack( playerid, 1 );
              return 1;
          }

          if( IsStr( cmd, "/vuln" ) == 1 )
          {
              SetPlayerVuln( playerid, iparam1, iparam2, 1 );
              return 1;
          }

          if( IsStr( cmd, "/lock" ) == 1 )
          {
              LockVehicle( playerid, 1 );
              return 1;
          }

          if( IsStr( cmd, "/ulock" ) == 1  )
          {
              UnlockVehicle( playerid, 1 );
              return 1;
          }

          if( IsStr( cmd, "/wcity" ) == 1 )
          {
              CityJump( playerid, iparam1, 1 );
              return 1;
          }

          if( IsStr( cmd, "/dogr" ) == 1 )
          {
              DeleteObjectArea( playerid, iparam1, iparam2, 1 );
              return 1;
          }

          if( IsStr( cmd, "/spawn" ) == 1 )
          {
              SetSpawnStunt( playerid );

              new szMsg[ 256 ];
              format( szMsg, sizeof( szMsg ), "%s warped back to spawn ( use /spawn )", GetPlayerCaption( playerid ) );
              SendClientMessageToAll( COLOR_YELLOW, szMsg );
              return 1;
          }

          if( IsStr( cmd, "/wtl" ) == 1 )
          {
              WarpToLastVehicle( playerid, 1 );
              return 1;
          }

          if( IsStr( cmd, "/ltw" ) == 1 )
          {
              WarpLastVehicleToPlayer( playerid, 1 );
              return 1;
          }

          if( IsStr( cmd, "/count" ) == 1 )
          {
              StartCount( playerid );
              return 1;
          }

          if( IsStr( cmd, "/ssel" ) == 1 )
          {
              if( IsPlayerOnFoot( playerid ) )
              {
                  InitSkinSelect( playerid );
              }
              else
              {
                  SendClientMessage( playerid, COLOR_RED, "You must be on foot!" );
              }
              return 1;
          }

          if( IsStr( cmd, "/telemode" ) == 1 )
          {
              if( SetTeleportMode( playerid, iparam1 ) == 1 )
              {
                  switch( iparam1 )
                  {
                          case 0:SendClientMessageToAll( COLOR_YELLOW, "Admin set teleporting to OFF" );
                          case 1:SendClientMessageToAll( COLOR_YELLOW, "Admin set teleporting to ON" );
                          default:printf( "Teleport %i", IsTeleportingOn );
                  }
              }
              return 1;
          }

          if( IsStr( cmd, "/sumo" ) )
          {
              SetPlayerMaxObject( playerid, iparam1, iparam2, 1 );
              return 1;
          }

          return 0;
}

public OnPlayerConnect(playerid)
{
       IsAuth[ playerid ] = 0;
       IsWarned[ playerid ] = 0;
       IsWarnedTime[ playerid ] = 0;

       if( udb_Exists( GetPlayerCaption( playerid ) ) == 1 )
       {
           new IsBanned = dUserINT( GetPlayerCaption( playerid ) ).( "banned" );

           if( IsBanned == 1 )
           {
               new szBan[ 256 ];
               format( szBan, sizeof( szBan ), "%s was banned for an existing account ban.", GetPlayerCaption( playerid ) );
               SendClientMessageToAll( COLOR_YELLOW, szBan );

               Ban( playerid );
               Kick( playerid );
           }

           IsWarned[ playerid ] = 1;
           SendClientMessage( playerid, COLOR_YELLOW, "This nickname is registered and protected. If it is your nickname," );
           SendClientMessage( playerid, COLOR_YELLOW, "type /login [password]. Otherwise, please choose a different nickname." );
           SendClientMessage( playerid, COLOR_YELLOW, "You have 1 minute to log in." );
           SetPlayerMoney( playerid, 0 );
       }
       
       /*
       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( strcmp( GetPlayerIPA( playerid ), GetPlayerIPA( i ) ) == 0 )
            {
                if( i != playerid )
                {
                    new szMsg[ 256 ];
                    format( szMsg, sizeof( szMsg ), "%s removed from the game ( duplicate ip )" );
                    SendClientMessageToAll( COLOR_YELLOW, szMsg );
                    Kick( playerid );
                }
            }
       }
       */

       new szJoinMsg[ 256 ];
       format( szJoinMsg, sizeof( szJoinMsg ), "%s has joined the game!", GetPlayerCaption( playerid ) );
       SendClientMessageToAll( COLOR_ORANGE, szJoinMsg );

       GameTextForPlayer( playerid,"~r~DEDICATED AMERICAN SEX STUNT",2500,5 );
       GivePlayerMoney( playerid, 200 );
       SetPlayerColor( playerid, COLOR_YELLOW ); // Set the player's color to inactive
       SendClientMessage( playerid, 0xFFFFFFFF, "Remember, type /info for the commands!!!" );
       Invulnerable[ playerid ] = 1;

       return 1;
}

public OnPlayerEnterCheckpoint( playerid )
{
       printf( "OnPlayerEnterCheckpoint" );
}

public OnPlayerRequestClass(playerid, classid)
{
       SetPlayerTeamFromClass(playerid, classid);
       SetupPlayerForClassSelection(playerid);
       gPlayerClass[playerid] = classid;
       GameTextForPlayer( playerid, "~b~Stunter", 1000, 3 );
       return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
       printf( "OnVehicleDeath" );
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
       printf( "OnPlayerEnterVehicle" );
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
       printf( "OnPlayerStateChange" );
}

public OnPlayerDeath(playerid, killerid, reason)
{
       printf( "onPlayerDeath" );

       new szDead[ 256 ];
       format( szDead, sizeof( szDead ), "%s has died.", GetPlayerCaption( playerid ) );
       SendClientMessageToAll( COLOR_ORANGE, szDead );
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
   if (IsPlayerInAnyVehicle(playerid))
   {
      LinkVehicleToInterior(GetPlayerVehicleID(playerid), newinteriorid);
   }
   return 1;
}


public SetupPlayerForClassSelection(playerid)
{
       SetPlayerInterior( playerid,9 );
       SetPlayerFacingAngle(playerid,0.0);
       SetPlayerPos(playerid,315.7802,972.0253,1961.8705);
       SetPlayerCameraPos(playerid,315.7802,975.0253,1961.8705);
       SetPlayerCameraLookAt(playerid,315.7802,972.0253,1961.8705);
       return;
}

public SetPlayerTeamFromClass(playerid, classid)
{
       gTeam[ playerid ] = TEAM_STUNT;
       SetPlayerColor( playerid, COLOR_LIGHTBLUE );
}

public OnPlayerSpawn(playerid)
{
       printf( "OnPlayerSpawn( %i )", playerid );
       SetPlayerInterior( playerid, 0 );

       if( gTeam[ playerid ] == TEAM_STUNT )
       {
           SetSpawnStunt( playerid );
           GivePlayerParachute( playerid, 0 );
       }

       if( IsAuth[ playerid ] == 1 )
       {
           new save_skin = dUserINT( GetPlayerCaption( playerid ) ).( "skin" );
           if( save_skin == 0 )
           {
               SendClientMessage( playerid, COLOR_GREEN, "No previous skin save data, skin auto-saved! use '/ssel' to change it!" );
               dUserSetINT( GetPlayerCaption( playerid ) ).( "skin", GetPlayerSkin( playerid ) + 1 );
           }
           else if( save_skin !=0 && save_skin != GetPlayerSkin( playerid ) )
           {
                SendClientMessage( playerid, COLOR_ORANGE, "Saved skin restored, to choose a new skin use '/ssel'!" );
                SetPlayerSkin( playerid, save_skin - 1 );
           }
       }

       return 1;
}

public OnPlayerDisconnect(playerid)
{
       if( IsAuth[ playerid ] == 1 )
       {
           SavePlayerStats( playerid );
       }

       new szQuit[ 256 ];
       format( szQuit, sizeof( szQuit ), "QUIT: %s has left the game.", GetPlayerCaption( playerid ) );
       SendClientMessageToAll( COLOR_ORANGE, szQuit );

       CleanupPlayerStats( playerid );

       return 1;
}

new Menu:SpawnRampMenu;

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
       if( newkeys & KEY_CROUCH )
       {
           AddVehicleNOS( playerid );
       }

       if( IsPlayerInAnyVehicle( playerid ) == 0 )
       {
           if( GetPlayerAuthLevel( playerid ) > 2 || IsPlayerAdmin( playerid ) == 1 )
           {
               if( newkeys & KEY_HANDBRAKE )
               {
                   SpawnRampMenu = CreateMenu( " ", 1, 100, 200, 90, 25 );
                   AddMenuItem( SpawnRampMenu, 0, "Ramp 1" );
                   AddMenuItem( SpawnRampMenu, 0, "Ramp 2" );
                   AddMenuItem( SpawnRampMenu, 0, "Cement Ramp" );
                   AddMenuItem( SpawnRampMenu, 0, "Wood Ramp" );
                   AddMenuItem( SpawnRampMenu, 0, "Skinny" );
                   AddMenuItem( SpawnRampMenu, 0, "Loop de Loop" );
                   AddMenuItem( SpawnRampMenu, 0, "Delete Last" );
                   ShowMenuForPlayer( SpawnRampMenu, playerid );
                   TogglePlayerControllable( playerid, 0 );
               }
           }
       }
}

public CloseSpawnMenu( playerid )
{
       new Menu:pMenu = GetPlayerMenu( playerid );

       if( IsValidMenu( pMenu ) == 1 )
       {
           if( pMenu == SpawnRampMenu )
           {
               DestroyMenu( pMenu );
               TogglePlayerControllable( playerid, 1 );
           }
       }
}

public OnPlayerExitedMenu(playerid)
{
       CloseSpawnMenu( playerid );
}

public OnPlayerSelectedMenuRow(playerid, row)
{
       new Menu:pmenu = GetPlayerMenu( playerid );

       if( pmenu == SpawnRampMenu )
       {
           switch( row )
           {
                   case 6:
                   {
                        DeleteSingleObject( playerid, GetLastUserObject( playerid ), 1 );
                   }
                   default:
                   {
                        SpawnStuntObject( playerid, row + 1 );
                   }
           }
           DestroyMenu(SpawnRampMenu);
       }

       TogglePlayerControllable( playerid, 1 );
}

public OnPlayerExitVehicle( playerid, vehicleid )
{
       PlayerLastVehicle[ playerid ] = vehicleid;

       if( IsVehicleLocked[ vehicleid ] )
       {
           SendClientMessage( playerid, COLOR_GREEN, "You exited the vehicle, the doors are no longer locked!" );

           for( new i = 0; i < MAX_PLAYERS; i++ )
           {
                if( IsPlayerConnected( i ) == 1 )
                {
                    if( i != playerid )
                    {
                        SetVehicleParamsForPlayer(GetPlayerVehicleID( playerid ),playerid,0,0); //doors are unlocked
                    }
                }
           }
           IsVehicleLocked[ GetPlayerVehicleID( playerid ) ] = 0;
       }
}

//=====================================================================================================

public ParaTimer( )
{
       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( IsPlayerConnected( i ) == 1 )
            {
                GivePlayerParachute( i, 0 );
            }
       }
}

//=====================================================================================================

public PingTimer( )
{
       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( IsPlayerConnected( i ) == 1 )
            {
                if( GetPlayerPing( i ) > MAX_PING )
                {
                    PingWarnings[ i ]++;
                    if( PingWarnings[ i ] > 6 )
                    {
                        new szKick[ 256 ];
                        format( szKick, sizeof( szKick ), "Removing player %s from the game ( max ping %i ms )", GetPlayerCaption( i ), MAX_PING );
                        SendClientMessageToAll( COLOR_YELLOW, szKick );
                        Kick( i );
                    }
                }
            }
       }
}

//=====================================================================================================

public LoginTimer( )
{
       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( IsPlayerConnected( i ) == 1 )
            {
                if( IsWarned[ i ] == 1 && IsAuth[ i ] == 0 )
                {
                    IsWarnedTime[ i ] = ( IsWarnedTime[ i ] + ONE_SECOND );
                    if( IsWarnedTime[ i ] > ( ONE_MINUTE * 2 ) )
                    {
                        new szKick[ 256 ];
                        format( szKick, sizeof( szKick ), "Removing player %s from the game ( failed to login )", GetPlayerCaption( i ) );
                        SendClientMessageToAll( COLOR_YELLOW, szKick );
                        Kick( i );
                    }
                }
            }
       }
}

//=====================================================================================================

public StuntRestore( )
{
       for( new i = 0; i < MAX_PLAYERS; i++ )
       {
            if( IsPlayerConnected( i ) == 1 )
            {
                if( Invulnerable[ i ] == 1 )
                {
                    if( gTeam[ i ] == TEAM_STUNT )
                    {
                        SetPlayerHealth( i, 100.0 );
                        SetPlayerArmour( i, 100.0 );
                        SetPlayerMoney( i, 0 );

                        if( IsPlayerDriver( i ) == 1 )
                        {
                            SetVehicleHealth( GetPlayerVehicleID( i ), 9999990.0 );
                            SetVehicleNumberPlate( GetPlayerVehicleID( i ), "STUNT" );
                        }
                    }
                }
            }
       }
}

//=====================================================================================================

public WebTimer( )
{
       SendClientMessageToAll( COLOR_WHITE, "Visit our website http://dedicatedamericansex.com!" );
       SendClientMessageToAll( COLOR_WHITE, "DAS Teamspeak - dedicatedamericansex.com:8700" );
       SendClientMessageToAll( COLOR_YELLOW, "NEVER ASK FOR ADMIN!!!!!!!!!!!" );
       SendClientMessageToAll( COLOR_WHITE, "Now recruiting all regular players" );
}

//=====================================================================================================