Config

Config = {}

-- ESX --
Config.EsxExport = function()
    return exports['es_extended']:getSharedObject()
end

--Version : 2.0

Config.TwistMileageItem = 'twist_mil'
Config.DecrypterItem = 'mil_decrypter'

Config.Settings = {
    FireEngine = true, -- true, if you want the vehicle to catch fire when you unsuccessfully try to decrypt or reduce the mileage.
    AutomaticShowMenu = true, -- true if you want the mileage to be displayed whenever you sit in the owner's vehicle as a 2d menu / false if you want to display the mileage using the button
    VehicleWear = true, --True = if you want the vehicle's performance to decrease, if the vehicle has traveled many miles, the first power reduction is to 100 miles, then to 150 miles, and then every 100 miles.
    DirtyVehicle = true, -- True = as the performance of a vehicle with a large mileage decreases, the vehicle will also become more and more dirty
        MiniGame = {
            Difficulty = 'medium', -- easy / medium / hard
            areaSize = 50, -- size of the area in degrees.
            speedMultiplier = 2,
            Buttons = {'a', 'd', 's'}
        }
}

Config.Buttons = {  -- https://docs.fivem.net/docs/game-references/controls/
    Show = 208,
}

-- MENU CUSTOMIZE --
Config.Menu = {
    ['MAIN'] = {
        TextFont = 4,
        TextColor = {255, 255, 255},
        Scale = 0.4,
        Position = {x = 0.95, y = 0.90},
        Background = {
            enable = true,
            color = { r = 35, g = 35, b = 35, alpha = 200 },
        },
    },
}

Config.Notify = function(style, msg)

    ESX.ShowNotification(msg, 2000, style)
    
end

------------------------
--If you don't understand much, you don't have to edit it, or you can ask in the support ticket on the discord.
function WearVehicle(vehicle, mileage)  --Vehicle wear adjustment 
        if mileage >= 600 then --600 is the mileage
           if Config.Settings.VehicleWear  then
            SetVehicleCheatPowerIncrease(vehicle, 0.1) -- this is a performance reduction of 0.1 is the lowest and 1.0 is the default
           end
            if Config.Settings.VehiclePollution then
            SetVehicleDirtLevel(vehicle, 15.0) -- this is dirt on the vehicle if the vehicle has driven more than 600 miles
        end
        elseif mileage >= 500 then
            if Config.Settings.VehicleWear  then
            SetVehicleCheatPowerIncrease(vehicle, 0.3)
            end
            if Config.Settings.VehiclePollution then
            SetVehicleDirtLevel(vehicle, 15.0)
        end
        elseif mileage >= 400 then
            if Config.Settings.VehicleWear  then
            SetVehicleCheatPowerIncrease(vehicle, 0.4)
            end
            if Config.Settings.VehiclePollution then
            SetVehicleDirtLevel(vehicle, 15.0)
        end
        elseif mileage >= 300 then
            if Config.Settings.VehicleWear  then
            SetVehicleCheatPowerIncrease(vehicle, 0.5)
            end
            if Config.Settings.VehiclePollution then
            SetVehicleDirtLevel(vehicle, 14.0)
        end
        elseif mileage >= 200 then
            if Config.Settings.VehicleWear  then
            SetVehicleCheatPowerIncrease(vehicle, 0.6)
            end
            if Config.Settings.VehiclePollution then
            SetVehicleDirtLevel(vehicle, 12.0)
        end
        elseif mileage >= 150 then
            if Config.Settings.VehicleWear  then
            SetVehicleCheatPowerIncrease(vehicle, 0.8)
            end
            if Config.Settings.VehiclePollution then
            SetVehicleDirtLevel(vehicle, 7.0)
        end
        elseif mileage >= 100 then
            if Config.Settings.VehicleWear  then
            SetVehicleCheatPowerIncrease(vehicle, 0.9)
            end
            if Config.Settings.VehiclePollution then
            SetVehicleDirtLevel(vehicle, 5.0)
        end
        elseif mileage >= 50 then
            if Config.Settings.VehicleWear then
            SetVehicleCheatPowerIncrease(vehicle, 1.0)
            end
            if Config.Settings.VehiclePollution then
            SetVehicleDirtLevel(vehicle, 1.0)
        end
    end
end

--TEXT --
Translations = {
    ['TEXT'] = { 
        ['error_twist'] = 'Failed to twist mileage',
        ['error_decrypted'] = 'Failed to decrypt mileage',
        ['success_twist'] = 'We managed to twist the mileage on ',
        ['success_decrypted'] = 'Success to decrypt a twisted mileage.',
        ['never_reduced'] = 'The mileage of the vehicle has never been reduced.',
        ['no_owned'] = 'The vehicle has no owner',
        ['already'] = 'Youre not in the vehicle.',
        ['state_mileage'] = ' mil',
    },
}

Last updated