okokMechanicJob
Last updated
Last updated
ox_lib v3.16.2+ ().
ALTER TABLE `owned_vehicles` ADD `vehiclemileage` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `owned_vehicles` ADD `vehiclestatus` LONGTEXT DEFAULT '{"oil":0,"brakes":0,"filters":0,"battery":0, "timingbelt":0, "enginefluid":0, "tires":0, "lights":0}';
ALTER TABLE `owned_vehicles` ADD `vehiclenitrouslevel` LONGTEXT DEFAULT '{"nitrouslevel":0,"nitroustype":"none"}';
ALTER TABLE `owned_vehicles` ADD `vehiclestance` LONGTEXT DEFAULT NULL;
ALTER TABLE `owned_vehicles` ADD `vehicleengine` LONGTEXT DEFAULT '{"engine":"stock","defaultspeed":0}';
ALTER TABLE `owned_vehicles` ADD `vehicletuning` LONGTEXT DEFAULT '{"defaultboost":0, "boost":0, "defaultacceleration":0, "acceleration":0, "defaultgear":0,"gear":0, "defaultdrivetrain":0, "drivetrain":"0","defaultbrake":0, "brake":0, "smoke":false, "pops":false, "driftmode":false}';
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('oil', 'Oil', 0, 0, 1), ('brakes', 'Brakes', 0, 0, 1), ('filters', 'Filters', 0, 0, 1), ('battery', 'Battery', 0, 0, 1), ('engine', 'Engine', 250, 0, 1), ('timingbelt', 'Timing Belt', 0, 0, 1), ('enginefluid', 'Engine Fluid', 0, 0, 1), ('tire', 'Tire', 0, 0, 1), ('cleaningkit', 'Cleaning Kit', 250, 0, 1), ('dynoprintout', 'Dyno Printout', 250, 0, 1), ('lights', 'Lights', 250, 0, 1), ('nitrousrecharge', 'Nitrous Recharge', 250, 0, 1);
ALTER TABLE `player_vehicles` ADD `vehiclemileage` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `player_vehicles` ADD `vehiclestatus` LONGTEXT DEFAULT '{"oil":0,"brakes":0,"filters":0,"battery":0, "timingbelt":0, "enginefluid":0, "tires":0, "lights":0}';
ALTER TABLE `player_vehicles` ADD `vehiclenitrouslevel` LONGTEXT DEFAULT '{"nitrouslevel":0,"nitroustype":"none"}';
ALTER TABLE `player_vehicles` ADD `vehiclestance` LONGTEXT DEFAULT NULL;
ALTER TABLE `player_vehicles` ADD `vehicleengine` LONGTEXT DEFAULT '{"engine":"stock","defaultspeed":0}';
ALTER TABLE `player_vehicles` ADD `vehicletuning` LONGTEXT DEFAULT '{"defaultboost":0, "boost":0, "defaultacceleration":0, "acceleration":0, "defaultgear":0,"gear":0, "defaultdrivetrain":0, "drivetrain":"0","defaultbrake":0, "brake":0, "smoke":false, "pops":false, "driftmode":false}';
Navigate to es_extended/client/functions.lua and add the following code inside the setVehicleProperties
function:
exports['okokMechanicJob']:setVehicleProperties(vehicle)
Navigate to qb-core/client/functions.lua and add the following code inside the setVehicleProperties
function:
exports['okokMechanicJob']:setVehicleProperties(vehicle)
Add Item:
oil = { name = 'oil', label = 'Oil', weight = 0, type = 'item', image = 'oil.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = '' },
brakes = { name = 'brakes', label = 'Brakes', weight = 0, type = 'item', image = 'brakes.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = '' },
filters = { name = 'filters', label = 'Filters', weight = 0, type = 'item', image = 'filters.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = '' },
battery = { name = 'battery', label = 'Battery', weight = 0, type = 'item', image = 'battery.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = '' },
engine = { name = 'engine', label = 'Engine', weight = 250, type = 'item', image = 'engine.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Engine to replace on your vehicle' },
timingbelt = { name = 'timingbelt', label = 'Timing Belt', weight = 0, type = 'item', image = 'timingbelt.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = '' },
enginefluid = { name = 'enginefluid', label = 'Engine Fluid', weight = 0, type = 'item', image = 'enginefluid.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = '' },
tire = { name = 'tire', label = 'Tire', weight = 0, type = 'item', image = 'tire.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = '' },
cleaningkit = { name = 'cleaningkit', label = 'Cleaning Kit', weight = 250, type = 'item', image = 'cleaningkit.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'A microfiber cloth with some soap will let your car sparkle again!' },
dynoprintout = { name = 'dynoprintout', label = 'Dyno Printout', weight = 250, type = 'item', image = 'dynoprintout.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'A dyno comprovative of your vehicle performance' },
lights = { name = 'lights', label = 'Lights', weight = 250, type = 'item', image = 'lights.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Lights to replace on your vehicle' },
nitrousrecharge = { name = 'nitrousrecharge', label = 'Nitrous Recharge', weight = 250, type = 'item', image = 'nitrousrecharge.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Recharge for your nitrous bottle' },
["oil"] = {label = "Oil", weight = 120, stack = true, close = true},
["brakes"] = {label = "brakes", weight = 120, stack = true, close = true},
["filters"] = {label = "Filter", weight = 120, stack = true, close = true},
["battery"] = {label = "Battery", weight = 120, stack = true, close = true},
["timingbelt"] = {label = "Timing belt", weight = 120, stack = true, close = true},
["enginefluid"] = {label = "Engine fluid", weight = 120, stack = true, close = true},
["tire"] = {label = "Tire", weight = 120, stack = true, close = true},
["cleaningkit"] = {label = "Cleaning kit", weight = 120, stack = true, close = true},
["repairkit"] = {label = "Repair kit", weight = 120, stack = true, close = true},
["advancedrepairkit"] = {label = "Advanced repair kit", weight = 120, stack = true, close = true},
["nitrous"] = {label = "Nitrous", weight = 120, stack = true, close = true},
["nitrousrecharge"] = {label = "Nitrous Recharge", weight = 120, stack = true, close = true},
["engine"] = {label = "Engine", weight = 120, stack = true, close = true},
["lights"] = {label = "Lights", weight = 120, stack = true, close = true},
["dynoprintout"] = {label = "Dyno Printout", weight = 120, stack = false, close = true},