24.03.2013, 15:52
can some one change into sscanf+zcmd style eg:CMD:mycommand and stuff pls help me
Quote:
// Vehicle Ownership + Fuel + Speedo system scripted by Rafstar // Email: dj_c4m3l0@hotmail.com // If you use this, keep my credits. #include <a_samp> #include <mysql> #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFFF #define COLOR_ADMIN 0xFF6347AA //================================================== ============================// new VehicleFuel[MAX_VEHICLES]; new VehicleLostFuel[MAX_VEHICLES]; new LocateCar[MAX_PLAYERS]; new MaxVehicles[MAX_PLAYERS]; forward UpFuel(playerid); forward UpLessFuel(playerid); forward ShowCInfo(playerid,vehicleid); forward IsAtGasStation(playerid); forward Refuel(playerid); #define MAX_VEHICLES_PER_PLAYER 3 //================================================== ============================// #define DB_HOST "" #define DB_USER "" #define DB_PASSWORD "" #define DB_NAME "" new query[512]; //================================================== ============================// enum Info { UpFuelT,ShowCarInfoT,UpLessFuelT, } new PlayerData[MAX_PLAYERS][Info]; enum Cars { Model,CarID,Locked,Name[20], Float:Carx,Float:Cary,Float:Carz,Float:Cara, Owner[20],Price,Sell,Color1,Color2, } new VehicleSystem[MAX_VEHICLES][Cars]; new IsBuyableCar[MAX_VEHICLES]; //================================================== ============================// public OnFilterScriptInit() { print(" "); print(" ::::::::::::::::::::::: Vehicle System by Rafstar Loaded :::::::::::::::::::::::"); print(" "); for(new i=0;i<MAX_PLAYERS;i++) { SetTimerEx("IsAtGasStation",2000,1,"i",i); } for(new i=0;i<MAX_VEHICLES;i++) { VehicleFuel[i]=10; } SetTimer("ConnectionMySQL",1000,1); // Connect to the database. mysql_init(); if(mysql_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)==0) { SendRconCommand("exit"); } else { // Create table if it does not exists. mysql_query("CREATE TABLE IF NOT EXISTS `Vehicles` \ (`CarID` INT NOT NULL,`Model` INT NOT NULL, `Locked` INT NOT NULL,\ `CarX` FLOAT NOT NULL, `CarY` FLOAT NOT NULL, `CarZ` FLOAT NOT NULL,\ `CarA` FLOAT NOT NULL, `Color1` INT NOT NULL, `Color2` INT NOT NULL,\ `Price` INT NOT NULL, `Sell` INT NOT NULL, `Owner` TEXT NOT NULL);"); AddVehicle(1, 411, random(126), random(126), 2, 1, 1, 1, 20000, 10000); AddVehicle(2, 487, random(126), random(126), 1857.5643,-2404.0781,13.7312,147.8930, 7500, 3750); AddVehicle(3, 487, random(126), random(126), 1645.1561,-2410.8271,13.7314,180.5002, 7500, 3750); AddVehicle(4, 487, random(126), random(126), 1726.0455,-2412.4343,13.7314,182.1203, 7500, 3750); AddVehicle(5, 511, random(126), random(126), 1617.5936,-2623.9812,14.9210,0.5811, 2500, 1250); AddVehicle(6, 519, random(126), random(126), 2046.3193,-2632.6555,14.4664,8.4377, 10000, 5000); AddVehicle(7, 519, random(126), random(126), 2004.1901,-2632.5447,14.4750,353.6805, 10000, 5000); AddVehicle(8, 535, random(126), random(126), 2112.9949,-2417.3352,13.3127,180.5945, 1000, 500); AddVehicle(9, 567, random(126), random(126), 1928.5243,-2141.4932,13.4190,179.5658, 3000, 1500); AddVehicle(10, 471, random(126), random(126), 1931.8961,-2142.3159,13.0408,178.0170, 500, 250); AddVehicle(11, 581, random(126), random(126), 1934.9962,-2142.7488,13.1580,179.6845, 700, 350); AddVehicle(12, 589, random(126), random(126), 1938.0437,-2142.1292,13.2193,179.6418, 600, 300); AddVehicle(13, 586, random(126), random(126), 1941.8820,-2142.1829,13.0685,171.5677, 700, 350); AddVehicle(14, 560, random(126), random(126), 1947.6863,-2110.8711,13.2498,269.6423, 5000, 2500); AddVehicle(15, 603, random(126), random(126), 1947.7517,-2117.3672,13.3914,269.6522, 3000, 1500); AddVehicle(16, 555, random(126), random(126), 1947.8921,-2130.1248,13.2309,269.2950, 800, 400); AddVehicle(17, 562, random(126), random(126), 1947.6113,-2123.6624,13.2024,268.6933, 3500, 750); AddVehicle(18, 521, random(126), random(126), 1947.8448,-2136.4541,13.1029,270.9482, 800, 400); AddVehicle(19, 521, random(126), random(126), 1557.9293,-1012.0895,23.4733,176.4507, 800, 400); AddVehicle(20, 451, random(126), random(126), 1563.0118,-1012.2620,23.6136,182.4485, 15000, 7500); AddVehicle(21, 516, random(126), random(126), 1572.2921,-1011.7139,23.7400,183.4062, 800, 400); AddVehicle(22, 507, random(126), random(126), 1576.2583,-1012.0344,23.7345,183.3794, 1000, 500); AddVehicle(23, 505, random(126), random(126), 1581.7416,-1011.6347,24.0502,185.9982, 800, 400); AddVehicle(24, 500, random(126), random(126), 1585.6982,-1010.6216,24.0134,186.1087, 600, 300); AddVehicle(25, 483, random(126), random(126), 1590.3379,-1010.4761,23.9010,185.5368, 700, 350); AddVehicle(26, 482, random(126), random(126), 1594.8879,-1009.5234,24.0262,185.1100, 800, 400); AddVehicle(27, 481, random(126), random(126), 1598.9071,-1009.4607,23.4241,181.2707, 60, 30); AddVehicle(28, 480, random(126), random(126), 1604.7583,-1008.8822,23.6592,183.5148, 900, 450); AddVehicle(29, 479, random(126), random(126), 1608.7345,-1008.2145,23.7026,177.9886, 500, 250); AddVehicle(30, 477, random(126), random(126), 1613.0959,-1009.4567,23.6614,177.5362, 10000, 5000); AddVehicle(31, 475, random(126), random(126), 1617.6381,-1008.7552,23.7122,178.1822, 600, 300); AddVehicle(32, 474, random(126), random(126), 1623.6458,-1010.1057,23.6635,163.2492, 1000, 500); AddVehicle(33, 475, random(126), random(126), 1627.8723,-1012.3134,23.7049,160.7843, 600, 300); AddVehicle(34, 468, random(126), random(126), 1636.3389,-1014.8278,23.5490,159.2050, 800, 400); AddVehicle(35, 468, random(126), random(126), 1641.1797,-1016.2929,23.5662,167.2997, 800, 400); AddVehicle(36, 463, random(126), random(126), 1644.9843,-1016.6088,23.4363,158.5594, 1500, 750); AddVehicle(37, 462, random(126), random(126), 1651.3917,-1017.5328,23.4861,190.7446, 300, 150); AddVehicle(38, 462, random(126), random(126), 1655.7271,-1016.6084,23.4931,190.5079, 300, 150); AddVehicle(39, 461, random(126), random(126), 1660.2509,-1014.9258,23.4834,192.4689, 1500, 750); AddVehicle(40, 444, random(126), random(126), 1664.6426,-1014.8688,24.2697,189.9105, 10000, 5000); AddVehicle(41, 439, random(126), random(126), 1674.3595,-1012.1425,23.7963,198.1483, 1000, 500); AddVehicle(42, 424, random(126), random(126), 1678.8011,-1011.3812,23.6784,196.6307, 2000, 1000); AddVehicle(43, 415, random(126), random(126), 1682.3468,-1009.1014,23.6724,198.7623, 10000, 5000); AddVehicle(44, 412, random(126), random(126), 1686.8716,-1008.1467,23.7442,197.8322, 15000, 7500); AddVehicle(45, 411, random(126), random(126), 1691.5480,-1007.1601,23.6327,198.2684, 20000, 10000); AddVehicle(46, 402, random(126), random(126), 1695.6646,-1006.5484,23.7429,198.9668, 8000, 4000); AddVehicle(47, 400, random(126), random(126), 1703.7426,-1006.1733,24.0001,175.5936, 1500, 750); AddVehicle(48, 587, random(126), random(126), 1708.4495,-1004.6717,23.6195,168.3876, 1400, 700); AddVehicle(49, 565, random(126), random(126), 1712.7100,-1005.2163,23.5341,170.7887, 1000, 500); AddVehicle(50, 560, random(126), random(126), 1717.151489, -1006.194396, 23.619228, 172.406066, 5000, 2500); AddVehicle(51, 562, random(126), random(126), 1567.6584,-1012.0562,23.5738,181.5361, 3500, 750); AddVehicle(52, 483, random(126), random(126), 2160.981933, -1172.825561, 23.811035, 89.426788, 700, 350); AddVehicle(53, 458, random(126), random(126), 2148.103027, -1194.268798, 23.709993, 269.465850, 400, 200); AddVehicle(54, 404, random(126), random(126), 2161.485595, -1192.360961, 23.553302, 88.551879, 200, 100); AddVehicle(55, 415, random(126), random(126), 2147.148925, -1148.333862, 24.171590, 267.297698, 10000, 5000); AddVehicle(56, 424, random(126), random(126), 2148.846923, -1133.606201, 25.345703, 264.620300, 2000, 1000); AddVehicle(57, 411, random(126), random(126), 736.859375, -1348.849731, 13.235929, 267.986938, 20000, 10000); AddVehicle(58, 411, random(126), random(126), -2234.220458, -1745.426269, 480.596679, 119.116539, 20000, 10000); AddVehicle(59, 604, random(126), random(126), 2356.454345, -1141.450439, 27.476781, 182.177352, 150, 75); AddVehicle(60, 604, random(126), random(126), 2520.111572, -1479.932739, 23.739372, 358.534973, 150, 75); AddVehicle(61, 605, random(126), random(126), 2475.169189, -1527.296508, 23.819576, 359.392364, 150, 75); AddVehicle(62, 508, random(126), random(126), 2448.170410, -1549.983642, 24.373203, 87.741638, 350, 175); AddVehicle(63, 560, random(126), random(126), 2508.954345, -1666.828613, 13.181206, 11.602129, 5000, 2500); AddVehicle(64, 506, random(126), random(126), 2504.027587, -1657.474609, 13.188393, 55.675945, 8000, 4000); AddVehicle(65, 505, random(126), random(126), 2505.975097, -1678.214355, 13.601548, 145.752395, 800, 400); AddVehicle(66, 500, random(126), random(126), 2488.331542, -1683.752685, 13.520336, 86.382141, 600, 300); AddVehicle(67, 482, random(126), random(126), 2485.126464, -1653.637084, 13.513024, 89.047080, 800, 400); AddVehicle(68, 462, random(126), random(126), 2471.297607, -1653.108520, 13.063842, 153.774780, 300, 150); AddVehicle(69, 463, random(126), random(126), 2468.279541, -1652.335571, 13.009730, 152.647659, 1500, 750); AddVehicle(70, 471, random(126), random(126), 2465.969482, -1671.590454, 12.962853, 11.132559, 500, 250); AddVehicle(71, 404, random(126), random(126), 1079.371948, -1769.617065, 13.091717, 89.252441, 200, 100); AddVehicle(72, 565, random(126), random(126), 1062.739135, -1769.654174, 12.989984, 268.922332, 1000, 500); AddVehicle(73, 402, random(126), random(126), 1098.948120, -1754.894165, 13.182271, 90.773658, 8000, 4000); AddVehicle(74, 409, random(126), random(126), 1063.202392, -1760.854370, 13.207931, 269.844055, 50000, 25000); AddVehicle(75, 426, random(126), random(126), 1081.535156, -1757.790893, 13.126852, 269.951232, 1000, 500); AddVehicle(76, 434, random(126), random(126), 1098.750610, -1760.814208, 13.309844, 89.731918, 30000, 15000); AddVehicle(77, 451, random(126), random(126), 1062.043579, -1740.349121, 13.177113, 270.763336, 15000, 7500); AddVehicle(78, 463, random(126), random(126), 1062.257446, -1752.059448, 12.984734, 268.622192, 1500, 750); AddVehicle(79, 462, random(126), random(126), 1061.908203, -1754.886596, 13.033358, 266.311981, 300, 150); AddVehicle(80, 461, random(126), random(126), 1082.294433, -1763.712768, 12.957151, 89.331787, 1500, 750); AddVehicle(81, 468, random(126), random(126), 1099.346191, -1772.400146, 13.014469, 88.256721, 800, 400); AddVehicle(82, 495, random(126), random(126), 1079.670043, -1775.713256, 13.693697, 269.912109, 10000, 5000); AddVehicle(83, 506, random(126), random(126), 1081.165405, -1746.524536, 13.145358, 270.596862, 8000, 4000); AddVehicle(84, 462, random(126), random(126), 311.313140, -1809.801269, 4.065101, 1.268368, 300, 150); AddVehicle(85, 522, random(126), random(126), 314.623443, -1809.868896, 4.034096, 359.312652, 1500, 750); AddVehicle(86, 541, random(126), random(126), 318.022521, -1810.062011, 4.088101, 0.222058, 2500, 1250); AddVehicle(87, 541, random(126), random(126), 337.460784, -1788.742187, 4.549467, 180.286056, 2500, 1250); AddVehicle(88, 536, random(126), random(126), 356.918640, -1809.494995, 4.265316, 0.209844, 2000, 1000); AddVehicle(89, 549, random(126), random(126), 350.377532, -1810.364257, 4.192773, 359.358276, 600, 300); AddVehicle(90, 556, random(126), random(126), 343.911895, -1809.396606, 4.893120, 0.079341, 25000, 12500); AddVehicle(91, 559, random(126), random(126), 337.357543, -1809.976318, 4.145243, 0.502693, 3000, 1500); AddVehicle(92, 568, random(126), random(126), 330.961822, -1809.636108, 4.342401, 0.376518, 10000, 5000); AddVehicle(93, 579, random(126), random(126), 324.363952, -1808.992919, 4.422060, 0.333358, 2500, 1250); AddVehicle(94, 589, random(126), random(126), 311.786834, -1788.291625, 4.236014, 179.471420, 600, 300); AddVehicle(95, 604, random(126), random(126), 321.376953, -1789.612915, 4.468529, 180.270523, 150, 75); AddVehicle(96, 605, random(126), random(126), 327.966156, -1788.579589, 4.659588, 178.491119, 150, 75); AddVehicle(97, 521, random(126), random(126), 334.469116, -1788.306396, 4.470613, 176.452545, 1500, 750); AddVehicle(98, 411, random(126), random(126), 1385.090698, -2207.990478, 13.266131, 179.455535, 20000, 10000); AddVehicle(99, 462, random(126), random(126), 1407.854858, -2242.020507, 13.146245, 359.452331, 300, 150); AddVehicle(100, 522, random(126), random(126), 1394.764282, -2241.423583, 13.123396, 178.114089, 1500, 750); AddVehicle(101, 463, random(126), random(126), 1385.347900, -2241.495361, 13.087042, 1.000291, 1500, 750); AddVehicle(102, 456, random(126), random(126), 1411.268798, -2226.650146, 13.716109, 179.624069, 200, 100); AddVehicle(103, 455, random(126), random(126), 1394.923461, -2224.550292, 13.983560, 359.399780, 300, 150); AddVehicle(104, 458, random(126), random(126), 1384.926757, -2225.414550, 13.425589, 179.978637, 600, 300); AddVehicle(105, 404, random(126), random(126), 1404.607177, -2208.645751, 13.271654, 179.652877, 200, 100); AddVehicle(106, 415, random(126), random(126), 1394.956176, -2208.063232, 13.306264, 180.130493, 3500, 1750); AddVehicle(107, 424, random(126), random(126), 1385.175781, -2208.004882, 13.320383, 178.155029, 2000, 1000); AddVehicle(108, 439, random(126), random(126), 1365.089233, -2214.414062, 13.442757, 270.624847, 1000, 500); AddVehicle(109, 444, random(126), random(126), 1364.747070, -2221.478515, 13.918177, 271.237457, 10000, 5000); AddVehicle(110, 458, random(126), random(126), 1365.318969, -2225.048828, 13.425448, 270.600189, 400, 200); AddVehicle(111, 461, random(126), random(126), 1365.165039, -2235.597656, 13.124637, 270.078399, 1500, 750); AddVehicle(112, 480, random(126), random(126), 1387.404663, -2262.592285, 13.320042, 181.066146, 1200, 600); AddVehicle(113, 475, random(126), random(126), 1397.345947, -2261.722900, 13.349046, 359.801574, 800, 400); AddVehicle(114, 468, random(126), random(126), 1410.386596, -2262.901123, 13.215886, 358.725067, 800, 400); AddVehicle(115, 468, random(126), random(126), 1365.135009, -2239.285156, 13.214963, 266.637023, 800, 400); AddVehicle(116, 471, random(126), random(126), 1364.784667, -2242.600585, 13.026857, 269.301177, 700, 350); AddVehicle(117, 477, random(126), random(126), 1365.377319, -2253.218017, 13.302045, 270.224670, 10000, 5000); AddVehicle(118, 479, random(126), random(126), 1414.693237, -2313.623535, 13.340890, 0.263992, 200, 100); AddVehicle(119, 489, random(126), random(126), 1404.668334, -2313.183837, 13.690905, 178.788497, 800, 400); AddVehicle(120, 451, random(126), random(126), 1401.540771, -2314.238037, 13.253744, 179.221588, 15000, 7500); AddVehicle(121, 500, random(126), random(126), 1394.842285, -2314.192382, 13.655872, 358.740112, 700, 350); AddVehicle(122, 506, random(126), random(126), 1385.040893, -2313.612304, 13.251278, 179.305923, 3500, 1250); AddVehicle(123, 562, random(126), random(126), 1388.243530, -2330.939208, 13.206514, 0.460681, 2000, 1000); AddVehicle(124, 462, random(126), random(126), 1395.038696, -2331.405273, 13.146337, 178.454315, 300, 150); AddVehicle(125, 522, random(126), random(126), 1398.266967, -2331.005371, 13.117198, 1.668439, 1500, 750); AddVehicle(126, 463, random(126), random(126), 1415.267333, -2330.912841, 13.087264, 358.711181, 1500, 750); AddVehicle(127, 603, random(126), random(126), 1407.931762, -2331.056152, 13.384974, 180.329696, 3500, 1750); AddVehicle(128, 605, random(126), random(126), 1404.846069, -2348.139160, 13.356414, 359.232299, 150, 75); AddVehicle(129, 604, random(126), random(126), 1394.804809, -2348.411376, 13.280869, 179.851623, 150, 75); AddVehicle(130, 609, random(126), random(126), 1411.333251, -2364.732177, 13.617335, 359.372070, 300, 150); AddVehicle(131, 499, random(126), random(126), 1388.155273, -2365.160156, 13.539256, 179.995117, 200, 100); AddVehicle(132, 504, random(126), random(126), 1365.048706, -2358.506591, 13.339180, 269.235137, 25000, 12500); AddVehicle(133, 489, random(126), random(126), 1364.565917, -2347.748779, 13.689991, 269.902404, 1000, 500); AddVehicle(134, 478, random(126), random(126), 1365.645141, -2330.219482, 13.539828, 269.375793, 200, 100); AddVehicle(135, 481, random(126), random(126), 1365.011840, -2316.737548, 13.065000, 268.212585, 50, 25); // // //Here you add more vehicles !! // // } } //================================================== ============================// public OnFilterScriptExit() { print(" "); print(" ::::::::::::::::::::::: Vehicle System by Rafstar UnLoaded ::::::::::::::::::::::: "); print(" "); mysql_close(); } //================================================== ============================// public OnPlayerConnect(playerid) { SendClientMessage(playerid, COLOR_WHITE, "[ » ] MySQL based Vehicle System by Rafstar !"); SendClientMessage(playerid, COLOR_YELLOW, "[ » ] type /carhelp to see the cmds available"); } public OnPlayerDisconnect(playerid) { if(PlayerData[playerid][ShowCarInfoT]) { KillTimer(PlayerData[playerid][ShowCarInfoT]); } if(PlayerData[playerid][UpFuelT]) { KillTimer(PlayerData[playerid][UpFuelT]); } if(PlayerData[playerid][UpLessFuelT]) { KillTimer(PlayerData[playerid][UpLessFuelT]); } } //================================================== ============================// public OnPlayerUpdate(playerid) { new vehicleid = GetPlayerVehicleID(playerid); if(IsPlayerInAnyVehicle(playerid)) { if(IsPlayerConnected(GetPlayerIdFromName(VehicleSy stem[IsBuyableCar[vehicleid]][Owner])) && GetPlayerIdFromName(VehicleSystem[IsBuyableCar[vehicleid]][Owner]) != playerid) { if(VehicleSystem[IsBuyableCar[vehicleid]][Locked]==1) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY, "[ » ] This vehicle is locked by the user, you can't drive it !"); } } } return 1; } //================================================== ============================// public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == 1) { KillTimer(PlayerData[playerid][ShowCarInfoT]); KillTimer(PlayerData[playerid][UpFuelT]); KillTimer(PlayerData[playerid][UpLessFuelT]); } if(newstate == 2) { PlayerData[playerid][ShowCarInfoT] = SetTimerEx("ShowCInfo",500,1,"i",playerid); PlayerData[playerid][UpFuelT] = SetTimerEx("UpFuel",60000,1,"i",playerid); PlayerData[playerid][UpLessFuelT] = SetTimerEx("UpLessFuel",500,1,"i",playerid); VehicleLostFuel[GetPlayerVehicleID(playerid)]=0; } return 1; } //================================================== ============================// public OnPlayerEnterCheckpoint(playerid) { if(LocateCar[playerid]) { SendClientMessage(playerid,COLOR_GREY,"[ » ] You are near to your vehicle !"); DisablePlayerCheckpoint(playerid); } return 1; } //================================================== ============================// public OnPlayerEnterVehicle(playerid, vehicleid) { new string[128]; if(IsBuyableCar[vehicleid]!=0) { GetVehicleName(vehicleid); if(strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],PlayerName(playerid))) { format(string,sizeof(string),"[ » ] Vehicle ID: %d / Name: %s / Bought by: %s !",VehicleSystem[IsBuyableCar[vehicleid]][CarID],VehicleSystem[IsBuyableCar[vehicleid]][Name],VehicleSystem[IsBuyableCar[vehicleid]][Owner]); SendClientMessage(playerid,COLOR_GREY,string); } else if(strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],"Unbought")) { format(string,sizeof(string),"[ » ] Vehicle ID: %d / Name: %s / Price: %d$ !",VehicleSystem[IsBuyableCar[vehicleid]][CarID],VehicleSystem[IsBuyableCar[vehicleid]][Name],VehicleSystem[IsBuyableCar[vehicleid]][Price]); SendClientMessage(playerid,COLOR_GREY,string); } else { format(string,sizeof(string),"[ » ] Vehicle ID: %d / Name: %s / Bought by: %s !",VehicleSystem[IsBuyableCar[vehicleid]][CarID],VehicleSystem[IsBuyableCar[vehicleid]][Name],VehicleSystem[IsBuyableCar[vehicleid]][Owner]); SendClientMessage(playerid,COLOR_GREY,string); } if(IsPlayerConnected(GetPlayerIdFromName(VehicleSy stem[IsBuyableCar[vehicleid]][Owner])) && GetPlayerIdFromName(VehicleSystem[IsBuyableCar[vehicleid]][Owner]) != playerid) { if(VehicleSystem[IsBuyableCar[vehicleid]][Locked]==1) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_GREY, "[ » ] This vehicle is locked by the user, you can't drive it !"); } } } return 1; } //================================================== ============================// public OnPlayerExitVehicle(playerid, vehicleid) { if(IsBuyableCar[vehicleid]!=0) { if(strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],PlayerName(playerid))) { new Float:vx,Float:vy,Float:vz,Float:va; GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,v z); GetVehicleZAngle(GetPlayerVehicleID(playerid),va); VehicleSystem[IsBuyableCar[vehicleid]][Carx]=vx; VehicleSystem[IsBuyableCar[vehicleid]][Cary]=vy; VehicleSystem[IsBuyableCar[vehicleid]][Carz]=vz; VehicleSystem[IsBuyableCar[vehicleid]][Cara]=va; SendClientMessage(playerid, COLOR_GREY, "[ » ] Your vehicle position has been saved !"); SaveMYSQLCarID(vehicleid); } } return 1; } //================================================== ============================// public OnVehicleRespray(playerid,vehicleid, color1, color2) { if(IsBuyableCar[vehicleid]!=0) { if(strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],PlayerName(playerid))) { VehicleSystem[IsBuyableCar[vehicleid]][Color1] = color1; VehicleSystem[IsBuyableCar[vehicleid]][Color2] = color2; SaveMYSQLCarID(vehicleid); } } return 1; } //================================================== ============================// public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256],tmp[256],idx; new string[128]; new vehicleid = GetPlayerVehicleID(playerid); cmd = strtok(cmdtext, idx); //================================================== ============================// // LOCK VEHICLE if(strcmp(cmd, "/lockmycar", true) ==0 ) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"[ » ] You are not in a vehicle !"); if(IsBuyableCar[vehicleid]) { if(strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],PlayerName(playerid))) { if(VehicleSystem[IsBuyableCar[vehicleid]][Locked]==0) { VehicleSystem[IsBuyableCar[vehicleid]][Locked]=1; SendClientMessage(playerid,COLOR_GREEN,"[ » ] You have locked your vehicle !"); SaveMYSQLCarID(vehicleid); } else if(VehicleSystem[IsBuyableCar[vehicleid]][Locked]==1) { VehicleSystem[IsBuyableCar[vehicleid]][Locked]=0; SendClientMessage(playerid,COLOR_YELLOW,"[ » ] You have unlocked your vehicle !"); SaveMYSQLCarID(vehicleid); } } } else return SendClientMessage(playerid,COLOR_YELLOW,"[ » ] You don't own this vehicle to lock it !"); return 1; } //================================================== ============================// // BUY VEHICLE if (strcmp(cmd, "/buycar", true) ==0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"[ » ] You are not in a vehicle !"); if(IsBuyableCar[vehicleid]) { if (strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],PlayerName(playerid))) return SendClientMessage(playerid,COLOR_RED,"[ » ] You already own this vehicle !"); if (strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],"Unbought")) { if(VehicleSystem[IsBuyableCar[vehicleid]][Price] > GetPlayerMoney(playerid)) return SendClientMessage(playerid,COLOR_RED,"[ » ] Not enought Dollars !"); MaxVehicles[playerid]=0; for(new i=0;i<MAX_VEHICLES;i++) { if(strmatch(VehicleSystem[i][Owner],PlayerName(playerid))) { MaxVehicles[playerid]=MaxVehicles[playerid]+1; } } if(MaxVehicles[playerid]>=MAX_VEHICLES_PER_PLAYER) return SendClientMessage(playerid,COLOR_RED,"[ » ] You already own the limit of vehicles !"); strmid(VehicleSystem[IsBuyableCar[vehicleid]][Owner],PlayerName(playerid),0,20,20); VehicleSystem[IsBuyableCar[vehicleid]][Locked]=0; GivePlayerMoney(playerid,-VehicleSystem[IsBuyableCar[vehicleid]][Price]); SendClientMessage(playerid,COLOR_GREEN,"[ » ] You have bought this vehicle !"); format(string,sizeof(string), "[ » ] You lost %d $ !",VehicleSystem[IsBuyableCar[vehicleid]][Price]); SendClientMessage(playerid, COLOR_YELLOW, string); SaveMYSQLCarID(vehicleid); } else { SendClientMessage(playerid,COLOR_RED,"[ » ] This vehicle is not for sale !"); } } else { SendClientMessage(playerid,COLOR_RED,"[ » ] This is not a buyable vehicle !"); } return 1; } //================================================== ============================// // SELL VEHICLE if(strcmp(cmd, "/sellcar", true) == 0 ) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"[ » ] You are not in a vehicle !"); if(IsBuyableCar[vehicleid]) { if (strmatch(VehicleSystem[IsBuyableCar[vehicleid]][Owner],PlayerName(playerid))) { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Owner],"Unbought",0,20,20); SendClientMessage(playerid,COLOR_GREEN,"[ » ] You have sold your vehicle !"); GivePlayerMoney(playerid,VehicleSystem[IsBuyableCar[vehicleid]][Sell]); format(string,sizeof(string), "[ » ] You gain %d $ !",VehicleSystem[IsBuyableCar[vehicleid]][Sell]); SendClientMessage(playerid, COLOR_YELLOW, string); SaveMYSQLCarID(vehicleid); } else { SendClientMessage(playerid,COLOR_RED,"[ » ] This is not your vehicle !"); } } return 1; } //================================================== ============================// // LOCALTE VEHICLE if(strcmp(cmd, "/whereismycar", true) == 0) { tmp = strtok(cmdtext, idx); new Float:LocX,Float:LocY,Float:LocZ; if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "[ » ] You need to type /whereismycar CarID (if you dont know the IDs check with /mycars)"); for(new i=1;i<MAX_VEHICLES;i++) { if(VehicleSystem[i][CarID]==strval(tmp)) { if(strmatch(VehicleSystem[i][Owner],PlayerName(playerid))) { GetVehiclePos(i,Float:LocX,Float:LocY,Float:LocZ); LocateCar[playerid] = SetPlayerCheckpoint(playerid,LocX,LocY,LocZ,10); SendClientMessage(playerid,COLOR_GREY,"[ » ] Your vehicle position is marked on your map !"); } else { SendClientMessage(playerid,COLOR_RED,"[ » ] This is not your vehicle !"); } } } return 1; } //================================================== ============================// // CALL VEHICLE if(strcmp(cmd, "/callmycar", true) == 0) { tmp = strtok(cmdtext, idx); new Floatlayerx,Floatlayery,Floatlayerz,Floatl ayera; if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "[ » ] You need to type /callmycar CarID (if you dont know the IDs check with /mycars)"); if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "[ » ] You can't call your vehicle being on a vehicle !"); for(new i=1;i<MAX_VEHICLES;i++) { if(VehicleSystem[i][CarID]==strval(tmp)) { if(IsPlayerAdmin(playerid)) // RCON Admin { GetPlayerPos(playerid,playerx,playery,playerz); GetPlayerFacingAngle(playerid,playera); DestroyVehicle(i); CreateVehicle(VehicleSystem[i][Model],playerx,playery,playerz,playera,VehicleSystem[i][Color1],VehicleSystem[i][Color2],600000); IsBuyableCar[i]=VehicleSystem[i][CarID]; SendClientMessage(playerid,COLOR_ADMIN,"[ » ] That vehicle was teleported to you !"); PutPlayerInVehicle(playerid,i,0); } else if(strmatch(VehicleSystem[i][Owner],PlayerName(playerid))) { if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_RED, "[ » ] You dont have money to call your vehicle !"); GetPlayerPos(playerid,playerx,playery,playerz); GetPlayerFacingAngle(playerid,playera); DestroyVehicle(i); CreateVehicle(VehicleSystem[i][Model],playerx,playery,playerz,playera,VehicleSystem[i][Color1],VehicleSystem[i][Color2],600000); IsBuyableCar[i]=VehicleSystem[i][CarID]; GivePlayerMoney(playerid,-100); SendClientMessage(playerid,COLOR_GREY,"[ » ] Your vehicle was teleported to you !"); SendClientMessage(playerid,COLOR_YELLOW,"[ » ] You lost 100 $ !"); PutPlayerInVehicle(playerid,i,0); } else { SendClientMessage(playerid,COLOR_RED,"[ » ] This is not your vehicle !"); } } } return 1; } //================================================== ============================// // MY VEHICLES if(strcmp(cmd, "/mycars", true) == 0) { for(new i=1;i<MAX_VEHICLES;i++) { if(strmatch(VehicleSystem[i][Owner],PlayerName(playerid))) { GetVehicleName(i); format(string,sizeof(string), "> '%s' CarID: %d <",VehicleSystem[i][Name],VehicleSystem[i][CarID]); SendClientMessage(playerid,COLOR_YELLOW,string); } } return 1; } //================================================== ============================// // MY VEHICLES if(strcmp(cmd, "/carhelp", true) == 0) { SendClientMessage(playerid,COLOR_GREEN,"- Vehicle commands available: -"); SendClientMessage(playerid,COLOR_YELLOW,"> /buycar <"); SendClientMessage(playerid,COLOR_YELLOW,"> /sellcar <"); SendClientMessage(playerid,COLOR_YELLOW,"> /lockmycar <"); SendClientMessage(playerid,COLOR_YELLOW,"> /whereismycar CarID <"); SendClientMessage(playerid,COLOR_YELLOW,"> /callmycar CarID <"); SendClientMessage(playerid,COLOR_YELLOW,"> /mycars <"); if(IsPlayerAdmin(playerid)) { SendClientMessage(playerid,COLOR_ADMIN,"> /callmycar CarID <"); SendClientMessage(playerid,COLOR_ADMIN,"> /setcarowner CarID Owner <"); SendClientMessage(playerid,COLOR_ADMIN,"> /setcarprice CarID Price <"); SendClientMessage(playerid,COLOR_ADMIN,"> /setpark <"); } return 1; } //================================================== ============================// // ADMIN SET VEHICLE OWNER if(strcmp(cmd, "/setcarowner", true) == 0) { if(!IsPlayerAdmin(playerid)) return 0; tmp = strtok(cmdtext, idx); new id=strval(tmp); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ADMIN, "[ » ] You need to type /setcarowner CarID Owner"); tmp = bigstrtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ADMIN, "[ » ] You need to type /setcarowner CarID 'Owner'"); for(new i=1;i<MAX_VEHICLES;i++) { if(VehicleSystem[i][CarID]==id) { strmid(VehicleSystem[i][Owner],tmp,0,20,20); SaveMYSQLCarID(i); SendClientMessage(playerid,COLOR_ADMIN,"[ » ] This vehicle owner has been changed !"); } } return 1; } // ADMIN SET VEHICLE PRICE if(strcmp(cmd, "/setcarprice", true) == 0) { if(!IsPlayerAdmin(playerid)) return 0; tmp = strtok(cmdtext, idx); new id=strval(tmp); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ADMIN, "[ » ] You need to type /setcarprice CarID price"); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ADMIN, "[ » ] You need to type /setcarprice CarID price"); for(new i=1;i<MAX_VEHICLES;i++) { if(VehicleSystem[i][CarID]==id) { VehicleSystem[i][Price]=strval(tmp); SaveMYSQLCarID(i); SendClientMessage(playerid,COLOR_ADMIN,"[ » ] This vehicle price has been changed !"); } } return 1; } // ADMIN SET VEHICLE PARK if(strcmp(cmd, "/setpark", true) == 0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_ADMIN,"[ » ] You are not in a vehicle !"); if(IsBuyableCar[vehicleid]) { new Float:vx,Float:vy,Float:vz,Float:va; GetVehiclePos(GetPlayerVehicleID(playerid),vx,vy,v z); GetVehicleZAngle(GetPlayerVehicleID(playerid),va); VehicleSystem[vehicleid][Carx]=vx; VehicleSystem[vehicleid][Cary]=vy; VehicleSystem[vehicleid][Carz]=vz; VehicleSystem[vehicleid][Cara]=va; SendClientMessage(playerid,COLOR_ADMIN,"[ » ] This vehicle was parked current location !"); SaveMYSQLCarID(vehicleid); } else { SendClientMessage(playerid,COLOR_ADMIN,"[ » ] You cant park this vehicle !"); } return 1; } return 0; } //================================================== ============================// public ShowCInfo(playerid) { new string[128]; if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { if(IsBiciyle(playerid)) return 0; if(VehicleFuel[GetPlayerVehicleID(playerid)] < 0) { VehicleFuel[GetPlayerVehicleID(playerid)] = 0; } if(GetPlayerSpeed(playerid,true) < 10) { switch(VehicleLostFuel[GetPlayerVehicleID(playerid)]) { case 0: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~l~IIIIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~I~l~IIIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~II~l~IIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~III~l~IIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIII~l~IIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIII~l~IIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIII~l~IIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIII~l~III ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIII~l~II ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIII~l~I ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 1: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~l~IIIIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~I~l~IIIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~II~l~IIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~III~l~IIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIII~l~IIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIII~l~IIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIII~l~IIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIII~l~III ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIII~l~II ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIII~l~I ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 2: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~l~IIIIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~I~l~IIIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~II~l~IIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~III~l~IIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIII~l~IIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIII~l~IIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIII~l~IIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIII~l~III ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIII~l~II ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIII~l~I ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 3: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~l~IIIIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~I~l~IIIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~II~l~IIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~III~l~IIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIII~l~IIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIII~l~IIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIII~l~IIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIII~l~III ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIII~l~II ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIII~l~I ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 4: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~l~IIIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~I~l~IIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~II~l~IIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~III~l~IIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIII~l~IIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIII~l~IIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIII~l~IIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIII~l~III ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIII~l~II ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIII~l~I ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 5: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~l~IIIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~I~l~IIIIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~II~l~IIIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~III~l~IIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIII~l~IIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIII~l~IIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIII~l~IIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIII~l~III ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIII~l~II ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIII~l~I ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~00%d ~g~IIIIIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } } } else if(GetPlayerSpeed(playerid,true) < 100) { switch(VehicleLostFuel[GetPlayerVehicleID(playerid)]) { case 0: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~l~IIIIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~I~l~IIIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~II~l~IIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~III~l~IIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIII~l~IIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIII~l~IIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIII~l~IIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIII~l~III ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIII~l~II ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIII~l~I ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 1: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~l~IIIIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~I~l~IIIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~II~l~IIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~III~l~IIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIII~l~IIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIII~l~IIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIII~l~IIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIII~l~III ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIII~l~II ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIII~l~I ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 2: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~l~IIIIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~I~l~IIIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~II~l~IIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~III~l~IIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIII~l~IIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIII~l~IIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIII~l~IIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIII~l~III ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIII~l~II ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIII~l~I ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 3: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~l~IIIIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~I~l~IIIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~II~l~IIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~III~l~IIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIII~l~IIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIII~l~IIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIII~l~IIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIII~l~III ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIII~l~II ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIII~l~I ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 4: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~l~IIIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~I~l~IIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~II~l~IIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~III~l~IIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIII~l~IIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIII~l~IIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIII~l~IIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIII~l~III ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIII~l~II ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIII~l~I ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 5: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~l~IIIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~I~l~IIIIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~II~l~IIIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~III~l~IIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIII~l~IIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIII~l~IIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIII~l~IIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIII~l~III ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIII~l~II ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIII~l~I ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~0%d ~g~IIIIIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } } } else { switch(VehicleLostFuel[GetPlayerVehicleID(playerid)]) { case 0: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~l~IIIIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~I~l~IIIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~II~l~IIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~III~l~IIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIII~l~IIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIII~l~IIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIII~l~IIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIII~l~III ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIII~l~II ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIII~l~I ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIIII ~l~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 1: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~l~IIIIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~I~l~IIIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~II~l~IIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~III~l~IIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIII~l~IIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIII~l~IIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIII~l~IIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIII~l~III ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIII~l~II ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIII~l~I ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIIII ~r~I~l~IIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 2: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~l~IIIIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~I~l~IIIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~II~l~IIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~III~l~IIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIII~l~IIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIII~l~IIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIII~l~IIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIII~l~III ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIII~l~II ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIII~l~I ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIIII ~r~II~l~III",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 3: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~l~IIIIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~I~l~IIIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~II~l~IIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~III~l~IIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIII~l~IIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIII~l~IIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIII~l~IIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIII~l~III ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIII~l~II ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIII~l~I ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIIII ~r~III~l~II",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 4: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~l~IIIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~I~l~IIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~II~l~IIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~III~l~IIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIII~l~IIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIII~l~IIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIII~l~IIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIII~l~III ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIII~l~II ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIII~l~I ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } case 5: { switch(VehicleFuel[GetPlayerVehicleID(playerid)]) { case 0: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~l~IIIIIIIIII ~r~IIII~l~I",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle has no fuel !"); } case 1: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~I~l~IIIIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 2: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~II~l~IIIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 3: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~III~l~IIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 4: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIII~l~IIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 5: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIII~l~IIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 6: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIII~l~IIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 7: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIII~l~III ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 8: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIII~l~II ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 9: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIII~l~I ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } case 10: { format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n ~~n~~n~~n~~b~KM/H: ~w~%d ~g~IIIIIIIIII ~r~IIIII",GetPlayerSpeed(playerid,true)); GameTextForPlayer(playerid,string,2500,3); } } } } } } } return 1; } //================================================== ============================// public UpLessFuel(playerid) { if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { if(IsBiciyle(playerid)) return 0; if(GetPlayerSpeed(playerid,true) < 10) { VehicleLostFuel[GetPlayerVehicleID(playerid)]=0; } else if(GetPlayerSpeed(playerid,true) < 20) { VehicleLostFuel[GetPlayerVehicleID(playerid)]=1; } else if(GetPlayerSpeed(playerid,true) > 20 && GetPlayerSpeed(playerid,true) < 80) { VehicleLostFuel[GetPlayerVehicleID(playerid)]=2; } else if(GetPlayerSpeed(playerid,true) > 80 && GetPlayerSpeed(playerid,true) < 160) { VehicleLostFuel[GetPlayerVehicleID(playerid)]=3; } else if(GetPlayerSpeed(playerid,true) > 160 && GetPlayerSpeed(playerid,true) < 180) { VehicleLostFuel[GetPlayerVehicleID(playerid)]=4; } else if(GetPlayerSpeed(playerid,true) > 180) { VehicleLostFuel[GetPlayerVehicleID(playerid)]=5; } } } return 1; } //================================================== ============================// public UpFuel(playerid) { if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { if(IsBiciyle(playerid)) return 0; if(GetPlayerSpeed(playerid,true) < 10) { VehicleFuel[GetPlayerVehicleID(playerid)] = VehicleFuel[GetPlayerVehicleID(playerid)]; } else if(GetPlayerSpeed(playerid,true) < 35) { VehicleFuel[GetPlayerVehicleID(playerid)] = VehicleFuel[GetPlayerVehicleID(playerid)] - 1; } else if(GetPlayerSpeed(playerid,true) > 35 && GetPlayerSpeed(playerid,true) < 70) { VehicleFuel[GetPlayerVehicleID(playerid)] = VehicleFuel[GetPlayerVehicleID(playerid)] - 2; } else if(GetPlayerSpeed(playerid,true) > 70 && GetPlayerSpeed(playerid,true) < 140) { VehicleFuel[GetPlayerVehicleID(playerid)] = VehicleFuel[GetPlayerVehicleID(playerid)] - 3; } else if(GetPlayerSpeed(playerid,true) > 140 && GetPlayerSpeed(playerid,true) < 180) { VehicleFuel[GetPlayerVehicleID(playerid)] = VehicleFuel[GetPlayerVehicleID(playerid)] - 4; } else if(GetPlayerSpeed(playerid,true) > 180) { VehicleFuel[GetPlayerVehicleID(playerid)] = VehicleFuel[GetPlayerVehicleID(playerid)] - 5; } } } return 1; } //================================================== ============================// public IsAtGasStation(playerid) { if(IsPlayerConnected(playerid)) { if(PlayerToPoint(6.0,playerid,1004.0070,-939.3102,42.1797) || PlayerToPoint(6.0,playerid,1944.3260,-1772.9254,13.3906)) {//LS Refuel(playerid); } else if(PlayerToPoint(6.0,playerid,-90.5515,-1169.4578,2.4079) || PlayerToPoint(6.0,playerid,-1609.7958,-2718.2048,48.5391)) {//LS Refuel(playerid); } else if(PlayerToPoint(6.0,playerid,-2029.4968,156.4366,28.949 || PlayerToPoint(8.0,playerid,-2408.7590,976.0934,45.4175)) {//SF Refuel(playerid); } else if(PlayerToPoint(5.0,playerid,-2243.9629,-2560.6477,31.8841) || PlayerToPoint(8.0,playerid,-1676.6323,414.0262,6.9484)) {//Between LS and SF Refuel(playerid); } else if(PlayerToPoint(6.0,playerid,2202.2349,2474.3494, 10.525 || PlayerToPoint(10.0,playerid,614.9333,1689.7418,6.6 96) {//LV Refuel(playerid); } else if(PlayerToPoint(8.0,playerid,-1328.8250,2677.2173,49.7665) || PlayerToPoint(6.0,playerid,70.3882,1218.6783,18.51 65)) {//LV Refuel(playerid); } else if(PlayerToPoint(8.0,playerid,2113.7390,920.1079,1 0.5255) || PlayerToPoint(6.0,playerid,-1327.7218,2678.8723,50.0625)) {//LV Refuel(playerid); } else if(PlayerToPoint(8.0,playerid,656.4265,-559.8610,16.5015) || PlayerToPoint(6.0,playerid,656.3797,-570.4138,16.5015)) {//Dillimore Refuel(playerid); } } return 1; } //================================================== ============================// public Refuel(playerid) { if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { if(GetPlayerState(playerid)==2) { if(IsBiciyle(playerid)) return 0; if(VehicleFuel[GetPlayerVehicleID(playerid)]==10) { SendClientMessage(playerid, COLOR_RED, "[ » ] This vehicle can't be refueled because the tank is already full !"); } else { if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, COLOR_RED, "[ » ] You dont have money to refuel your vehicle !"); GivePlayerMoney(playerid,-1); // Change it if you use other type of money ! SendClientMessage(playerid, COLOR_RED, "[ » ] You lost 1 $ !"); VehicleFuel[GetPlayerVehicleID(playerid)]=VehicleFuel[GetPlayerVehicleID(playerid)]+1; } } } } return 1; } //================================================== ============================// forward SaveMYSQLCarID(vehicleid); public SaveMYSQLCarID(vehicleid) { format(query, sizeof(query),"UPDATE `Vehicles` SET `Locked` = '%d', `CarX` = '%f' , `CarY` = '%f' , `CarZ` = '%f' , `CarA`= '%f' , `Color1` = '%d' , `Color2` = '%d' , `Price` = '%d' , `Owner` = '%s' WHERE CarID = '%d';", VehicleSystem[vehicleid][Locked], VehicleSystem[vehicleid][Carx], VehicleSystem[vehicleid][Cary], VehicleSystem[vehicleid][Carz], VehicleSystem[vehicleid][Cara], VehicleSystem[vehicleid][Color1], VehicleSystem[vehicleid][Color2], VehicleSystem[vehicleid][Price], VehicleSystem[vehicleid][Owner], VehicleSystem[vehicleid][CarID]); mysql_query(query); return 1; } //================================================== ============================// AddVehicle(Carid, Carmodel, Carcolor1, Carcolor2, Float:CarX, Float:CarY, Float:CarZ, Float:CarA, CarCost, CarSell) { new data[256]; format(query, sizeof(query), "SELECT * FROM `Vehicles` WHERE CarID = '%d';",Carid); mysql_query(query); mysql_store_result(); if(mysql_num_rows() > 0) { printf(""); printf(" ::::::::::::::::::::::: Car Loaded :::::::::::::::::::::::"); printf(""); mysql_fetch_field("CarID",data); VehicleSystem[Carid][CarID]=strval(data); format(data, sizeof(data), " CarID: %d", VehicleSystem[Carid][CarID]); printf(data); mysql_fetch_field("Model",data); VehicleSystem[Carid][Model]=strval(data); format(data, sizeof(data), " CarModel: %d", VehicleSystem[Carid][Model]); printf(data); mysql_fetch_field("Locked",data); VehicleSystem[Carid][Locked]=strval(data); format(data, sizeof(data), " CarLocked: %d", VehicleSystem[Carid][Locked]); printf(data); mysql_fetch_field("CarX",data); VehicleSystem[Carid][Carx]=strval(data); format(data, sizeof(data), " CarX: %f", VehicleSystem[Carid][Carx]); printf(data); mysql_fetch_field("CarY",data); VehicleSystem[Carid][Cary]=strval(data); format(data, sizeof(data), " CarY: %f", VehicleSystem[Carid][Cary]); printf(data); mysql_fetch_field("CarZ",data); VehicleSystem[Carid][Carz]=strval(data); format(data, sizeof(data), " CarZ: %f", VehicleSystem[Carid][Carz]); printf(data); mysql_fetch_field("CarA",data); VehicleSystem[Carid][Cara]=strval(data); format(data, sizeof(data), " CarA: %f", VehicleSystem[Carid][Cara]); printf(data); mysql_fetch_field("Color1",data); VehicleSystem[Carid][Color1]=strval(data); format(data, sizeof(data), " CarColor1: %d", VehicleSystem[Carid][Color1]); printf(data); mysql_fetch_field("Color2",data); VehicleSystem[Carid][Color2]=strval(data); format(data, sizeof(data), " CarColor2: %d", VehicleSystem[Carid][Color2]); printf(data); mysql_fetch_field("Price",data); VehicleSystem[Carid][Price]=strval(data); format(data, sizeof(data), " CarPrice: %d", VehicleSystem[Carid][Price]); printf(data); mysql_fetch_field("Sell",data); VehicleSystem[Carid][Sell]=strval(data); format(data, sizeof(data), " CarSell: %d", VehicleSystem[Carid][Sell]); printf(data); mysql_fetch_field("Owner",data); strmid(VehicleSystem[Carid][Owner],data,0,20,20); format(data, sizeof(data), " CarOwner: %s", VehicleSystem[Carid][Owner]); printf(data); printf(""); new carr = CreateVehicle(VehicleSystem[Carid][Model],VehicleSystem[Carid][Carx],VehicleSystem[Carid][Cary],VehicleSystem[Carid][Carz]+5,VehicleSystem[Carid][Cara],VehicleSystem[Carid][Color1],VehicleSystem[Carid][Color2],600000); IsBuyableCar[carr]=Carid; } else { printf(""); printf(" ::::::::::::::::::::::: Car Created :::::::::::::::::::::::"); printf(""); VehicleSystem[Carid][CarID]=Carid; VehicleSystem[Carid][Model]=Carmodel; VehicleSystem[Carid][Locked]=0; VehicleSystem[Carid][Carx]=CarX; VehicleSystem[Carid][Cary]=CarY; VehicleSystem[Carid][Carz]=CarZ; VehicleSystem[Carid][Cara]=CarA; VehicleSystem[Carid][Color1]=Carcolor1; VehicleSystem[Carid][Color2]=Carcolor2; VehicleSystem[Carid][Price]=CarCost; VehicleSystem[Carid][Sell]=CarSell; strmid(VehicleSystem[Carid][Owner],"Unbought",0,20,20); format(query, sizeof(query),"INSERT INTO `Vehicles` (`CarID` ,`Model` ,`Locked` ,`CarX` ,`CarY` ,`CarZ` ,`CarA` ,`Color1` ,`Color2` ,`Price` ,`Sell` ,`Owner`) VALUES ('%d', '%d', '0', '%f', '%f', '%f', '%f', '%d', '%d', '%d', '%d', 'Unbought');",Carid, Carmodel, CarX, CarY, CarZ, CarA, Carcolor1, Carcolor2, CarCost, CarSell); mysql_query(query); format(data, sizeof(data), " CarID: %d", VehicleSystem[Carid][CarID]); printf(data); format(data, sizeof(data), " CarModel: %d", VehicleSystem[Carid][Model]); printf(data); format(data, sizeof(data), " CarLocked: %d", VehicleSystem[Carid][Locked]); printf(data); format(data, sizeof(data), " CarX: %f", VehicleSystem[Carid][Carx]); printf(data); format(data, sizeof(data), " CarY: %f", VehicleSystem[Carid][Cary]); printf(data); format(data, sizeof(data), " CarZ: %f", VehicleSystem[Carid][Carz]); printf(data); format(data, sizeof(data), " CarA: %f", VehicleSystem[Carid][Cara]); printf(data); format(data, sizeof(data), " CarColor1: %d", VehicleSystem[Carid][Color1]); printf(data); format(data, sizeof(data), " CarColor2: %d", VehicleSystem[Carid][Color2]); printf(data); format(data, sizeof(data), " CarPrice: %d", VehicleSystem[Carid][Price]); printf(data); format(data, sizeof(data), " CarSell: %d", VehicleSystem[Carid][Sell]); printf(data); format(data, sizeof(data), " CarOwner: %s", VehicleSystem[Carid][Owner]); printf(data); printf(""); new carr = CreateVehicle(VehicleSystem[Carid][Model],VehicleSystem[Carid][Carx],VehicleSystem[Carid][Cary],VehicleSystem[Carid][Carz]+5,VehicleSystem[Carid][Cara],VehicleSystem[Carid][Color1],VehicleSystem[Carid][Color2],600000); IsBuyableCar[carr]=Carid; } mysql_free_result(); return 1; } //================================================== ============================// stock GetVehicleName(vehicleid) { new vehicle = GetVehicleModel(vehicleid); switch(vehicle) { case 400: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Land Stalker",0,20,20); } case 401: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Bravura",0,20,20); } case 402: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Buffalo",0,20,20); } case 403: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Linerunner",0,20,20); } case 404: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Perenniel",0,20,20); } case 405: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Sentinel",0,20,20); } case 406: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Dumper",0,20,20); } case 407: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"FireTruck",0,20,20); } case 408: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"TrashMaster",0,20,20); } case 409: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Stretch",0,20,20); } case 410: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Manana",0,20,20); } case 411: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Infernus",0,20,20); } case 412: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Voodoo",0,20,20); } case 413: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Pony",0,20,20); } case 414: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Mule",0,20,20); } case 415: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Cheetah",0,20,20); } case 416: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Ambulance",0,20,20); } case 417: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Leviathan",0,20,20); } case 418: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Moonbeam",0,20,20); } case 419: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Esperanto",0,20,20); } case 420: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Taxi",0,20,20); } case 421: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Washington",0,20,20); } case 422: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Bobcat",0,20,20); } case 423: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Mr Whoopee",0,20,20); } case 424: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"BF Injection",0,20,20); } case 425: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Hunter",0,20,20); } case 426: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Premier",0,20,20); } case 427: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Enforcer",0,20,20); } case 428: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Securicar",0,20,20); } case 429: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Banshee",0,20,20); } case 430: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Predator",0,20,20); } case 431: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Bus",0,20,20); } case 432: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Rhino",0,20,20); } case 433: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Barracks",0,20,20); } case 434: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Hotknife",0,20,20); } case 435: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Article Trailer",0,20,20); } case 436: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Previon",0,20,20); } case 437: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Coach",0,20,20); } case 438: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Cabbie",0,20,20); } case 439: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Stallion",0,20,20); } case 440: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Rumpo",0,20,20); } case 441: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"RC Bandit",0,20,20); } case 442: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Romero",0,20,20); } case 443: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Packer",0,20,20); } case 444: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Monster",0,20,20); } case 445: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Admiral",0,20,20); } case 446: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Squallo",0,20,20); } case 447: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Seasparrow",0,20,20); } case 448: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Pizzaboy",0,20,20); } case 449: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Tram",0,20,20); } case 450: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Article Trailer 2",0,20,20); } case 451: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Turismo",0,20,20); } case 452: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Speeder",0,20,20); } case 453: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Reefer",0,20,20); } case 454: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Tropic",0,20,20); } case 455: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Flatbed",0,20,20); } case 456: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Yankee",0,20,20); } case 457: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Caddy",0,20,20); } case 458: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Solair",0,20,20); } case 459: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Berkley's RC Van",0,20,20); } case 460: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Skimmer",0,20,20); } case 461: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"PCJ-600",0,20,20); } case 462: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Faggio",0,20,20); } case 463: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Freeway",0,20,20); } case 464: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"RC Baron",0,20,20); } case 465: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"RC Raider",0,20,20); } case 466: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Glendale",0,20,20); } case 467: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Oceanic",0,20,20); } case 468: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Sanchez",0,20,20); } case 469: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Sparrow",0,20,20); } case 470: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Patriot",0,20,20); } case 471: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Quad",0,20,20); } case 472: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Coastguard",0,20,20); } case 473: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Dinghy",0,20,20); } case 474: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Hermes",0,20,20); } case 475: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Sabre",0,20,20); } case 476: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Rustler",0,20,20); } case 477: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"ZR-350",0,20,20); } case 478: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Walton",0,20,20); } case 479: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Regina",0,20,20); } case 480: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Comet",0,20,20); } case 481: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"BMX",0,20,20); } case 482: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Burrito",0,20,20); } case 483: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Camper",0,20,20); } case 484: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Marquis",0,20,20); } case 485: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Baggage",0,20,20); } case 486: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Dozer",0,20,20); } case 487: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Maverick",0,20,20); } case 488: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"SAN News Maverick",0,20,20); } case 489: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Rancher",0,20,20); } case 490: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"FBI Rancher",0,20,20); } case 491: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Virgo",0,20,20); } case 492: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Greenwood",0,20,20); } case 493: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Jetmax",0,20,20); } case 494: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Hotring Racer",0,20,20); } case 495: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Sandking",0,20,20); } case 496: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Blista Compact",0,20,20); } case 497: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Police Maverick",0,20,20); } case 498: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Boxville",0,20,20); } case 499: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Benson",0,20,20); } case 500: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Mesa",0,20,20); } case 501: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"RC Goblin",0,20,20); } case 502: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Hotring Racerr",0,20,20); } case 503: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Hotring Racer",0,20,20); } case 504: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Bloodring Banger",0,20,20); } case 505: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Rancher",0,20,20); } case 506: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Super GT",0,20,20); } case 507: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Elegant",0,20,20); } case 508: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Journey",0,20,20); } case 509: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Bike",0,20,20); } case 510: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Mountain Bike",0,20,20); } case 511: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Beagle",0,20,20); } case 512: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Cropduster",0,20,20); } case 513: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Stuntplane",0,20,20); } case 514: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Petrol Tanker",0,20,20); } case 515: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Roadtrain",0,20,20); } case 516: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Nebula",0,20,20); } case 517: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Majestic",0,20,20); } case 518: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Buccaneer",0,20,20); } case 519: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Shamal",0,20,20); } case 520: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Hydra",0,20,20); } case 521: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"FCR-900",0,20,20); } case 522: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"NRG-500",0,20,20); } case 523: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Cop Bike HPV1000",0,20,20); } case 524: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Cement Truck",0,20,20); } case 525: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Towtruck",0,20,20); } case 526: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Fortune",0,20,20); } case 527: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Cadrona",0,20,20); } case 528: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"FBI Truck",0,20,20); } case 529: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Willard",0,20,20); } case 530: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Forklift",0,20,20); } case 531: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Tractor",0,20,20); } case 532: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Combine Harvester",0,20,20); } case 533: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Feltzer",0,20,20); } case 534: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Remington",0,20,20); } case 535: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Slamvan",0,20,20); } case 536: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Blade",0,20,20); } case 537: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Freight (Train)",0,20,20); } case 538: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Brownstreak (Train)",0,20,20); } case 539: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Vortex",0,20,20); } case 540: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Vincent",0,20,20); } case 541: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Bullet",0,20,20); } case 542: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Clover",0,20,20); } case 543: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Sadler",0,20,20); } case 544: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Firetruck LA",0,20,20); } case 545: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Hustler",0,20,20); } case 546: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Intruder",0,20,20); } case 547: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Primo",0,20,20); } case 548: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Cargobob",0,20,20); } case 549: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Tampa",0,20,20); } case 550: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Sunrise",0,20,20); } case 551: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Merit",0,20,20); } case 552: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Utility Van",0,20,20); } case 553: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Nevada",0,20,20); } case 554: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Yosemite",0,20,20); } case 555: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Windsor",0,20,20); } case 556: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Monster A",0,20,20); } case 557: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Monster B",0,20,20); } case 558: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Uranus",0,20,20); } case 559: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Jester",0,20,20); } case 560: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Sultan",0,20,20); } case 561: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Stratum",0,20,20); } case 562: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Elegy",0,20,20); } case 563: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Raindance",0,20,20); } case 564: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"RC Tiger",0,20,20); } case 565: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Flash",0,20,20); } case 566: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Tahoma",0,20,20); } case 567: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Savanna",0,20,20); } case 568: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Bandito",0,20,20); } case 569: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Freight Flat Trailer (Train)",0,20,20); } case 570: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Streak Trailer (Train)",0,20,20); } case 571: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Kart",0,20,20); } case 572: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Mower",0,20,20); } case 573: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Dune",0,20,20); } case 574: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Sweeper",0,20,20); } case 575: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Broadway",0,20,20); } case 576: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Tornado",0,20,20); } case 577: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"AT400",0,20,20); } case 578: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"DFT-30",0,20,20); } case 579: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Huntley",0,20,20); } case 580: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Stafford",0,20,20); } case 581: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"BF-400",0,20,20); } case 582: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Newsvan",0,20,20); } case 583: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Tug",0,20,20); } case 584: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Petrol Trailer",0,20,20); } case 585: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Emperor",0,20,20); } case 586: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Wayfarer",0,20,20); } case 587: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Euros",0,20,20); } case 588: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Hotdog",0,20,20); } case 589: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Club",0,20,20); } case 590: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Freight Box Trailer (Train)",0,20,20); } case 591: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Article Trailer 3",0,20,20); } case 592: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Andromada",0,20,20); } case 593: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Dodo",0,20,20); } case 594: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"RC Cam",0,20,20); } case 595: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Launch",0,20,20); } case 596: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Police Car (LSPD)",0,20,20); } case 597: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Police Car (SFPD)",0,20,20); } case 598: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Police Car (LVPD)",0,20,20); } case 599: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Ranger",0,20,20); } case 600: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Picador",0,20,20); } case 601: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"S.W.A.T.",0,20,20); } case 602: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Alpha",0,20,20); } case 603: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Phoenix",0,20,20); } case 604: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Glendale Shit",0,20,20); } case 605: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Sadler Shit",0,20,20); } case 606: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Baggage Trailer A",0,20,20); } case 607: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Baggage Trailer B",0,20,20); } case 608: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Tug Stairs Trailer",0,20,20); } case 609: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Boxburg",0,20,20); } case 610: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Farm Trailer",0,20,20); } case 611: { strmid(VehicleSystem[IsBuyableCar[vehicleid]][Name],"Utility Trailer",0,20,20); } } } stock IsBiciyle(playerid) { if(IsPlayerInAnyVehicle(playerid)) { if(GetVehicleModel(GetPlayerVehicleID(playerid))== 481) return 1; else if(GetVehicleModel(GetPlayerVehicleID(playerid))== 509) return 1; else if(GetVehicleModel(GetPlayerVehicleID(playerid))== 510) return 1; else return 0; } return 1; } stock PlayerName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); return name; } stock PlayerToPoint(Float:radi, playerid, Float, Float:y, Float:z) { new Floatldposx, Floatldposy, Floatldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } return 0; } stock strmatch(const String1[], const String2[]) { if ((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1))) { return true; } else { return false; } } stock GetPlayerIdFromName(playername[]) { for(new i = 0; i <= MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new playername2[MAX_PLAYER_NAME]; GetPlayerName(i, playername2, sizeof(playername2)); if(strcmp(playername2, playername, true, strlen(playername)) == 0) { return i; } } } return INVALID_PLAYER_ID; } strtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; } stock bigstrtok(const string[], &idx) { new length = strlen(string); while ((idx < length) && (string[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = string[idx]; idx++; } result[idx - offset] = EOS; return result; } stock GetPlayerSpeed(playerid,bool:kmh) { new Float:Vx,Float:Vy,Float:Vz,Float:rtn; if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx ,Vy,Vz); else GetPlayerVelocity(playerid,Vx,Vy,Vz); rtn = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2))); return kmh?floatround(rtn * 100 * 1.61):floatround(rtn * 100); } forward ConnectionMySQL(); public ConnectionMySQL() { if(mysql_ping()!=0) { printf("Connection to %s FAILED, server shutting down !",DB_NAME); SendRconCommand("exit"); } } |