diff --git a/client/client.lua b/client/client.lua index 7fe3e96..7660e65 100644 --- a/client/client.lua +++ b/client/client.lua @@ -25,6 +25,17 @@ local menu13 = MenuV:CreateMenu(false, Lang:t('menu.vehicle_models'), menuLocati local menu14 = MenuV:CreateMenu(false, Lang:t('menu.entity_view_options'), menuLocation, 220, 20, 60, 'size-125', 'none', 'menuv', 'test14') local menu15 = MenuV:CreateMenu(false, Lang:t('menu.spawn_weapons'), menuLocation, 220, 20, 60, 'size-125', 'none', 'menuv', 'test15') +-- Vehicle Options Menu +local vehicleoptions_menu = MenuV:CreateMenu(false, Lang:t('menu.vehicle.vehicle_options'), menuLocation, 220, 20, 60, 'size-125', 'template1', 'menuv', 'vehiclerelatedoption') +local vehicleoptions_mod_menu = MenuV:CreateMenu(false, Lang:t('menu.vehicle.modifications'), menuLocation, 220, 20, 60, 'size-125', 'template1', + 'menuv', 'vehmodmenu') +local color_options_mod_menu = MenuV:CreateMenu(false, Lang:t('menu.vehicle.color_menu'), menuLocation, 220, 20, 60, 'size-125', 'template1', 'menuv', 'vehmodmenucolor') +local classic_colors_mod_menu = MenuV:CreateMenu(false, Lang:t('menu.vehicle.classic_colors'), menuLocation, 220, 20, 60, 'size-125', 'template1', 'menuv', 'vehmodmenuclasiccol') +local tyre_smoke_color_options = MenuV:CreateMenu(false, Lang:t('menu.vehicle.tyre_smoke_colors'), menuLocation, 255, 0, 0, 'size-125', 'template1', 'menuv', 'vehmodmenutyrsmok') +local metal_color_options = MenuV:CreateMenu(false, Lang:t('menu.vehicle.metal_colors'), menuLocation, 220, 20, 60, 'size-125', 'template1', 'menuv', 'vehmodmenumetalcol') +local matte_color_options = MenuV:CreateMenu(false, Lang:t('menu.vehicle.matte_colors'), menuLocation, 220, 20, 60, 'size-125', 'template1', 'menuv', 'vehmodmenumattecol') +local neon_color_options = MenuV:CreateMenu(false, Lang:t('menu.vehicle.neon_options'), menuLocation, 220, 20, 60, 'size-125', 'template1', 'menuv', 'vehmodmenuneon') + RegisterNetEvent('qb-admin:client:openMenu', function() QBCore.Functions.TriggerCallback('qb-admin:isAdmin', function(isAdmin) if not isAdmin then return end @@ -285,6 +296,648 @@ local menu5_vehicles_max_upgrades = menu5:AddButton({ description = Lang:t('desc.max_mod_desc') }) +if VehicleMods.enabled then + menu5:AddButton({ + icon = '🚙', + label = Lang:t('menu.vehicle_moddings'), + value = 'vehicleoptions_menu', + description = Lang:t('desc.vehicle_moddings_desc'), + select = function(i) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + if veh ~= 0 then + MenuV:OpenMenu(vehicleoptions_menu) + else + QBCore.Functions.Notify(Lang:t('error.no_vehicle'), 'error', 5000) + end + end + }) +end + +--[[ + Vehicle Options +--]] + +color_options_mod_menu:AddButton({ + icon = '', + label = Lang:t('menu.vehicle.tyre_smoke_colors'), + value = tyre_smoke_color_options, + description = Lang:t('desc.vehicle.tyre_smoke_colors'), +}) + +color_options_mod_menu:AddButton({ + icon = '', + label = Lang:t('menu.vehicle.neon_options'), + value = neon_color_options, + description = Lang:t('desc.vehicle.neon_options'), +}) +color_options_mod_menu:AddButton({ + icon = '', + label = Lang:t('menu.vehicle.classic_colors'), + value = classic_colors_mod_menu, + description = Lang:t('desc.vehicle.classic_colors'), +}) +color_options_mod_menu:AddButton({ + icon = '', + label = Lang:t('menu.vehicle.matte_colors'), + value = matte_color_options, + description = Lang:t('desc.vehicle.matte_colors'), +}) + +color_options_mod_menu:AddButton({ + icon = '', + label = Lang:t('menu.vehicle.metal_colors'), + value = metal_color_options, + description = Lang:t('desc.vehicle.metal_colors'), +}) +local cp = color_options_mod_menu:AddCheckbox({ + icon = '', + label = Lang:t('menu.vehicle.primary_color'), + value = 'y', + description = Lang:t('desc.vehicle.primary_color'), +}) +local cs = color_options_mod_menu:AddCheckbox({ + icon = '', + label = Lang:t('menu.vehicle.secondary_color'), + value = 'n', + description = Lang:t('desc.vehicle.secondary_color'), +}) +local pearlescentc = color_options_mod_menu:AddCheckbox({ + icon = '', + label = Lang:t('menu.vehicle.pearlescent_color'), + value = 'n', + description = Lang:t('desc.vehicle.pearlescent_color'), +}) +local wheelc = color_options_mod_menu:AddCheckbox({ + icon = '', + label = Lang:t('menu.vehicle.wheel_color'), + value = 'n', + description = Lang:t('desc.vehicle.wheel_color'), +}) + +local dashc = color_options_mod_menu:AddCheckbox({ + icon = '', + label = Lang:t('menu.vehicle.dashboard_color'), + value = 'n', + description = Lang:t('desc.vehicle.dashboard_color'), +}) +local intc = color_options_mod_menu:AddCheckbox({ + icon = '', + label = Lang:t('menu.vehicle.interior_color'), + value = 'n', + description = Lang:t('desc.vehicle.interior_color'), +}) + +local neonfront = neon_color_options:AddCheckbox({ + icon = '', + label = Lang:t('menu.vehicle.enable_front_neon'), + value = 'n', + description = Lang:t('desc.vehicle.enable_front_neon'), +}) +local neonback = neon_color_options:AddCheckbox({ + icon = '', + label = Lang:t('menu.vehicle.enable_back_neon'), + value = 'n', + description = Lang:t('desc.vehicle.enable_back_neon'), +}) +local neonleft = neon_color_options:AddCheckbox({ + icon = '', + label = Lang:t('menu.vehicle.enable_left_neon'), + value = 'n', + description = Lang:t('desc.vehicle.enable_left_neon'), +}) +local neonright = neon_color_options:AddCheckbox({ + icon = '', + label = Lang:t('menu.vehicle.enable_right_neon'), + value = 'n', + description = Lang:t('desc.vehicle.enable_right_neon'), +}) + +local neoncolor = neon_color_options:AddSlider({ + icon = '', + label = Lang:t('menu.vehicle.neon_color'), + value = 'demo', + values = VehicleMods.neoncolors, + description = Lang:t('desc.vehicle.neon_color'), +}) + +neoncolor:On('select', function(item, value) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleNeonLightsColour(veh, value[1], value[2], value[3]) +end) +local modbuttons = {} +neonfront:On('check', function(item) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleNeonLightEnabled(veh, 2, true) +end) + +neonfront:On('uncheck', function(item) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleNeonLightEnabled(veh, 2, false) +end) +neonback:On('check', function(item) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleNeonLightEnabled(veh, 3, true) +end) + +neonback:On('uncheck', function(item) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleNeonLightEnabled(veh, 3, false) +end) +neonleft:On('check', function(item) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleNeonLightEnabled(veh, 0, true) +end) + +neonleft:On('uncheck', function(item) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleNeonLightEnabled(veh, 0, false) +end) +neonright:On('check', function(item) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleNeonLightEnabled(veh, 1, true) +end) + +neonright:On('uncheck', function(item) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleNeonLightEnabled(veh, 1, false) +end) +local isPrimary, isSecondary, isPearlescent, isWheel, isDash, isInt = nil, nil, nil, nil, nil, nil +cp:On('check', function(item) + isPrimary = true +end) + +cp:On('uncheck', function(item) + isPrimary = false +end) +cs:On('check', function(item) + isSecondary = true +end) + +cs:On('uncheck', function(item) + isSecondary = false +end) +pearlescentc:On('check', function(item) + isPearlescent = true +end) + +pearlescentc:On('uncheck', function(item) + isPearlescent = false +end) +wheelc:On('check', function(item) + isWheel = true +end) + +wheelc:On('uncheck', function(item) + isWheel = false +end) +dashc:On('check', function(item) + isDash = true +end) + +dashc:On('uncheck', function(item) + isDash = false +end) +intc:On('check', function(item) + isInt = true +end) + +intc:On('uncheck', function(item) + isInt = false +end) + +local vehicleoptions_vehrelated_mod = vehicleoptions_menu:AddButton({ + + icon = '🚙', + label = Lang:t('menu.vehicle.modifications'), + value = 'vehicleoptions_menu', + description = Lang:t('desc.vehicle.modifications'), +}) +vehicleoptions_vehrelated_mod:On("select", function() + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + if veh ~= 0 then + tyre_smoke_color_options:ClearItems() + classic_colors_mod_menu:ClearItems() + matte_color_options:ClearItems() + metal_color_options:ClearItems() + vehicleoptions_mod_menu:ClearItems() + vehicleoptions_mod_menu:AddButton({ + icon = '', + label = Lang:t('menu.vehicle.vehicle_color'), + value = color_options_mod_menu, + description = Lang:t('desc.vehicle.vehicle_color'), + }) + + for k, v in ipairs(VehicleMods.vehmods) do + if v.modType and type(v.modType) == 'number' then + if v.modType == 17 then + modbuttons[k] = vehicleoptions_mod_menu:AddCheckbox({ + icon = '', + label = v.label, + value = 'n', + description = v.label + }) + modbuttons[k]:On('check', function() + ToggleVehicleMod(veh, 18, true) + end) + + modbuttons[k]:On('uncheck', function() + ToggleVehicleMod(veh, 18, false) + end) + else + SetVehicleModKit(veh, 0) + local max = GetNumVehicleMods(veh, v.modType) + if max ~= 0 then + local vehiclemod = GetVehicleMod(veh, v.modType) + if vehiclemod == -1 then + vehiclemod = 0 + else + vehiclemod = vehiclemod + 1 + end + local labelPrefix = '' + if v.modType == 23 then + labelPrefix = 'Wheel - ' + end + modbuttons[k] = vehicleoptions_mod_menu:AddRange({ + icon = '', + label = labelPrefix .. v.label, + description = v.label, + min = 0, + max = max, + value = vehiclemod, + saveOnUpdate = true + }) + modbuttons[k]:On('select', function(item, newValue, oldValue) + veh = GetVehiclePedIsIn(PlayerPedId(), false) + SetVehicleWheelType(veh, v.wheelType) + if veh ~= 0 then + if newValue == 0 then + SetVehicleMod(veh, v.modType, max, false) + else + SetVehicleMod(veh, v.modType, newValue - 1, false) + end + end + end) + end + end + elseif v.modType and v.modType == 'plateIndex' then + SetVehicleModKit(veh, 0) + local vehiclemod = GetVehicleNumberPlateTextIndex(veh) + modbuttons[k] = vehicleoptions_mod_menu:AddRange({ + icon = '', + label = v.label, + description = v.label, + min = 0, + max = 4, + value = vehiclemod, + saveOnUpdate = true + }) + modbuttons[k]:On('select', function(item, newValue, oldValue) + veh = GetVehiclePedIsIn(PlayerPedId(), false) + if veh ~= 0 then + SetVehicleNumberPlateTextIndex(veh, newValue) + end + end) + elseif v.modType and v.modType == 'livery2' then + SetVehicleLivery(veh, 0) + local vehiclemod = GetVehicleLiveryCount(veh) + if vehiclemod ~= -1 then + modbuttons[k] = vehicleoptions_mod_menu:AddRange({ + icon = '', + label = v.label, + description = v.label, + min = 1, + max = vehiclemod, + value = 0, + saveOnUpdate = true + }) + modbuttons[k]:On('select', function(item, newValue, oldValue) + veh = GetVehiclePedIsIn(PlayerPedId(), false) + if veh ~= 0 then + SetVehicleLivery(veh, newValue) + end + end) + end + end + end + + modbuttons['xenon'] = vehicleoptions_mod_menu:AddRange({ + icon = '', + label = Lang:t('menu.vehicle.headlights_color'), + description = Lang:t('desc.vehicle.headlights_color'), + min = 0, + max = 12, + value = 0, + saveOnUpdate = true + }) + modbuttons['xenon']:On('select', function(item, newValue, oldValue) + veh = GetVehiclePedIsUsing(PlayerPedId()) + + if veh ~= 0 then + ToggleVehicleMod(veh, 22, true) -- toggle xenon + SetVehicleHeadlightsColour(veh, newValue) + end + end) + modbuttons['windowtint'] = vehicleoptions_mod_menu:AddRange({ + icon = '', + label = Lang:t('menu.vehicle.window_tint'), + description = Lang:t('desc.vehicle.window_tint'), + min = 0, + max = GetNumVehicleWindowTints(), + value = GetVehicleWindowTint(GetVehiclePedIsUsing(PlayerPedId())), + saveOnUpdate = true + }) + modbuttons['windowtint']:On('select', function(item, newValue, oldValue) + veh = GetVehiclePedIsUsing(PlayerPedId()) + + if veh ~= 0 then + SetVehicleWindowTint(veh, newValue) + end + end) + for _, v in ipairs(VehicleMods.colors) do + classic_colors_mod_menu:AddButton({ + icon = '', + label = v.name, + value = v.colorindex, + description = 'Apply ' .. v.name .. ' Color to vehicle', + select = function(i) + ped = PlayerPedId() + veh = GetVehiclePedIsIn(ped, false) + if veh ~= 0 then + if isPrimary then + local _, vehcolors = GetVehicleColours(veh) + SetVehicleColours(veh, v.colorindex, vehcolors) + end + if isSecondary then + local vehcolorp, _ = GetVehicleColours(veh) + SetVehicleColours(veh, vehcolorp, v.colorindex) + end + if isWheel then + local vehcolorp, _ = GetVehicleColours(veh) + SetVehicleExtraColours(veh, vehcolorp, v.colorindex) + end + if isDash then + SetVehicleDashboardColor(veh, v.colorindex) + end + if isInt then + SetVehicleInteriorColor(veh, v.colorindex) + end + if isPearlescent then + local _, vehcolorwheel = GetVehicleExtraColours(veh) + SetVehicleExtraColours(veh, v.colorindex, vehcolorwheel) + end + end + end + }) + end + for _, v in ipairs(VehicleMods.tyrecolors) do + tyre_smoke_color_options:AddButton({ + icon = '', + label = v.name, + value = 'tyr', + description = 'Apply ' .. v.name .. ' Color to Tyre Smoke', + select = function(i) + ped = PlayerPedId() + veh = GetVehiclePedIsIn(ped, false) + if veh ~= 0 then + ToggleVehicleMod(veh, 20, true) + SetVehicleTyreSmokeColor(veh, v.r, v.g, v.b) + end + end + }) + end + for _, v in ipairs(VehicleMods.mattecolors) do + matte_color_options:AddButton({ + icon = '', + label = v.name, + value = v.colorindex, + description = 'Apply ' .. v.name .. ' Color to vehicle', + select = function(i) + ped = PlayerPedId() + veh = GetVehiclePedIsIn(ped, false) + if veh ~= 0 then + local vehcolorp, vehcolors = GetVehicleColours(veh) + if isPrimary and not isSecondary then + SetVehicleColours(veh, v.colorindex, vehcolors) + elseif isSecondary and not isPrimary then + SetVehicleColours(veh, vehcolorp, v.colorindex) + else + SetVehicleColours(veh, v.colorindex, v.colorindex) + end + end + end + }) + end + for _, v in ipairs(VehicleMods.metalcolors) do + metal_color_options:AddButton({ + icon = '', + label = v.name, + value = v.colorindex, + description = 'Apply ' .. v.name .. ' Color to vehicle', + select = function(i) + ped = PlayerPedId() + veh = GetVehiclePedIsIn(ped, false) + if veh ~= 0 then + local vehcolorp, vehcolors = GetVehicleColours(veh) + if isPrimary and not isSecondary then + SetVehicleColours(veh, v.colorindex, vehcolors) + elseif isSecondary and not isPrimary then + SetVehicleColours(veh, vehcolorp, v.colorindex) + else + SetVehicleColours(veh, v.colorindex, v.colorindex) + end + end + end + }) + end + for extraID = 0, 20 do + if DoesExtraExist(veh, extraID) then + modbuttons['extra' .. extraID] = vehicleoptions_mod_menu:AddCheckbox({ + icon = '', + label = 'Extra ' .. extraID, + description = 'Extra', + value = 'n' + }) + modbuttons['extra' .. extraID]:On('check', function(item) + SetVehicleExtra(veh, extraID, 0) + end) + + modbuttons['extra' .. extraID]:On('uncheck', function(item) + SetVehicleExtra(veh, extraID, 1) + end) + end + end + MenuV:OpenMenu(vehicleoptions_mod_menu) + else + QBCore.Functions.Notify(Lang:t('error.no_vehicle'), 'error', 5000) + end +end) + +--[[ + Toggle Engine +--]] +local vehicleoptions_toggle_engine = vehicleoptions_menu:AddCheckbox({ + icon = '🚧', + label = Lang:t('menu.vehicle.toggle_engine'), + description = Lang:t('desc.vehicle.toggle_engine'), + value = 'y' +}) + +vehicleoptions_toggle_engine:On('check', function(item) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleEngineOn(veh, true, true, true) +end) + +vehicleoptions_toggle_engine:On('uncheck', function(item) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleEngineOn(veh, false, true, true) +end) + +--[[ + Change Numberplate +--]] +vehicleoptions_menu:AddButton({ + icon = '⌨️', + label = Lang:t('menu.vehicle.change_numberplate'), + description = Lang:t('desc.vehicle.change_numberplate'), + value = "numbertext", + false, + select = function(i) + -- Open QBCore input dialog + local input = exports['qb-input']:ShowInput({ + header = Lang:t('menu.vehicle.change_numberplate'), + submitText = Lang:t('menu.change'), + inputs = { + { + text = Lang:t('menu.vehicle.enter_new_plate'), -- Label for input + name = "plate", -- Name used for input reference + type = "text", -- Input type + isRequired = true, -- Require the input to be filled + min = 1, -- Minimum character limit + max = 8 -- Maximum character limit + } + } + }) + + -- Check if input exists and is valid + if input and input.plate then + local newPlate = input.plate:upper() -- Convert plate text to uppercase + local ped = PlayerPedId() + local vehicle = GetVehiclePedIsIn(ped, false) + + if vehicle ~= 0 then + SetVehicleNumberPlateText(vehicle, newPlate) + TriggerEvent('QBCore:Notify', Lang:t('success.plate_changed_to', { plate = newPlate }), "success") + else + TriggerEvent('QBCore:Notify', Lang:t('error.no_vehicle'), "error") + end + else + TriggerEvent('QBCore:Notify', Lang:t('error.no_plate_text'), "error") + end + end +}) + +--[[ + Toggle Doors +--]] +local vehicledoor = {} +local vehicleoptions_toggledoor = vehicleoptions_menu:AddSlider({ + icon = '🚗', + label = Lang:t('menu.vehicle.toggle_doors'), + description = Lang:t('desc.vehicle.toggle_doors'), + value = 0, + values = VehicleMods.vehicledoors +}) +vehicleoptions_toggledoor:On('select', function(item, value) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + if veh then + if vehicledoor[veh] and vehicledoor[veh][value] then + SetVehicleDoorShut(veh, value, false) + vehicledoor[veh][value] = false + else + SetVehicleDoorOpen(veh, value, false) + vehicledoor[veh] = { veh } + vehicledoor[veh][value] = true + end + end +end) + +--[[ + Flip Vehicle +--]] +vehicleoptions_menu:AddButton({ + icon = '🚗', + label = Lang:t('menu.vehicle.flip_vehicle'), + value = 'n', + description = Lang:t('desc.vehicle.flip_vehicle'), + select = function(i) + local ped = PlayerPedId() + local veh = GetVehiclePedIsIn(ped, false) + SetVehicleOnGroundProperly(veh) + end +}) + +--[[ + Delete Vehicle +--]] +vehicleoptions_menu:AddButton({ + icon = '🚗', + label = Lang:t('menu.vehicle.delete_vehicle'), + value = 'n', + description = Lang:t('desc.vehicle.delete_vehicle'), + select = function(i) + ExecuteCommand('dv') + end +}) + +--[[ + Repair Vehicle +--]] +vehicleoptions_menu:AddButton({ + icon = '🛠', + label = Lang:t('menu.vehicle.repair_vehicle'), + description = Lang:t('desc.vehicle.repair_vehicle'), + value = "repairveh", + false, + select = function(i) + local veh = GetVehiclePedIsIn(PlayerPedId(), false) + if veh ~= 0 then + SetVehicleFixed(veh) + SetVehicleDeformationFixed(veh) + end + end +}) + +--[[ + Wash Vehicle +--]] +vehicleoptions_menu:AddButton({ + icon = '🚿', + label = Lang:t('menu.vehicle.wash_vehicle'), + description = Lang:t('desc.vehicle.wash_vehicle'), + value = "washveh", + false, + select = function(i) + local veh = GetVehiclePedIsIn(PlayerPedId(), false) + if veh ~= 0 then + SetVehicleDirtLevel(veh, 0.0) + end + end +}) + -- Developer Options Menu Buttons local menu7_dev_copy_vec3 = menu7:AddButton({ icon = '📋', diff --git a/fxmanifest.lua b/fxmanifest.lua index cff7790..819d436 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -10,7 +10,8 @@ ui_page 'html/index.html' shared_scripts { '@qb-core/shared/locale.lua', 'locales/en.lua', - 'locales/*.lua' + 'locales/*.lua', + 'shared/vehicles.lua', } client_scripts { diff --git a/locales/en.lua b/locales/en.lua index 1ca41e8..a186a95 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -15,6 +15,7 @@ local Translations = { failed_set_speed = 'You did not set a speed.. (`fast` for super-run, `normal` for normal)', failed_set_model = 'You did not set a model..', failed_entity_copy = 'No freeaim entity info to copy to clipboard!', + no_plate_text = 'No plate text entered', }, success = { blips_activated = 'Blips activated', @@ -29,6 +30,7 @@ local Translations = { spawn_weapon = 'You have spawned a Weapon ', noclip_enabled = 'No-clip enabled', noclip_disabled = 'No-clip disabled', + plate_changed_to = 'Plate changed to %{plate}' }, info = { ped_coords = 'Ped Coordinates:', @@ -157,6 +159,40 @@ local Translations = { entity_view_freeaim_copy = 'Copy Freeaim Entity Info', spawn_weapons = 'Spawn Weapons', max_mods = 'Max car mods', + change = 'Change', + vehicle_moddings = 'Vehicle Moddings', + vehicle = { + vehicle_options = 'Vehicle Options', + vehicle_color = 'Vehicle Color', + headlights_color = 'Headlights Color', + modifications = 'Modifications', + color_menu = 'Color Menu', + classic_colors = 'Classic Colors', + tyre_smoke_colors = 'Tyre Smoke Colors', + metal_colors = 'Metal Colors', + matte_colors = 'Matte Colors', + neon_options = 'Neon Options', + neon_color = 'Neon Color', + primary_color = 'Primary Color', + secondary_color = 'Secondary Color', + pearlescent_color = 'Pearlescent Color', + wheel_color = 'Wheel Color', + dashboard_color = 'Dashboard Color', + interior_color = 'Interior Color', + enable_front_neon = 'Enable Front Neon', + enable_back_neon = 'Enable Back Neon', + enable_left_neon = 'Enable Left Neon', + enable_right_neon = 'Enable Right Neon', + window_tint = 'Window Tint', + toggle_engine = 'Toggle Engine', + change_numberplate = 'Change Numberplate', + enter_new_plate = 'Enter New Plate', + toggle_doors = 'Toggle Doors', + flip_vehicle = 'Flip Vehicle', + delete_vehicle = 'Delete Vehicle', + repair_vehicle = 'Repair Vehicle', + wash_vehicle = 'Wash Vehicle', + } }, desc = { admin_options_desc = 'Misc. Admin Options', @@ -200,6 +236,37 @@ local Translations = { entity_view_freeaim_copy_desc = 'Copies the Free Aim entity info to clipboard', spawn_weapons_desc = 'Spawn Any Weapon.', max_mod_desc = 'Max mod your current vehicle', + vehicle_moddings_desc = 'Vehicle Modding Options', + vehicle = { + modifications = 'Vehicle Modifications Menu', + vehicle_color = 'Vehicle Color Menu', + tyre_smoke_colors = 'Tyre Smoke Color Menu', + headlights_color = 'Headlights Color Menu', + neon_options = 'Neon Options', + classic_colors = 'Classic Color', + matte_colors = 'Matte Color', + metal_colors = 'Metal Color', + neon_color = 'Neon Color', + primary_color = 'Primary Color', + secondary_color = 'Secondary Color', + pearlescent_color = 'Pearlescent Color', + wheel_color = 'Wheel Color', + dashboard_color = 'Dashboard Color', + interior_color = 'Interior Color', + enable_front_neon = 'Enable Front Neon', + enable_back_neon = 'Enable Back Neon', + enable_left_neon = 'Enable Left Neon', + enable_right_neon = 'Enable Right Neon', + window_tint = 'Window Tint Menu', + change_numberplate = 'Change Numberplate Text', + toggle_doors = 'Toggle Doors Menu', + flip_vehicle = 'Flip Vehicle', + toggle_engine = 'Toggle Engine you are in', + delete_vehicle = 'Delete vehicle you are in', + repair_vehicle = 'Repair vehicle you are in', + wash_vehicle = 'Wash vehicle you are in', + extras = 'Extras', + } }, time = { ban_length = 'Ban Length', diff --git a/shared/vehicles.lua b/shared/vehicles.lua new file mode 100644 index 0000000..03904a8 --- /dev/null +++ b/shared/vehicles.lua @@ -0,0 +1,998 @@ +VehicleMods = {}; +VehicleMods.enabled = true; +VehicleMods.FuelResource = "LegacyFuel"; +VehicleMods.colors = { + { + name = "Black", + colorindex = 0 + }, + { + name = "Carbon Black", + colorindex = 147 + }, + { + name = "Graphite", + colorindex = 1 + }, + { + name = "Anthracite Black", + colorindex = 11 + }, + { + name = "Black Steel", + colorindex = 2 + }, + { + name = "Dark Steel", + colorindex = 3 + }, + { + name = "Silver", + colorindex = 4 + }, + { + name = "Bluish Silver", + colorindex = 5 + }, + { + name = "Rolled Steel", + colorindex = 6 + }, + { + name = "Shadow Silver", + colorindex = 7 + }, + { + name = "Stone Silver", + colorindex = 8 + }, + { + name = "Midnight Silver", + colorindex = 9 + }, + { + name = "Cast Iron Silver", + colorindex = 10 + }, + { + name = "Red", + colorindex = 27 + }, + { + name = "Torino Red", + colorindex = 28 + }, + { + name = "Formula Red", + colorindex = 29 + }, + { + name = "Lava Red", + colorindex = 150 + }, + { + name = "Blaze Red", + colorindex = 30 + }, + { + name = "Grace Red", + colorindex = 31 + }, + { + name = "Garnet Red", + colorindex = 32 + }, + { + name = "Sunset Red", + colorindex = 33 + }, + { + name = "Cabernet Red", + colorindex = 34 + }, + { + name = "Wine Red", + colorindex = 143 + }, + { + name = "Candy Red", + colorindex = 35 + }, + { + name = "Hot Pink", + colorindex = 135 + }, + { + name = "Pfsiter Pink", + colorindex = 137 + }, + { + name = "Salmon Pink", + colorindex = 136 + }, + { + name = "Sunrise Orange", + colorindex = 36 + }, + { + name = "Orange", + colorindex = 38 + }, + { + name = "Bright Orange", + colorindex = 138 + }, + { + name = "Gold", + colorindex = 99 + }, + { + name = "Bronze", + colorindex = 90 + }, + { + name = "Yellow", + colorindex = 88 + }, + { + name = "Race Yellow", + colorindex = 89 + }, + { + name = "Dew Yellow", + colorindex = 91 + }, + { + name = "Dark Green", + colorindex = 49 + }, + { + name = "Racing Green", + colorindex = 50 + }, + { + name = "Sea Green", + colorindex = 51 + }, + { + name = "Olive Green", + colorindex = 52 + }, + { + name = "Bright Green", + colorindex = 53 + }, + { + name = "Gasoline Green", + colorindex = 54 + }, + { + name = "Lime Green", + colorindex = 92 + }, + { + name = "Midnight Blue", + colorindex = 141 + }, + { + name = "Galaxy Blue", + colorindex = 61 + }, + { + name = "Dark Blue", + colorindex = 62 + }, + { + name = "Saxon Blue", + colorindex = 63 + }, + { + name = "Blue", + colorindex = 64 + }, + { + name = "Mariner Blue", + colorindex = 65 + }, + { + name = "Harbor Blue", + colorindex = 66 + }, + { + name = "Diamond Blue", + colorindex = 67 + }, + { + name = "Surf Blue", + colorindex = 68 + }, + { + name = "Nautical Blue", + colorindex = 69 + }, + { + name = "Racing Blue", + colorindex = 73 + }, + { + name = "Ultra Blue", + colorindex = 70 + }, + { + name = "Light Blue", + colorindex = 74 + }, + { + name = "Chocolate Brown", + colorindex = 96 + }, + { + name = "Bison Brown", + colorindex = 101 + }, + { + name = "Creeen Brown", + colorindex = 95 + }, + { + name = "Feltzer Brown", + colorindex = 94 + }, + { + name = "Maple Brown", + colorindex = 97 + }, + { + name = "Beechwood Brown", + colorindex = 103 + }, + { + name = "Sienna Brown", + colorindex = 104 + }, + { + name = "Saddle Brown", + colorindex = 98 + }, + { + name = "Moss Brown", + colorindex = 100 + }, + { + name = "Woodbeech Brown", + colorindex = 102 + }, + { + name = "Straw Brown", + colorindex = 99 + }, + { + name = "Sandy Brown", + colorindex = 105 + }, + { + name = "Bleached Brown", + colorindex = 106 + }, + { + name = "Schafter Purple", + colorindex = 71 + }, + { + name = "Spinnaker Purple", + colorindex = 72 + }, + { + name = "Midnight Purple", + colorindex = 142 + }, + { + name = "Bright Purple", + colorindex = 145 + }, + { + name = "Cream", + colorindex = 107 + }, + { + name = "Ice White", + colorindex = 111 + }, + { + name = "Frost White", + colorindex = 112 + } +}; +VehicleMods.metalcolors = { + { + name = "Brushed Steel", + colorindex = 117 + }, + { + name = "Brushed Black Steel", + colorindex = 118 + }, + { + name = "Brushed Aluminum", + colorindex = 119 + }, + { + name = "Pure Gold", + colorindex = 158 + }, + { + name = "Brushed Gold", + colorindex = 159 + }, + { + name = "Chrome", + colorindex = 120 + } +}; +VehicleMods.mattecolors = { + { + name = "Black", + colorindex = 12 + }, + { + name = "Gray", + colorindex = 13 + }, + { + name = "Light Gray", + colorindex = 14 + }, + { + name = "Ice White", + colorindex = 131 + }, + { + name = "Blue", + colorindex = 83 + }, + { + name = "Dark Blue", + colorindex = 82 + }, + { + name = "Midnight Blue", + colorindex = 84 + }, + { + name = "Midnight Purple", + colorindex = 149 + }, + { + name = "Schafter Purple", + colorindex = 148 + }, + { + name = "Red", + colorindex = 39 + }, + { + name = "Dark Red", + colorindex = 40 + }, + { + name = "Orange", + colorindex = 41 + }, + { + name = "Yellow", + colorindex = 42 + }, + { + name = "Lime Green", + colorindex = 55 + }, + { + name = "Green", + colorindex = 128 + }, + { + name = "Frost Green", + colorindex = 151 + }, + { + name = "Foliage Green", + colorindex = 155 + }, + { + name = "Olive Darb", + colorindex = 152 + }, + { + name = "Dark Earth", + colorindex = 153 + }, + { + name = "Desert Tan", + colorindex = 154 + } +}; +VehicleMods.tyrecolors = { + { + name = "Black", + r = 0, + g = 0, + b = 0 + }, + { + name = "White\t", + r = 255, + g = 255, + b = 255 + }, + { + name = "Red", + r = 255, + g = 0, + b = 0 + }, + { + name = "Lime", + r = 0, + g = 255, + b = 0 + }, + { + name = "Blue", + r = 0, + g = 0, + b = 255 + }, + { + name = "Yellow", + r = 255, + g = 255, + b = 0 + }, + { + name = "Cyan", + r = 0, + g = 255, + b = 255 + }, + { + name = "Magenta", + r = 255, + g = 0, + b = 255 + }, + { + name = "Silver", + r = 192, + g = 192, + b = 192 + }, + { + name = "Gray", + r = 128, + g = 128, + b = 128 + }, + { + name = "Maroon", + r = 128, + g = 0, + b = 0 + }, + { + name = "Olive", + r = 128, + g = 128, + b = 0 + }, + { + name = "Green", + r = 0, + g = 128, + b = 0 + }, + { + name = "Purple", + r = 128, + g = 0, + b = 128 + }, + { + name = "Green", + r = 0, + g = 128, + b = 0 + }, + { + name = "Teal", + r = 0, + g = 128, + b = 128 + }, + { + name = "Navy Blue", + r = 0, + g = 0, + b = 128 + } +}; +VehicleMods.neoncolors = { + { + label = "White", + value = { + 222, + 222, + 255 + }, + description = "Demo Item 1" + }, + { + label = "Blue", + value = { + 2, + 21, + 255 + }, + description = "Demo Item 2" + }, + { + label = "Electric Blue", + value = { + 3, + 83, + 255 + }, + description = "Demo Item 3" + }, + { + label = "Mint Green", + value = { + 0, + 222, + 140 + }, + description = "Demo Item 4" + }, + { + label = "Lime Green", + value = { + 94, + 222, + 1 + }, + description = "Demo Item 4" + }, + { + label = "Yellow", + value = { + 255, + 255, + 0 + }, + description = "Demo Item 4" + }, + { + label = "Golden Shower", + value = { + 255, + 150, + 0 + }, + description = "Demo Item 4" + }, + { + label = "Orange", + value = { + 255, + 62, + 0 + }, + description = "Demo Item 4" + }, + { + label = "Red", + value = { + 255, + 1, + 1 + }, + description = "Demo Item 4" + }, + { + label = "Pony Pink", + value = { + 255, + 50, + 100 + }, + description = "Demo Item 4" + }, + { + label = "Hot Pink", + value = { + 255, + 5, + 190 + }, + description = "Demo Item 4" + }, + { + label = "Purple", + value = { + 35, + 1, + 255 + }, + description = "Demo Item 4" + }, + { + label = "Blacklight", + value = { + 15, + 3, + 255 + }, + description = "Demo Item 4" + } +}; +VehicleMods.vehmods = { + { + label = "Turbo", + parent = "upgrades", + modType = 17, + }, + { + label = "Engine", + parent = "upgrades", + modType = 11, + }, + { + label = "Brakes", + parent = "upgrades", + modType = 12, + }, + { + label = "Transmission", + parent = "upgrades", + modType = 13, + }, + { + label = "Suspension", + parent = "upgrades", + modType = 15, + }, + { + label = "Armor", + parent = "upgrades", + modType = 16, + }, + { + label = "Plate - Back", + parent = "cosmetics", + modType = 25, + }, + { + label = "Plate - Front", + parent = "cosmetics", + modType = 26, + }, + { + label = "Interior", + parent = "cosmetics", + modType = 27, + }, + { + label = "Trim", + parent = "cosmetics", + modType = 28, + }, + { + label = "Dashboard", + parent = "cosmetics", + modType = 29, + }, + { + label = "Speedometer", + parent = "cosmetics", + modType = 30, + }, + { + label = "Door Speakers", + parent = "cosmetics", + modType = 31, + }, + { + label = "Seats", + parent = "cosmetics", + modType = 32, + }, + { + label = "Steering Wheel", + parent = "cosmetics", + modType = 33, + }, + { + label = "Gear Lever", + parent = "cosmetics", + modType = 34, + }, + { + label = "Quarter-Deck", + parent = "cosmetics", + modType = 35, + }, + { + label = "Speakers", + parent = "cosmetics", + modType = 36, + }, + { + label = "Trunk", + parent = "cosmetics", + modType = 37, + }, + { + label = "Hydraulic", + parent = "cosmetics", + modType = 38, + }, + { + label = "Engine Block", + parent = "cosmetics", + modType = 39, + }, + { + label = "Air Filter", + parent = "cosmetics", + modType = 40, + }, + { + label = "Struts", + parent = "cosmetics", + modType = 41, + }, + { + label = "Arch Cover", + parent = "cosmetics", + modType = 42, + }, + { + label = "Aerials", + parent = "cosmetics", + modType = 43, + }, + { + label = "Wings", + parent = "cosmetics", + modType = 44, + }, + { + label = "Fuel Tank", + parent = "cosmetics", + modType = 45, + }, + { + label = "Windows", + parent = "cosmetics", + modType = 46, + }, + { + label = "Stickers", + parent = "cosmetics", + modType = 48, + }, + { + label = "Sport", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 0, + }, + { + label = "Muscle", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 1, + }, + { + label = "Low Rider", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 2, + }, + { + label = "SUV", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 3, + }, + { + label = "All Terrain", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 4, + }, + { + label = "Tuning", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 5, + }, + { + label = "Motorcycle", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 6, + }, + { + label = "Highend", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 7, + }, + { + label = "Original", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 8, + }, + { + label = "Bespoke", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 9, + }, + { + label = "Open Wheel", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 10, + }, + { + label = "Street", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 11, + }, + { + label = "Track", + parent = "modFrontWheelsTypes", + modType = 23, + wheelType = 12, + }, + { + label = "Wheel Color", + parent = "modFrontWheelsColor", + modType = "wheelColor", + }, + { + label = "License Plates", + parent = "cosmetics", + modType = "plateIndex", + }, + { + label = "Primary Color", + parent = "primaryRespray", + modType = "color1", + }, + { + label = "Secondary Color", + parent = "secondaryRespray", + modType = "color2", + }, + { + label = "Pearlescent Color", + parent = "pearlescentRespray", + modType = "pearlescentColor", + }, + { + label = "Headlight", + parent = "cosmetics", + modType = 22, + }, + { + label = "Spoilers", + parent = "bodyparts", + modType = 0, + }, + { + label = "Front Bumper", + parent = "bodyparts", + modType = 1, + }, + { + label = "Rear Bumper", + parent = "bodyparts", + modType = 2, + }, + { + label = "Sideskirt", + parent = "bodyparts", + modType = 3, + }, + { + label = "Exhaust", + parent = "bodyparts", + modType = 4, + }, + { + label = "Cage", + parent = "bodyparts", + modType = 5, + }, + { + label = "Grille", + parent = "bodyparts", + modType = 6, + }, + { + label = "Hood", + parent = "bodyparts", + modType = 7, + }, + { + label = "Left Fender", + parent = "bodyparts", + modType = 8, + }, + { + label = "Right Fender", + parent = "bodyparts", + modType = 9, + }, + { + label = "Roof", + parent = "bodyparts", + modType = 10, + }, + { + label = "Horns", + parent = "cosmetics", + modType = 14, + }, + { + label = "Neon", + parent = "cosmetics", + modType = "neonColor", + }, + { + label = "Tiresmoke", + parent = "wheels", + modType = "tyreSmokeColor", + }, + { + label = "Livery 2", + parent = "cosmetics", + modType = "livery2", + } +}; +VehicleMods.vehicledoors = { + { + label = "LFront Door", + value = 0, + description = "Left Front Door" + }, + { + label = "RFront Door", + value = 1, + description = "Right Front Door" + }, + { + label = "LRear Door", + value = 2, + description = "Left Rear Door" + }, + { + label = "RRear Door", + value = 3, + description = "Right Rear Door" + }, + { + label = "Hood", + value = 4, + description = "Hood" + }, + { + label = "Trunk", + value = 5, + description = "Trunk" + } +};