Compare model, removed hash metadata, closes #7

This commit is contained in:
ElPumpo
2018-08-08 20:24:02 +02:00
parent b692a11a39
commit d29646b7e0
2 changed files with 4 additions and 13 deletions
+4 -2
View File
@@ -256,11 +256,13 @@ function DeleteSpawnedVehicles()
end
function getVehicleLabelFromHash(hash)
local model = string.lower(GetDisplayNameFromVehicleModel(hash))
for i=1, #Config.Vehicles, 1 do
if Config.Vehicles[i].hash == hash then
if Config.Vehicles[i].model == model then
return Config.Vehicles[i].label
end
end
return 'Unknown hash [' .. hash .. ']'
return 'Unknown model [' .. model .. ']'
end