Jump to content

dont working [custom car names]


ReGo

Recommended Posts

CarNames = {[603] = "1980 Pontiac Trans Am", [474] = "1950 Mercury", [403] = "Scania Elite", [490] = "BMW X5", [579] = "1992 Land Rover", [429] = "1992 Dodge Viper RT", 
[589] = "1992 Volkswagen Golf GTI",[554] = "1992 Chevy 1500", [533] = "Renault Cleo Sport", [445] = "1989 Mercedes Benz 300D", [489] = "1980 Ford Branco", [419] = "1975 Cadillac Eldorado", [471] = "ATV Honda",  
[411] = "1992 Acura NSX", [574] = "Ford Street Cleaner", [412] = "1960 Chevy Impala", [496] = "1985 Honda CRX", [404] = "1967 Chevy Nova Wagon", [507] = "1992 Buick Roadmaster", [400] = "1992 Jeep Cheorokee", 
[526] = "1992 Ford Thunderbird", [555] = "1961 Jaguar E-Type", [402] = "1987 Camaro Iroc", [480] = "1990 Porsche 911", 
[551] = "92 Ford Crown Victoria", [550] = "1991 Honda Accord sedan", [436] = "1985 Honda Prelude", [541] = "1990 Ford GT40", [506] = "1992 Mitsubishi 3000GT", 
[466] = "1961 Dodge Polara", [475] = "970 Chevy Chevelle", [479] = "1977 Ford LTD Wagon", [405] = "1991 BMW 525i", [602] = "1992 Dodge Stealth ", [470] = "AM General HMMWV", [587] = "1992 Nissan 300x",  
[542] = "1969 Pontiac GTO", [565] = "90 Honda Civic Hatch", [451] = "90 Ferrari F40", [559] = "92 Toyota Supra", [576] = "57 Chevy Bel Air", [467] = "58 Dodge Coronet", [567] = "63 Chevrolet Bel-Air",  
[410] = "1980 Dodge Aries", [575] = "1954 Caddilac", [566] = "1984 Chevrolet MonteCarlo", [598]="1990 Chevrolet Caprice", [428]="GMC TopKick", [523]="Police Kawasaki KZ1000", [534] = "76 Lincoln Mark 5" } 
  
function findVehicleName(vehicle) 
    if (type(CarNames[getElementModel(vehicle)]) == "string") then 
        return CarNames[getElementModel(vehicle)] 
    else 
        return getVehicleNameFromModel(getElementModel(vehicle)) 
    end 
end 
  
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 
            _vehiclecache[value] = getVehicleName( theVehicle ) 
            return _vehiclecache[value] 
        end 
    end 
    return "?" 
end 

Please help, dont working

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...