ReGo Posted November 28, 2014 Share Posted November 28, 2014 local _vehiclecache = {} local function findVehicleName( value ) if _vehiclecache[value] then return _vehiclecache[value] end for _, theVehicle in pairs( getElementsByType( "vehicle" ) ) do if getElementData( theVehicle, "dbid" ) == value then local vehID = getElementModel( theVehicle ) if (vehID==603) then return " (1980 Pontiac Trans Am) " end if (vehID==474) then return " (1950 Mercury) " end if (vehID==403) then return " (Scania Elite) " end if (vehID==490) then return " (BMW X5) " end if (vehID==579) then return " (1992 Land Rover) " end if (vehID==429) then return " (1992 Dodge Viper RT) " end if (vehID==589) then return " (1992 Volkswagen Golf GTI) " end if (vehID==554) then return " (1992 Chevy 1500) " end if (vehID==533) then return " (Renault Cleo Sport) " end if (vehID==445) then return " (1989 Mercedes Benz 300D) " end if (vehID==489) then return " (1980 Ford Branco) " end if (vehID==419) then return " (1975 Cadillac Eldorado) " end if (vehID==471) then return " (ATV Honda) " end if (vehID==411) then return " (1992 Acura NSX) " end if (vehID==574) then return " (Ford Street Cleaner) " end if (vehID==412) then return " (1960 Chevy Impala) " end if (vehID==496) then return " (1985 Honda CRX) " end if (vehID==404) then return " (1967 Chevy Nova Wagon) " end if (vehID==507) then return " (1992 Buick Roadmaster) " end if (vehID==400) then return " (1992 Jeep Cheorokee) " end if (vehID==526) then return " (1992 Ford Thunderbird) " end if (vehID==555) then return " (1961 Jaguar E-Type) " end if (vehID==402) then return " (1987 Camaro Iroc) " end if (vehID==480) then return " (1990 Porsche 911) " end if (vehID==551) then return " (92 Ford Crown Victoria) " end if (vehID==550) then return " (1991 Honda Accord sedan) " end if (vehID==436) then return " (1985 Honda Prelude) " end if (vehID==541) then return " (1990 Ford GT40) " end if (vehID==506) then return " (1992 Mitsubishi 3000GT) " end if (vehID==466) then return " (1961 Dodge Polara) " end if (vehID==475) then return " (970 Chevy Chevelle) " end if (vehID==479) then return " (1977 Ford LTD Wagon) " end if (vehID==405) then return " (1991 BMW 525i) " end if (vehID==602) then return " (1992 Dodge Stealth) " end if (vehID==470) then return " (AM General HMMWV) " end if (vehID==587) then return " (1992 Nissan 300x) " end if (vehID==542) then return " (1969 Pontiac GTO) " end if (vehID==565) then return " (90 Honda Civic Hatch) " end if (vehID==451) then return " (90 Ferrari F40) " end if (vehID==559) then return " (92 Toyota Supra) " end if (vehID==576) then return " (57 Chevy Bel Air) " end if (vehID==467) then return " (58 Dodge Coronet) " end if (vehID==567) then return " (63 Chevrolet Bel-Air) " end if (vehID==410) then return " (1980 Dodge Aries) " end if (vehID==575) then return " (1954 Caddilacdo) " end if (vehID==566) then return " (1984 Chevrolet MonteCarlo) " end if (vehID==598) then return " (1990 Chevrolet Caprice) " end if (vehID==428) then return " (GMC TopKick) " end if (vehID==523) then return " (Police Kawasaki KZ1000) " end if (vehID==534) then return " (P76 Lincoln Mark 5) " end if (vehID==493) then return " (Jetmax) " end if (vehID==571) then return " (Kart) " end -- [428]="Securicar", [523]="HPV1000" end end return " (Invalid vehicle name\nplease report to an admin!)" end Other cars dont working, only this car's, please help Link to comment
koeno100 Posted December 3, 2014 Share Posted December 3, 2014 Maybe tell us what your problem is? Link to comment
Et-win Posted December 4, 2014 Share Posted December 4, 2014 When you use return, the function will stop, that is why it doesn't work by more than 1 vehicle. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now