getPerformanceIndex

getPerformanceIndex(vehicleHash [string], engineHash [string],transmissionData [table], tyreCompound[string], powerMultiplier[float], weightMultiplier[float], brakesMultiplier[float], hasTurbo[bool], vanillaTuneData[table])

Returns a table containing the performance index calculation data. If you don't have the car tuned, or didn't tuned all the way, you can pass the args as "nil" with exception for the vehicleHash, and it will calculate the P.I with the stock data, alongside the tuning data if there is any. If all is nil, it will calculate the P.I data with stock vehicle performance data.

Preferably, you should input the vehicle hash as "elegy" for example.

However if you input it's hash "196747873" it will also work, but will have the function to take longer to execute.

circle-info

As of the build 28.02.2026, vanilla tuning support has been added, in order to consider the vanilla tuning in your PI calculations, you must tell if the vehicle has a turbo and the stages for the vanilla tuning, with this specific table:

            local vanillaTuneData = {
                engineStage = GetVehicleMod(vehicle,11),
                brakesStage = GetVehicleMod(vehicle,12),
                transmissionStage = GetVehicleMod(vehicle,13),
            } 
            -- Example table keys name, it expects what GetVehicleMod Returns.
            local currentCarData = dynamic:getVehicleData(currentCarModel)
            local engineData = dynamic:getEngineData(engineSwap)
            
            local isEngineTurboCharged = false

            if (currentCarData.forcedInduction.isTurbocharged == true) or (engineSwap ~= 'stock' and engineData.forcedInduction.isTurbocharged == true) then
                isEngineTurboCharged = true
            end

            local hasTurbo = IsToggleModOn(vehicle, 18) or isEngineTurboCharged
            -- Example on how to properly flag if a vehicle has or not turbo.

Returned Table:

Code Example:

Last updated