[FREE] Tire Change Animation + Props

:automobile: Free Tire Change Animation (No Support)

Here is a free tire/wheel change animation setup for FiveM, including props, offsets, bone data and ready-to-use code.
This resource is released as-is and comes with no support.


:wrench: Features

  • Full-body tire-change animation
  • Drill + tyre props
  • Correct bone index (28422)
  • Clean offsets & rotations
  • Auto-removal of the wheel
  • No dependencies
  • Unsupported resource

:clapper_board: Preview


:inbox_tray: Download

Download:
wymianakola@animation.ycd (1.7 MB)


:clapper_board: Animation Data

Field Value
animDict wymianakola@animation
animName wymiana_clip

:package: Code Example

local running = false
local obj1, obj2 = nil, nil

-- time after which the wheel disappears (ms)
local TYRE_LIFETIME_MS = 4000

RegisterCommand('wheel', function()
    if running then return end
    running = true

    local ped = PlayerPedId()

    -- ANIMATION DATA
    local animDict = "wymianakola@animation"
    local animName = "wymiana_clip"
    local flag_full_body = 39

    -- PROPS
    local prop_drill = "prop_tool_drill"
    local prop_tyre  = "imp_prop_impexp_tyre_01c"

    -- BONE FOR BOTH PROPS
    local boneCommon = 28422

    -- OFFSET / ROTATION (DRILL)
    local offDrill = vector3(0.0700, 0.0300, -0.0300)
    local rotDrill = vector3(80.0, 0.0, 190.0)

    -- OFFSET / ROTATION (TYRE)
    local offTyre = vector3(0.1, 0.1, -0.45703125452338)
    local rotTyre = vector3(-30.058165956682, 23.295171101693, 98.947930904397)

    -- Load animation
    RequestAnimDict(animDict)
    while not HasAnimDictLoaded(animDict) do Wait(10) end

    -- Play animation
    TaskPlayAnim(ped, animDict, animName, 8.0, -8.0, -1, flag_full_body, 0.0, false, false, false)

    -- After 0.5s: drill
    SetTimeout(500, function()
        if not running then return end

        local m1 = GetHashKey(prop_drill)
        RequestModel(m1)
        while not HasModelLoaded(m1) do Wait(10) end

        obj1 = CreateObject(m1, 0.0, 0.0, 0.0, true, true, false)
        AttachEntityToEntity(
            obj1, ped, GetPedBoneIndex(ped, boneCommon),
            offDrill.x, offDrill.y, offDrill.z,
            rotDrill.x, rotDrill.y, rotDrill.z,
            true, true, false, true, 1, true
        )
        SetModelAsNoLongerNeeded(m1)
    end)

    -- After ~3s: tyre
    SetTimeout(9000, function()
        if not running then return end

        local m2 = GetHashKey(prop_tyre)
        RequestModel(m2)
        while not HasModelLoaded(m2) do Wait(10) end

        obj2 = CreateObject(m2, 0.0, 0.0, 0.0, true, true, false)
        AttachEntityToEntity(
            obj2, ped, GetPedBoneIndex(ped, boneCommon),
            offTyre.x, offTyre.y, offTyre.z,
            rotTyre.x, rotTyre.y, rotTyre.z,
            true, true, false, true, 1, true
        )
        SetModelAsNoLongerNeeded(m2)

        -- auto-delete the tyre
        SetTimeout(TYRE_LIFETIME_MS, function()
            if running and DoesEntityExist(obj2) then
                DeleteObject(obj2)
                obj2 = nil
            end
        end)
    end)
end)

:check_mark: Notes

  • Free to use and modify
  • Provided without support
  • Ideal for mechanic-related RP features

36 Likes

Thanks for this as a free release! Would you be ok if we included it in rpemotes-reborn with credits?

3 Likes

:fire: would love to see it work with a tire repair script

great work!

Nice :metal:

1 Like

no problem

1 Like

This is really cool, perfect to make a cool tire repair script even with different types of tires, grips, good job

1 Like