# chaser\_getpp

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.)***

```lua
        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.

```lua
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)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://legacydmc.gitbook.io/chaser/get-exports/chaser_getpp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
