Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //snipy67's Vehicle Menu
- //Version 1.1
- //this is the position of the menu, by default it's on the right hand side
- var POSITION_X = 3;//Default:3
- var POSITION_Y = 0;//Default:0
- var ANCHOR = 6;//Default:6
- var carMenu = null;//This is where the car menu is stored
- var carSubMenus = [];//This is where the sub car menus are stored
- var menuName = "";//This is where the menu name is stored
- var responseName = "";//This is where the menu's response name is stored
- //This is where the data is stored about the vehicles, includeing the id the model and the dlc
- //You can grab a new list just incase it updates at http://gta5vehicleslist.tk/ (No warranties on that site lol, I will try to keep it working)
- var carListGroups = ["Cycles", "Helicopters", "Industrial", "Boats", "Service", "Compacts", "Sports Classic", "Trailer", "Commercials", "Coupes", "Utility", "Super", "Planes", "Sedans", "Motorcycles", "SUVs", "Vans", "Off-Road", "Muscle", "Emergency", "Train", "Military", "Sports"];
- var carlist = [
- [
- [1131912276, "N/A", "Cycles"],
- [448402357, "N/A", "Cycles"],
- [-836512833, "N/A", "Cycles"],
- [-186537451, "N/A", "Cycles"],
- [1127861609, "N/A", "Cycles"],
- [-1233807380, "N/A", "Cycles"],
- [-400295096, "N/A", "Cycles"]
- ],
- [
- [837858166, "N/A", "Helicopters"],
- [788747387, "Nagasaki", "Helicopters"],
- [745926877, "Nagasaki", "Helicopters"],
- [-50547061, "Western company", "Helicopters"],
- [1621617168, "Western company", "Helicopters"],
- [1394036463, "Western company", "Helicopters"],
- [2025593404, "Western company", "Executives and other Criminals"],
- [744705981, "Maibatsu", "Helicopters"],
- [1949211328, "Maibatsu", "Helicopters"],
- [-1660661558, "Western company", "Helicopters"],
- [-82626025, "N/A", " Heists"],
- [1044954915, "Buckingham", "Helicopters"],
- [710198397, "N/A", " Executives and other Criminals"],
- [-1671539132, "N/A", " Executives and other Criminals"],
- [-339587598, "Buckingham", "The San Andreas Flight School"],
- [1075432268, "Buckingham", "Gotten Gains Part 1"],
- [-1600252419, "N/A", " Heists"],
- [1543134283, "N/A", " Executives and other Criminals"],
- [-1845487887, "N/A", " Further Adventures in Finance and Felony"]
- ],
- [
- [1886712733, "N/A", "Industrial"],
- [-1006919392, "Hvy", "Industrial"],
- [-2130482718, "Hvy", "Industrial"],
- [1353720154, "Mtl", "Industrial"],
- [-2107990196, "N/A", " Heists"],
- [444583674, "N/A", "Industrial"],
- [-784816453, "Hvy", "Industrial"],
- [475220373, "Hvy", "Industrial"],
- [-1705304628, "Jobuilt", "Industrial"],
- [48339065, "N/A", "Industrial"],
- [-947761570, "N/A", "Industrial"]
- ],
- [
- [1033245328, "Nagasaki", "Boats"],
- [276773164, "Nagasaki", "Boats"],
- [509498602, "Nagasaki", "Heists"],
- [867467158, "Nagasaki", "Executives and other Criminals"],
- [861409633, "Shitzu", "Boats"],
- [-1043459709, "Dinka", "Boats"],
- [-1030275036, "Speedophile", "Boats"],
- [-616331036, "Speedophile", "Boats"],
- [-311022263, "Speedophile", "Executives and other Criminals"],
- [231083307, "Pegassi", "Beach Bum"],
- [437538602, "Pegassi", "Executives and other Criminals"],
- [400514754, "Shitzu", "Boats"],
- [771711535, "N/A", "Boats"],
- [-1066334226, "N/A", "Upgrade Console to PC"],
- [-282946103, "Shitzu", "Boats"],
- [1070967343, "N/A", " Gotten Gains Part 2"],
- [908897389, "N/A", " Executives and other Criminals"],
- [290013743, "Grotti", "Boats"],
- [1448677353, "Grotti", "Boats"],
- [-2100640717, "N/A", " Further Adventures in Finance and Felony"]
- ],
- [
- [1283517198, "N/A", "Service"],
- [-305727417, "N/A", " Further Adventures in Finance and Felony"],
- [-713569950, "Brute", "Service"],
- [-2072933068, "N/A", "Service"],
- [-2103821244, "N/A", " Cunning Stunts"],
- [-1098802077, "N/A", "Service"],
- [-956048545, "Vapid", "Service"],
- [1941029835, "N/A", "Service"],
- [1917016601, "N/A", "Service"],
- [-1255698084, "N/A", " Heists"]
- ],
- [
- [-344943009, "Dinka", "Compacts"],
- [1039032026, "Dinka", "Upgrade Console to PC"],
- [-591651781, "Dinka", "Upgrade Console to PC"],
- [1549126457, "N/A", " Cunning Stunts"],
- [-1130810103, "N/A", "Compacts"],
- [1682114128, "N/A", "Compacts"],
- [-1177863319, "Weeny", "Compacts"],
- [-431692672, "Benefactor", "I'm Not a Hipster"],
- [-1450650718, "Bollokan", "Compacts"],
- [841808271, "Declasse", "I'm Not a Hipster"]
- ],
- [
- [117401876, "N/A", " The Valentine Day Massacre"],
- [-831834716, "N/A", " Halloween"],
- [-602287871, "N/A", " The Valentine's Day2"],
- [941800958, "N/A", " Heists"],
- [1011753235, "Invetero", "The San Andreas Flight School"],
- [784565758, "Invetero", "Gotten Gains Part 2"],
- [1051415893, "N/A", "Sports Classics"],
- [-1660945322, "N/A", " Executives and other Criminals"],
- [-2124201592, "Albany", "Sports Classics"],
- [-433375717, "Pegassi", "Sports Classics"],
- [1830407356, "Vapid", "Sports Classics"],
- [1078682497, "Lampadati", "I'm Not a Hipster"],
- [1545842587, "Grotti", "Sports Classics"],
- [-2098947590, "N/A", "Sports Classics"],
- [464687292, "Declasse", "Sports Classics"],
- [1531094468, "Declasse", "Sports Classics"],
- [1762279763, "Declasse", "Sports Classics"],
- [-2033222435, "Declasse", "Sports Classics"],
- [-1797613329, "Declasse", "Sports Classics"],
- [-1558399629, "Declasse", "Bikers"],
- [75889561, "N/A", "Sports Classics"]
- ],
- [
- [-1207431159, "N/A", "Trailer"],
- [-1476447243, "N/A", "Trailer"],
- [-1637149482, "N/A", "Trailer"],
- [-399841706, "N/A", "Trailer"],
- [524108981, "N/A", "Trailer"],
- [-960289747, "N/A", "Trailer"],
- [-2140210194, "N/A", "Trailer"],
- [1019737494, "N/A", "Trailer"],
- [356391690, "N/A", "Trailer"],
- [390902130, "N/A", "Trailer"],
- [2078290630, "N/A", "Trailer"],
- [1784254509, "N/A", "Trailer"],
- [2091594960, "N/A", "Trailer"],
- [-1352468814, "N/A", "Trailer"],
- [-1770643266, "N/A", "Trailer"],
- [-730904777, "N/A", "Trailer"],
- [1956216962, "N/A", " Heists"],
- [2016027501, "N/A", "Trailer"],
- [712162987, "N/A", "Trailer"],
- [-877478386, "N/A", "Trailer"],
- [-1579533167, "N/A", "Trailer"],
- [-2058878099, "N/A", "Trailer"]
- ],
- [
- [2053223216, "Vapid", "Commercials"],
- [850991848, "Hvy", "Commercials"],
- [1518533038, "Jobuilt", "Commercials"],
- [904750859, "Maibatsu", "Commercials"],
- [-1050465301, "Maibatsu", "Commercials"],
- [-2052737935, "Maibatsu", "Heists"],
- [569305213, "Mtl", "Commercials"],
- [-2137348917, "Jobuilt", "Commercials"],
- [-1649536104, "Jobuilt", "Import / Export"],
- [2112052861, "Mtl", "Commercials"],
- [1747439474, "Brute", "Commercials"],
- [-214455498, "Brute", "Commercials"]
- ],
- [
- [330661258, "N/A", "Coupes"],
- [-5153954, "Dewbauchee", "Coupes"],
- [-591610296, "Ocelot", "Coupes"],
- [-391594584, "Lampadati", "Coupes"],
- [-89291282, "Lampadati", "Coupes"],
- [-624529134, "Ocelot", "Coupes"],
- [1348744438, "Ubermacht", "Coupes"],
- [-511601230, "Ubermacht", "Coupes"],
- [1349725314, "Ubermacht", "Coupes"],
- [873639469, "Ubermacht", "Coupes"],
- [1581459400, "N/A", " Gotten Gains Part 1"],
- [-1930048799, "N/A", " Further Adventures in Finance and Felony"],
- [-1122289213, "Ubermacht", "Coupes"],
- [-1193103848, "Ubermacht", "Coupes"]
- ],
- [
- [1560980623, "N/A", "Utility"],
- [1147287684, "N/A", "Utility"],
- [-537896628, "N/A", "Utility"],
- [-884690486, "N/A", "Utility"],
- [1491375716, "Hvy", "Utility"],
- [1783355638, "N/A", "Utility"],
- [-845979911, "N/A", "Utility"],
- [-599568815, "Vapid", "Utility"],
- [-1700801569, "N/A", "Utility"],
- [-1323100960, "N/A", "Utility"],
- [-442313018, "N/A", "Utility"],
- [1641462412, "N/A", "Utility"],
- [-2076478498, "N/A", "Utility"],
- [1445631933, "N/A", "Utility"],
- [516990260, "N/A", "Utility"],
- [2132890591, "N/A", "Utility"],
- [887537515, "N/A", "Utility"]
- ],
- [
- [-1216765807, "Truffade", "Super"],
- [-1696146015, "Vapid", "Super"],
- [-1311154784, "Grotti", "Super"],
- [-1291952903, "N/A", "Super"],
- [1426219628, "N/A", " Further Adventures in Finance and Felony"],
- [418536135, "Pegassi", "Super"],
- [-1232836011, "N/A", " Cunning Stunts"],
- [1034187331, "N/A", " Import / Export"],
- [1093792632, "N/A", " Import / Export"],
- [1987142870, "N/A", " Gotten Gains Part 1"],
- [-1758137366, "N/A", " Import / Export"],
- [-1829802492, "N/A", " Further Adventures in Finance and Felony"],
- [2123327359, "N/A", " Further Adventures in Finance and Felony"],
- [234062309, "N/A", " Further Adventures in Finance and Felony"],
- [819197656, "N/A", " Cunning Stunts"],
- [-295689028, "N/A", " Drop Zone"],
- [1123216662, "N/A", "Super"],
- [1663218586, "N/A", " Gotten Gains Part 2"],
- [272929391, "N/A", "Import / Export"],
- [408192225, "N/A", " The Business"],
- [2067820283, "N/A", " Cunning Stunts"],
- [338562499, "Pegassi", "Super"],
- [-1622444098, "Coil", "Super"],
- [989294410, "Coil", "Import / Export"],
- [-1403128555, "Pegassi", "The High Life"],
- [-2048333973, "N/A", " Import / Export"],
- [-482719877, "N/A", " Import / Export"]
- ],
- [
- [1824333165, "Western company", "The San Andreas Flight School"],
- [-150975354, "Atomic", "Planes"],
- [-613725916, "Atomic", "Upgrade Console to PC"],
- [368211810, "N/A", "Planes"],
- [-644710429, "N/A", "Planes"],
- [-901163259, "N/A", " Upgrade Console to PC"],
- [970356638, "Western company", "Planes"],
- [970385471, "N/A", " Heists"],
- [1058115860, "N/A", "Planes"],
- [-1281684762, "N/A", "Planes"],
- [621481054, "Buckingham", "Planes"],
- [-1214293858, "Buckingham", "Gotten Gains Part 1"],
- [-1746576111, "Jobuilt", "Planes"],
- [165154707, "N/A", " The San Andreas Flight School"],
- [-1295027632, "N/A", " Further Adventures in Finance and Felony"],
- [-1214505995, "Buckingham", "Planes"],
- [-2122757008, "N/A", "Planes"],
- [1981688531, "N/A", "Planes"],
- [-1673356438, "Jobuilt", "Planes"],
- [1077420264, "Jobuilt", "Heists"],
- [1341619767, "Buckingham", "The Business"]
- ],
- [
- [-1809822327, "Declasse", "Sedans"],
- [-1807623979, "Declasse", "Sedans"],
- [-1903012613, "Karin", "Sedans"],
- [906642318, "N/A", " Executives and other Criminals"],
- [704435172, "N/A", " Executives and other Criminals"],
- [-2030171296, "N/A", " Executives and other Criminals"],
- [-604842630, "N/A", " Executives and other Criminals"],
- [-685276541, "Albany", "Sedans"],
- [-1883002148, "Albany", "Sedans"],
- [-1241712818, "Albany", "Sedans"],
- [1909141499, "Cheval", "Sedans"],
- [75131841, "Benefactor", "I'm Not a Hipster"],
- [-1289722222, "Vulcar", "Sedans"],
- [886934177, "Karin", "Sedans"],
- [-114627507, "N/A", " Executives and other Criminals"],
- [-1883869285, "Declasse", "Sedans"],
- [-1150599089, "Albany", "Sedans"],
- [-2040426790, "Albany", "Lowrider"],
- [-14495224, "Dundreary", "Sedans"],
- [627094268, "N/A", "Sedans"],
- [-1477580979, "Vapid", "Sedans"],
- [1723137093, "Zirconium", "Sedans"],
- [-1961627517, "Albany", "Sedans"],
- [-1894894188, "Cheval", "Sedans"],
- [-1008861746, "Obey", "Sedans"],
- [1373123368, "Vulcar", "I'm Not a Hipster"],
- [1777363799, "Albany", "Sedans"]
- ],
- [
- [1672195559, "Dinka", "Motorcycles"],
- [-2115793025, "N/A", " Bikers"],
- [-2140431165, "Western motorcycle company", "Motorcycles"],
- [-891462355, "N/A", "Motorcycles"],
- [-114291515, "N/A", "Motorcycles"],
- [86520421, "N/A", " Cunning Stunts"],
- [-440768424, "Nagasaki", "Bikers"],
- [11251904, "N/A", "Motorcycles"],
- [6774487, "N/A", " Bikers"],
- [390201602, "N/A", " Cunning Stunts"],
- [-1404136503, "Western motorcycle company", "Bikers"],
- [2006142190, "Western motorcycle company", "Motorcycles"],
- [822018448, "N/A", " Bikers"],
- [-1670998136, "N/A", "Motorcycles"],
- [1753414259, "N/A", " Heists"],
- [2035069708, "N/A", " Bikers"],
- [55628203, "Pegassi", "Motorcycles"],
- [-1289178744, "Pegassi", "Bikers"],
- [-1842748181, "Pegassi", "Bikers"],
- [-757735410, "N/A", " Import / Export"],
- [627535535, "N/A", " Import / Export"],
- [741090084, "N/A", " Cunning Stunts"],
- [-255678177, "Shitzu", "Bikers"],
- [1265391242, "Shitzu", "Last Team Standing"],
- [301427732, "Liberty city cycles", "Motorcycles"],
- [-159126838, "Lcc", "Last Team Standing"],
- [640818791, "N/A", " Heists"],
- [-1523428744, "N/A", " Bikers"],
- [-634879114, "Principe", "Motorcycles"],
- [-1606187161, "N/A", " Bikers"],
- [-909201658, "N/A", "Motorcycles"],
- [1873600305, "N/A", " Bikers"],
- [-893578776, "Pegassi", "Motorcycles"],
- [-1453280962, "Maibatsu", "Motorcycles"],
- [788045382, "Maibatsu", "Motorcycles"],
- [1491277511, "N/A", " Bikers"],
- [-405626514, "N/A", " Bikers"],
- [743478836, "Western motorcycle company", "Indipendence Day"],
- [1836027715, "Dinka", "The High Life"],
- [-140902153, "Shitzu", "Motorcycles"],
- [-1353081087, "Dinka", "Gotten Gains Part 2"],
- [-609625092, "N/A", " Bikers"],
- [-618617997, "N/A", " Bikers"],
- [-1009268949, "N/A", " Bikers"],
- [-570033273, "N/A", " Bikers"]
- ],
- [
- [850565707, "N/A", "SUVs"],
- [-808831384, "Gallivanter", "SUVs"],
- [142944341, "Gallivanter", "SUVs"],
- [1878062887, "Gallivanter", "Executives and other Criminals"],
- [634118882, "Gallivanter", "Executives and other Criminals"],
- [470404958, "Gallivanter", "Executives and other Criminals"],
- [666166960, "Gallivanter", "Executives and other Criminals"],
- [2006918058, "Albany", "SUVs"],
- [-789894171, "Albany", "SUVs"],
- [683047626, "N/A", " Cunning Stunts"],
- [1177543287, "Benefactor", "SUVs"],
- [-394074634, "Benefactor", "SUVs"],
- [-1237253773, "Benefactor", "I'm Not a Hipster"],
- [-1137532101, "N/A", "SUVs"],
- [-1775728740, "Declasse", "SUVs"],
- [-1543762099, "Bravado", "SUVs"],
- [884422927, "Emperor", "SUVs"],
- [486987393, "N/A", " The High Life"],
- [1269098716, "Dundreary", "SUVs"],
- [-808457413, "Mammoth", "SUVs"],
- [-1651067813, "N/A", "SUVs"],
- [2136773105, "Obey", "SUVs"],
- [1221512915, "Canis", "SUVs"],
- [1337041428, "Benefactor", "SUVs"],
- [1203490606, "N/A", " Further Adventures in Finance and Felony"],
- [-432008408, "N/A", " Further Adventures in Finance and Felony"]
- ],
- [
- [-16948145, "Bravado", "Vans"],
- [2072156101, "Bravado", "Vans"],
- [1739845664, "Bravado", "Vans"],
- [1069929536, "N/A", "Vans"],
- [-1987130134, "Brute", "Vans"],
- [-233098306, "Brute", "Vans"],
- [121658888, "Brute", "Vans"],
- [444171386, "Brute", "Heists"],
- [682434785, "Brute", "Import / Export"],
- [-1346687836, "Declasse", "Vans"],
- [-907477130, "Declasse", "Vans"],
- [-1743316013, "Declasse", "Vans"],
- [893081117, "Declasse", "Vans"],
- [1132262048, "Declasse", "Vans"],
- [1876516712, "Brute", "Vans"],
- [-1745203402, "N/A", "Vans"],
- [296357396, "N/A", " Heists"],
- [-120287622, "Zirconium", "Vans"],
- [-310465116, "Vapid", "Vans"],
- [-1126264336, "Vapid", "Vans"],
- [1488164764, "Bravado", "Beach Bum"],
- [-119658072, "Brute", "Vans"],
- [943752001, "Brute", "Vans"],
- [1162065741, "Bravado", "Vans"],
- [-1776615689, "Bravado", "Vans"],
- [1475773103, "Bravado", "Further Adventures in Finance and Felony"],
- [-810318068, "Vapid", "Vans"],
- [728614474, "Vapid", "Vans"],
- [699456151, "Bf", "Vans"],
- [-1311240698, "Bf", "Vans"],
- [1951180813, "N/A", "Vans"],
- [65402552, "Bravado", "Vans"],
- [1026149675, "Bravado", "Bikers"]
- ],
- [
- [1126868326, "N/A", "Off-Road"],
- [-349601129, "Bf", "Beach Bum"],
- [-2128233223, "Nagasaki", "Off-Road"],
- [-48031959, "Nagasaki", "Off-Road"],
- [-1269889662, "Nagasaki", "Off-Road"],
- [-1590337689, "Nagasaki", "Import / Export"],
- [-1435919434, "Canis", "Off-Road"],
- [-1479664699, "N/A", " Gotten Gains Part 2"],
- [1770332643, "N/A", "Off-Road"],
- [-1661854193, "N/A", "Off-Road"],
- [534258863, "N/A", "Off-Road"],
- [-827162039, "N/A", " Import / Export"],
- [-827162039, "N/A", " Import / Export"],
- [-1860900134, "N/A", " Heists"],
- [2071877360, "N/A", " Heists"],
- [92612664, "Canis", "Beach Bum"],
- [469291905, "N/A", "Off-Road"],
- [1233534620, "N/A", " Upgrade Console to PC"],
- [914654722, "Canis", "Off-Road"],
- [-748008636, "Canis", "Off-Road"],
- [-2064372143, "Canis", "Off-Road"],
- [-845961253, "N/A", " Indipendence Day"],
- [1645267888, "N/A", "Off-Road"],
- [1933662059, "N/A", "Off-Road"],
- [-1207771834, "Karin", "Off-Road"],
- [-2045594037, "Karin", "Off-Road"],
- [-1189015600, "N/A", "Off-Road"],
- [989381445, "N/A", "Off-Road"],
- [-2096818938, "N/A", " Heists"],
- [1180875963, "N/A", " Import / Export"],
- [101905590, "N/A", " Cunning Stunts"],
- [-663299102, "N/A", " Cunning Stunts"]
- ],
- [
- [-1205801634, "Vapid", "I'm Not a Hipster"],
- [-682211828, "Albany", "Muscle"],
- [-1013450936, "Albany", "Lowrider"],
- [349605904, "N/A", " Gotten Gains Part 2"],
- [-1361687965, "N/A", " Lowrider"],
- [80636076, "Vapid", "Muscle"],
- [-915704871, "Vapid", "Upgrade Console to PC"],
- [723973206, "N/A", " Upgrade Console to PC"],
- [-326143852, "N/A", " Upgrade Console to PC"],
- [-2119578145, "N/A", " Lowrider"],
- [-1790546981, "N/A", " Lowrider"],
- [-2039755226, "N/A", "Muscle"],
- [-1800170043, "Bravado", "Muscle"],
- [349315417, "Bravado", "Upgrade Console to PC"],
- [37348240, "Vapid", "Muscle"],
- [2068293287, "N/A", " Halloween"],
- [525509695, "N/A", " Lowrider"],
- [1896491931, "N/A", " Lowrider"],
- [-1943285540, "N/A", " Executives and other Criminals"],
- [-2095439403, "Imponte", "Muscle"],
- [1507916787, "Cheval", "Muscle"],
- [-667151410, "N/A", "Muscle"],
- [-589178377, "N/A", " Festive Surprise"],
- [-227741703, "Imponte", "Muscle"],
- [941494461, "Imponte", "Import / Export"],
- [-1685021548, "N/A", "Muscle"],
- [223258115, "N/A", "Muscle"],
- [734217681, "Vapid", "Muscle"],
- [729783779, "N/A", " Festive Surprise"],
- [833469436, "N/A", " Heists"],
- [1119641113, "N/A", "Muscle"],
- [1923400478, "N/A", " Upgrade Console to PC"],
- [-401643538, "N/A", " Upgrade Console to PC"],
- [972671128, "N/A", " The Valentine's Day2"],
- [-825837129, "Declasse", "Muscle"],
- [-498054846, "N/A", " Gotten Gains Part 1"],
- [-899509638, "N/A", "Muscle"],
- [16646064, "N/A", "Muscle"],
- [2006667053, "Declasse", "Lowrider"],
- [523724515, "Declasse", "Muscle"]
- ],
- [
- [1171614426, "Brute", "Emergency"],
- [1127131465, "N/A", "Emergency"],
- [-1647941228, "N/A", "Emergency"],
- [1938952078, "N/A", "Emergency"],
- [-2007026063, "N/A", "Emergency"],
- [2046537925, "N/A", "Emergency"],
- [-1627000575, "N/A", "Emergency"],
- [1912215274, "N/A", "Emergency"],
- [-1973172295, "N/A", "Emergency"],
- [-1536924937, "N/A", "Emergency"],
- [-1779120616, "N/A", "Emergency"],
- [456714581, "N/A", "Emergency"],
- [-34623805, "N/A", "Emergency"],
- [353883353, "N/A", "Emergency"],
- [741586030, "N/A", "Emergency"],
- [-488123221, "N/A", "Emergency"],
- [-1205689942, "N/A", "Emergency"],
- [-1683328900, "N/A", "Emergency"],
- [1922257928, "N/A", "Emergency"]
- ],
- [
- [1030400667, "N/A", "Train"],
- [184361638, "N/A", "Train"],
- [920453016, "N/A", "Train"],
- [240201337, "N/A", "Train"],
- [642617954, "N/A", "Train"],
- [-777275802, "N/A", "Train"],
- [586013744, "N/A", "Train"]
- ],
- [
- [-823509173, "Hvy", "Military"],
- [1074326203, "Hvy", "Military"],
- [630371791, "Hvy", "Heists"],
- [321739290, "Canis", "Military"],
- [782665360, "N/A", "Military"]
- ],
- [
- [767087018, "Albany", "The Business"],
- [-1041692462, "Bravado", "Sports"],
- [633712403, "Bravado", "Drop Zone"],
- [1274868363, "N/A", " Further Adventures in Finance and Felony"],
- [-304802106, "Bravado", "Sports"],
- [736902334, "Bravado", "Sports"],
- [237764926, "Bravado", "Upgrade Console to PC"],
- [2072687711, "Grotti", "Sports"],
- [-1045541610, "Pfister", "Sports"],
- [-2022483795, "Pfister", "Import / Export"],
- [108773431, "Invetero", "Sports"],
- [196747873, "N/A", " Import / Export"],
- [-566387422, "N/A", "Sports"],
- [-1995326987, "Benefactor", "Sports"],
- [-1566741232, "Benefactor", "Gotten Gains Part 1"],
- [-1089039904, "N/A", " Last Team Standing"],
- [499169875, "Schyster", "Sports"],
- [2016857647, "Karin", "Sports"],
- [-1297672541, "Dinka", "The Business"],
- [-1106353882, "Dinka", "Festive Surprise"],
- [544021352, "Hijak", "Sports"],
- [-1372848492, "N/A", " Heists"],
- [410882957, "N/A", " Heists"],
- [482197771, "N/A", " Cunning Stunts"],
- [-142942670, "Dewbauchee", "The High Life"],
- [-631760477, "Dewbauchee", "Festive Surprise"],
- [1032823388, "N/A", "Sports"],
- [-1461482751, "N/A", "Sports"],
- [-777172681, "N/A", " Cunning Stunts"],
- [-377465520, "Maibatsu", "Sports"],
- [-1934452204, "N/A", "Sports"],
- [1737773231, "N/A", "Sports"],
- [-674927303, "N/A", " Bikers"],
- [-1255452397, "Benefactor", "Sports"],
- [-1485523546, "Benefactor", "Executives and other Criminals"],
- [1489967196, "Benefactor", "Executives and other Criminals"],
- [-888242983, "Benefactor", "Executives and other Criminals"],
- [1922255844, "Benefactor", "Executives and other Criminals"],
- [-746882698, "N/A", "Sports"],
- [-1757836725, "N/A", " Further Adventures in Finance and Felony"],
- [1886268224, "N/A", " Import / Export"],
- [1074745671, "N/A", " Import / Export"],
- [970598228, "Karin", "Sports"],
- [384071873, "Benefactor", "Sports"],
- [-1071380347, "N/A", " Cunning Stunts"],
- [1887331236, "N/A", " Cunning Stunts"],
- [1102544804, "N/A", " Executives and other Criminals"]
- ]
- ];
- API.onResourceStart.connect(function (sender, e) {
- createCarMenu();//creates the menu as soon as the resource starts
- });
- //when an event is triggred from the server
- API.onServerEventTrigger.connect(function (eventName, args) {
- if (eventName === "CAR_MENU") {//if it's the car menu
- API.showCursor(true);//show the cursor
- var data = convertArray(args);//converts the data passed into the client to an array
- if (data.length >= 1) {//Checks to see if a server return name was passed
- responseName = data[0];//Sets the return name
- if (data.length >= 2) {//checks to see if the name of the menu was passed
- menuName = data[1];//sets the name to what was passed in
- }
- else {
- menuName = "Vehicles";//sets the name to the default
- }
- }
- else
- {
- responseName = "CREATE_VEHICLE";//sets the server return name to the default
- menuName = "Vehicles";//sets the name to the default
- }
- API.setMenuTitle(carMenu, menuName);//sets the menus title to menuName
- API.drawMenu(carMenu);//redraws the menu (might be unnecessary)
- carMenu.Visible = true;//sets the menu visible
- }
- });
- //This draws the menus
- API.onUpdate.connect(function() {
- API.drawMenu(carMenu);
- for (x in carSubMenus) {
- API.drawMenu(carSubMenus[x]);
- }
- });
- //creates the car menu
- function createCarMenu() {
- carMenu = API.createMenu("Vehicles", "Vehicles", POSITION_X, POSITION_Y, ANCHOR);//Creates the menu by using it's default name and it's position
- for (i in carListGroups) {
- carMenu.AddItem(API.createMenuItem(carListGroups[i], ""));//creates a menu entry for each group of vehicles
- }
- //When an item is selected in the menu the action below will be performed
- carMenu.OnItemSelect.connect(function (sender, item, index) {
- carMenu.Visible = false;//makes the main menu invisible
- carSubMenus[index].Visible = true;//sets the sub menu visible
- API.setMenuTitle(carSubMenus[index], menuName);//sets the sub menus name to the menuName
- });
- //When the menu is closed
- carMenu.OnMenuClose.connect(function (sender) {
- carMenu.Visible = false;//makes the main menu invisible
- API.showCursor(false);//turn the cursor off
- });
- createCarSubMenus();//creates the submenus
- }
- //loops threw each group of vehicle and creates the submenu for it
- function createCarSubMenus() {
- for (var i = 0; i < carListGroups.length; i++) {
- createCarSubMenu(i);//Creates the menu of vehicles
- }
- }
- //creates the vehicle submenu
- function createCarSubMenu(index) {
- carSubMenus[index] = API.createMenu("Vehicles", carListGroups[index], POSITION_X, POSITION_Y, ANCHOR);//Creates the menu by using it's default name the group name and it's position
- //loops threw each entry in the car list
- for (var i = 0; i < carlist[index].length; i++) {
- if (carlist[index][i][1] != "N/A") {//checks if it has a model name
- carSubMenus[index].AddItem(API.createMenuItem(carlist[index][i][1] + " " + API.getVehicleDisplayName(carlist[index][i][0]), "ID: " + carlist[index][i][0] + " DLC:" + carlist[index][i][2]));//adds it to the menu with the model name
- }
- else {
- carSubMenus[index].AddItem(API.createMenuItem(API.getVehicleDisplayName(carlist[index][i][0]), "ID: " + carlist[index][i][0] + " DLC:" + carlist[index][i][2]));//adds it to the menu without a model name
- }
- }
- //When an entry on the menu is selected
- carSubMenus[index].OnItemSelect.connect(function (sender, item, i) {
- API.triggerServerEvent(responseName, carlist[index][i][0]);//Send a response back to the server
- carSubMenus[index].Visible = false;//make the menu invisible
- API.showCursor(false);//hide the cursor
- });
- //When the menu is closed it will go back to the previous menu
- carSubMenus[index].OnMenuClose.connect(function (sender) {
- carSubMenus[index].Visible = false;//set the submenu invisible
- carMenu.Visible = true;//make the main menu visible
- });
- }
- //this converts the args passed in by some methods into a regular array
- function convertArray(args) {
- var arr = new Array();
- for (var i = 0; i < args["Length"]; i++) {
- arr[i] = args[i];
- }
- return arr
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement