C.H.A.S.E.R Docs
  • Welcome to C.H.A.S.E.R !
  • Fundamentals
    • The "chaserfirststartup" command
    • Creating your first chaser profile
    • vehdata.lua vs handling.meta
    • Utilizing the turbo viewer tool
    • Utilizing the final drive calculator tool
    • Weight Reduction
    • Engine Swapping
    • Utilizing the C.H.A.S.E.R chase cam
    • Creating an engineswap profile
    • Calibrating the PP system
    • Adapting your UI to work with C.H.A.S.E.R
  • The Config Folder
    • blocklist.lua
    • camera_tunables.lua
    • chaserconfig.lua
    • globalvehdata.lua
    • enginedata.lua
    • tiredata.lua
    • vehdata.lua
  • get exports
    • chaser_getpp
    • chaser_getctm
    • chaser_getvehname
    • chaser_getcurrentrpm
    • chaser_getminmaxrpm
    • chaser_gettelemetry
    • chaser_getturbopressure
    • chaser_getloadstatus
    • chaser_getassists
    • chaser_gettransmission
    • chaser_gethilo
    • chaser_getflywheel
    • chaser_getdifferential
    • chaser_getenginebaysize
    • chaser_gettyre
    • chaser_getturbo
    • chaser_getavgacc
    • chaser_getefficiency
    • chaser_getengineswapdata
    • chaser_getvehicledata
    • chaser_getweight
    • chaser_getengine
    • chaser_getengineptwratio
    • chaser_getnitrous
    • chaser_getscoreboardsfxmuted
    • chaser_getcurrentdriftscore
    • chaser_getcurrentdriftscoremultiplier
    • chaser_getlastbankedscore
    • chaser_getstackeddriftcount
    • chaser_getwalltapdriftcount
    • chaser_gethighspeeddriftcount
    • chaser_getvehicledata
    • chaser_getshiftdelay
    • chaser_getbrakingcapacity
    • chaser_getbrakingfbias
    • chaser_getswaybarstrenght
    • chaser_getswaybarfbias
    • chaser_getsuspension
  • Set exports
    • chaser_setassists
    • chaser_settransmission
    • chaser_settransmissionmode
    • chaser_setflywheel
    • chaser_setdifferential
    • chaser_settyre
    • chaser_setturbo
    • chaser_setweight
    • chaser_setengine
    • chaser_setnitrous
    • chaser_togglehilo
    • chaser_togglescoreboardsfx
    • chaser_setcurrentdriftscoremultiplier
    • chaser_setshiftdelay
    • chaser_setbrakingcapacity
    • chaser_setbrakingfbias
    • chaser_setswaybarstrenght
    • chaser_setswaybarfbias
    • chaser_setsuspension
  • Other Exports
    • chaser_ctm
    • chaser_calculatetuningacc
    • chaser_forcereload
    • chaser_refreshengine
    • chaser_calcacc
    • chaser_isvehicledrifting
    • chaser_disablechaser
    • chaser_enablechaser
    • chaser_startcamera
    • chaser_stopcamera
  • Networking
    • Statebags
  • User Interface
    • NUI Events
  • Controls
    • Keybinds
  • Extras
    • Demos & Softwares
    • Math
    • With love
Powered by GitBook
On this page
  1. get exports

chaser_getpp

chaser_getpp( [string] name, [bool] istunecalc, [float] weight, [string] enginename, [table] turbodata, [bool] printindividualstats, [bool] hastransmissionupgrade, [string] currenttyre,)

Returns the pp rating alongside the power. top speed, acceleration and handling ratings.

if “istunecalc” is true, you'll need to input the turbodata in this specific manner:

(P.S: the table name can be whatever, just the keys that need to be exactly this name.)

        local sendturbodata = {
            compressorsize = --INT value, 
            boosttype = --INT value,
            peakturbodecayboost = --INT value,
            turbodecaypoint = --Float value,
            maxtrboostpmax = --Float value,
            maxtrboostpmin = --Float value,
            maxtrboostpminprct = --INT value,
            maxtrboostpmaxprct = --INT value,
            booststartpoint = --Float value,
        }

Now, below are examples for commands to check the pp, both account the car tune, and the car stock.

local chaser = exports['legacydmc_chaser']

RegisterCommand("getpptuned", function()
    if chaser:chaser_getloadstatus() then
        local ped = PlayerPedId()
        local vehicle = GetVehiclePedIsIn(ped, false)
        local weight = chaser:chaser_getweight()
        local engine = chaser:chaser_getengine()
        local turbodata = chaser:chaser_getturbo()
        local hastransmissionupgrade = GetVehicleMod(vehicle,13) >= 0
        local tiredata = chaser:chaser_gettyre()
        local currenttire = tiredata.tyre
        local sendturbodata = {
            compressorsize = turbodata.size, --INT value 
            boosttype = turbodata.typeid, --INT value
            peakturbodecayboost = turbodata.ptdboost, --INT value
            turbodecaypoint = turbodata.tdp, --Float value
            maxtrboostpmax = turbodata.mtbpmax, --Float value
            maxtrboostpmin = turbodata.mtbpmin, --Float value
            maxtrboostpminprct = turbodata.mtbpminprct, --INT value
            maxtrboostpmaxprct = turbodata.mtbpmaxprct,  --INT value
            booststartpoint = turbodata.bsp --Float value
        }
        local table = chaser:chaser_getpp(chaser:chaser_getvehname(),true,weight,engine,sendturbodata,true,hastransmissionupgrade,currenttire)
        print("Vehicle Ratings: "..math.floor(table.pp))
        print("Power: "..math.floor(table.power).." | Acc: "..math.floor(table.acc))
        print("Top Speed: "..math.floor(table.speed).." | Handling: "..math.floor(table.grip))
    end
end, false)

RegisterCommand("getpp", function()
    if chaser:chaser_getloadstatus() then
        local table = chaser:chaser_getpp(chaser:chaser_getvehname(),false,0.0,"stock",nil,true,false,nil)
        print("Vehicle Ratings: "..math.floor(table.pp))
        print("Power: "..math.floor(table.power).." | Acc: "..math.floor(table.acc))
        print("Top Speed: "..math.floor(table.speed).." | Handling: "..math.floor(table.grip))
    end
end, false)
Previousvehdata.luaNextchaser_getctm

Last updated 10 months ago