> For the complete documentation index, see [llms.txt](https://madsl.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://madsl.gitbook.io/docs/resources/slash-tires/exports.md).

# Exports

There are 8 exports included with the script (all client-side). Some of them are intended to get information to be used in other scripts (e.g. isSlashing export) and some are intended to tell the slash tires script to do something (e.g. attemptToSlashTire).

<table><thead><tr><th width="233">Export</th><th width="248.33333333333331">Description</th><th width="138">Parameter(s)</th><th>Return type</th></tr></thead><tbody><tr><td>isSlashing</td><td>Returns if the local player is in the progress of slashing a tire</td><td>None</td><td>Boolean</td></tr><tr><td>canCurrentWeaponSlashTires</td><td>Returns if the currently equipped player weapon can slash tires</td><td>None</td><td>Number</td></tr><tr><td>burstVehicleTire</td><td>Burst the vehicle tire, the client must have network control over the vehicle for this to have an effect</td><td>vehicle, tireIndex</td><td></td></tr><tr><td>getVehicleTireByBone</td><td>This gets a bunch of data about a tire, this is export is used together with the slashTire export</td><td>vehicle, boneName, coords</td><td>Table</td></tr><tr><td>getClosestVehicleTire</td><td>Much like getVehicleTireByBone it returns the tire data, but this gets the closest tire of the spesifed vehicle</td><td>vehicle, coords</td><td>Table</td></tr><tr><td>slashTire</td><td>Makes the player slash the spesifed tire</td><td>tire</td><td></td></tr><tr><td>canSlashVehicleTire</td><td>Checks of the player can slash the spesifed tire. This export first returns if the player can slash or not, and if they can't it also returns the reason.</td><td>tire</td><td>Boolean, String|Nil</td></tr><tr><td>attemptToSlashTire</td><td>Uses the canSlashVehicleTire function to check if the player can slash the tire, if so the player slashes the tire.</td><td>tire</td><td></td></tr></tbody></table>

## Examples

```lua
local isSlashing = exports.slashtires:isSlashing()
if isSlashing then
    print("The player is slashing a tire!")
else
    print("The player is not slashing any tires")
end

local canCurWeaponSlash = exports.slashtires:canCurrentWeaponSlashTires()
if canCurWeaponSlash then
    print("The current player weapon can slash a tire!")
else
    print("The current player weapon cannot slash a tire!")
end

local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if vehicle ~= 0 then
    -- Burst the front left tire of the vehicle the ped is in
    exports.slashtires:burstVehicleTire(vehicle, 0)
end

-- I'm too lazy to write a function for this for the example, but if you don't use ox_lib then just use your own function
local vehicle2 = lib.getClosestVehicle(GetEntityCoords(PlayerPedId()))

if vehicle2 ~= 0 then
    -- If you don't pass in the coords paramter it gets the current player position
    -- For the boneName see the WHEEL_BONES table in shared/variables.lua file
    local tire = exports.slashtires:getVehicleTireByBone(vehicle, 'wheel_rf')
    if tire.index ~= nil then
        exports.slashtires:attemptToSlashTire(tire)
    end
end

if vehicle2 ~= 0 then
    local tire = exports.slashtires:getClosestVehicleTire(vehicle)

    -- If you don't want the attemptToSlashTire export to give a notification to the player then this is "work-around", otherswise just use attemptToSlashTire
    local canSlash, reason = exports.slashtires:canSlashVehicleTire(tire)
    if not canSlash then
        print("can't slash, reason:", reason)
        return
    end

    exports.slashtires:slashTire(tire)
end
```
