DH Mechanic

Framework Compatibility

DH Mechanic works for TMC Only

Installation

  • Drag and drop the resource into your resources folder

  • ensure the resource

Items

add the below items to your core/shared.lua

  
	["car_spraycan"] = {
		["label"] = "Car Spray Can",
		["weight"] = 1,
		["type"] = "item",
		["image"] = "car_spraycan.webp",
		["unique"] = true,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = false,
		["description"] = "This will make it look a bit better!",
	},
	["carmoditem"] = {
		["label"] = "Car Modification Part",
		["weight"] = 1,
		["type"] = "item",
		["image"] = "carmoditem.webp",
		["unique"] = true,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = false,
		["description"] = "This will make it look a bit better!",
	},
	["mech_radiator"] = {
		["label"] = "Radiator",
		["weight"] = 350,
		["type"] = "item",
		["image"] = "mech_radiator.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A replacement radiator to help keep your engine cool.",
	},

	["mech_axle"] = {
		["label"] = "Axle Assembly",
		["weight"] = 450,
		["type"] = "item",
		["image"] = "mech_axle.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "An axle assembly for repairing vehicle suspension and drivetrain.",
	},

	["mech_engine"] = {
		["label"] = "Engine Repair Kit",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "mech_engine.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A comprehensive engine repair kit to improve engine performance and health.",
	},

	["mech_body"] = {
		["label"] = "Body Repair Kit",
		["weight"] = 450,
		["type"] = "item",
		["image"] = "mech_body.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A set of tools and materials for repairing vehicle body damage.",
	},

	["mech_brakes"] = {
		["label"] = "Brake Kit",
		["weight"] = 250,
		["type"] = "item",
		["image"] = "mech_brakes.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A complete brake kit including pads, rotors, and calipers.",
	},

	["mech_clutch"] = {
		["label"] = "Clutch Kit",
		["weight"] = 200,
		["type"] = "item",
		["image"] = "mech_clutch.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A replacement clutch kit for manual transmission vehicles.",
	},

	["mech_fueltank"] = {
		["label"] = "Fuel Tank Parts",
		["weight"] = 300,
		["type"] = "item",
		["image"] = "mech_fueltank.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "Fuel system components including injectors, filters, and lines.",
	},
	["engine_stock"] = {
		["label"] = "Stock Engine",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "engine_stock.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A standard stock engine for vehicles.",
	},
	["engine_street"] = {
		["label"] = "Street Engine",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "engine_street.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A slightly upgraded engine with better performance than stock.",
	},
	["engine_sports"] = {
		["label"] = "Sports Engine",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "engine_sports.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A high-performance sports engine offering significant power gains.",
	},
	["engine_super"] = {
		["label"] = "Super Engine",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "engine_super.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A premium-grade engine with exceptional power output.",
	},
	["engine_racing"] = {
		["label"] = "Racing Engine",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "engine_racing.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A professional racing engine offering maximum performance.",
	},

	-- Turbo Items
	["turbo_upgrade"] = {
		["label"] = "Turbocharger",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "turbo_upgrade.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A turbocharger that boosts engine performance by forcing extra air into the combustion chamber.",
	},

	-- Transmission Items
	["transmission_stock"] = {
		["label"] = "Stock Transmission",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "transmission_stock.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A standard factory transmission.",
	},
	["transmission_street"] = {
		["label"] = "Street Transmission",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "transmission_street.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "An upgraded transmission with improved shift times for street use.",
	},
	["transmission_sports"] = {
		["label"] = "Sports Transmission",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "transmission_sports.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A high-performance transmission designed for sports driving.",
	},
	["transmission_race"] = {
		["label"] = "Race Transmission",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "transmission_race.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A competition-grade transmission designed for maximum performance on the track.",
	},

	

	-- Brakes Items
	["brakes_stock"] = {
		["label"] = "Stock Brakes",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "brakes_stock.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "Standard factory brakes that provide adequate stopping power.",
	},
	["brakes_street"] = {
		["label"] = "Street Brakes",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "brakes_street.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "Enhanced braking system for improved street performance.",
	},
	["brakes_sports"] = {
		["label"] = "Sports Brakes",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "brakes_sports.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "High-performance brakes designed for sports driving with excellent stopping power.",
	},
	["brakes_race"] = {
		["label"] = "Race Brakes",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "brakes_race.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "Competition-grade brakes offering maximum stopping power for racing conditions.",
	},
	["suspension_stock"] = {
		["label"] = "Stock Suspension",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "suspension_stock.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "Standard suspension system with factory-level performance and comfort.",
	},
	["suspension_street"] = {
		["label"] = "Street Suspension",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "suspension_street.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "Upgraded suspension designed for improved handling in urban and highway conditions.",
	},
	["suspension_sports"] = {
		["label"] = "Sports Suspension",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "suspension_sports.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "Performance suspension for sportier handling and reduced body roll.",
	},
	["suspension_track"] = {
		["label"] = "Track Suspension",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "suspension_track.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "A track-tuned suspension setup for precision cornering and high-speed stability.",
	},
	["suspension_race"] = {
		["label"] = "Race Suspension",
		["weight"] = 500,
		["type"] = "item",
		["image"] = "suspension_race.webp",
		["unique"] = false,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "Professional-grade suspension system designed for peak racing performance.",
	},


	["mech_tablet"] = {
		["name"] = "mech_tablet",
		["label"] = "Mechanic Tablet",
		["weight"] = 50,
		["type"] = "item",
		["image"] = "mech_tablet.webp",
		["unique"] = false,
		["stackable"] = false,
		["useable"] = true,
		["shouldClose"] = true,
		["description"] = "Tablet for mechanics to use",
	},

    
	["mech_receipt"] = {
		["label"] = "Mech Receipt",
		["weight"] = 1,
		["type"] = "item",
		["image"] = "mech_receipt.webp",
		["unique"] = true,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = false,
		["description"] = "A list of parts wanted!",
	},

    
	["service_kit"] = {
		["label"] = "Service Kit",
		["weight"] = 1,
		["type"] = "item",
		["image"] = "service_kit.webp",
		["unique"] = true,
		["stackable"] = true,
		["useable"] = true,
		["shouldClose"] = false,
		["description"] = "A service kit for your car!",
	},

Add the below to your inventory resource Config.ItemDescriptionFormatters

["service_kit"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>%s Service Kit</span><br /><strong>Service: </strong><span>Vehicle Maintenance</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.serviceType or "Standard",
        itemInfo.carreg or "Universal"
    )
end,
    ["carmoditem"] = function(itemInfo)
    return string.format(
        "<strong>Part Name: </strong><span>%s</span><br /><strong>Variant: </strong><span>%s</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.partname or "Unknown",
        itemInfo.variant or "Unknown",
        itemInfo.carreg or "Unknown"
    )
end,
-- Engine Items
["engine_stock"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Stock Engine</span><br /><strong>Performance: </strong><span>Standard</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["engine_street"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Street Engine</span><br /><strong>Performance: </strong><span>Enhanced</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["engine_sports"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Sports Engine</span><br /><strong>Performance: </strong><span>High</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["engine_super"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Super Engine</span><br /><strong>Performance: </strong><span>Premium</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["engine_racing"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Racing Engine</span><br /><strong>Performance: </strong><span>Maximum</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

-- Turbo Items
["turbo_upgrade"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Turbocharger</span><br /><strong>Boost: </strong><span>Forced Induction</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

-- Transmission Items
["transmission_stock"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Stock Transmission</span><br /><strong>Performance: </strong><span>Standard</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["transmission_street"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Street Transmission</span><br /><strong>Performance: </strong><span>Improved Shifts</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["transmission_sports"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Sports Transmission</span><br /><strong>Performance: </strong><span>High Performance</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["transmission_race"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Race Transmission</span><br /><strong>Performance: </strong><span>Competition Grade</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,


-- Brakes Items
["brakes_stock"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Stock Brakes</span><br /><strong>Performance: </strong><span>Standard</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["brakes_street"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Street Brakes</span><br /><strong>Performance: </strong><span>Enhanced</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["brakes_sports"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Sports Brakes</span><br /><strong>Performance: </strong><span>High Performance</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["brakes_race"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Race Brakes</span><br /><strong>Performance: </strong><span>Competition Grade</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

-- Suspension Items
["suspension_stock"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Stock Suspension</span><br /><strong>Performance: </strong><span>Factory Level</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["suspension_street"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Street Suspension</span><br /><strong>Performance: </strong><span>Improved Handling</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["suspension_sports"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Sports Suspension</span><br /><strong>Performance: </strong><span>Reduced Body Roll</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["suspension_track"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Track Suspension</span><br /><strong>Performance: </strong><span>Precision Tuned</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["suspension_race"] = function(itemInfo)
    return string.format(
        "<strong>Type: </strong><span>Race Suspension</span><br /><strong>Performance: </strong><span>Professional Grade</span><br /><strong>Vehicle Reg: </strong><span>%s</span>",
        itemInfo.carreg or "Universal"
    )
end,

["car_spraycan"] = function(itemInfo)
    local colorDisplay = ""
    if itemInfo.colorHex then
        colorDisplay = string.format("<span style='color: %s;'>●</span> ", itemInfo.colorHex)
    end
    
    local customText = ""
    if itemInfo.isCustom then
        customText = " (Custom)"
    end
    
    return string.format(
        "<strong>Color: </strong>%s<span>%s%s</span><br /><strong>Part: </strong><span>%s</span><br /><strong>Vehicle Reg: </strong><span>%s</span><br /><strong>Color Index: </strong><span>%s</span>",
        colorDisplay,
        itemInfo.colorName or "Unknown",
        customText,
        itemInfo.part or "Unknown",
        itemInfo.carreg or "Unknown",
        itemInfo.colorIndex or "N/A"
    )
end,


["mech_receipt"] = function(itemInfo)
      
    return string.format(
        "<strong>Type: </strong><span>%s</span><br /><strong>Vehicle: </strong><span>%s</span><br /><strong>Plate: </strong><span>%s</span><br /><strong>Total: </strong><span>£%s</span><br /><strong>Date: </strong><span>%s</span>%s",
        itemInfo.type or "Unknown",
        itemInfo.vehicleModel or "Unknown",
        itemInfo.vehiclePlate or "Unknown",
        itemInfo.totalAmount or "0",
        itemInfo.date or "Unknown",
        expiryStatus
    )
end,

Add the images in the install folder to your inventory/html/images

Usage

Configure the Config.lua for your mechanic shop Item for the mechanic tablet is mech_tablet Command for public tablet is /publictablet Create a receipt for a work type Bill the player Receive the parts from the collection point Install the part by using the part at the vehicle If true in config, materials must be in the stash to receive the car parts from the collection point

Last updated