-- Get the player ped
local playerPed = PlayerPedId()
-- Retrieve the vehicle the player is in
local vehicle = GetVehiclePedIsIn(playerPed, false)
-- If the player is not in a vehicle, return
if (vehicle == 0) then return end
-- Fix the vehicle
SetVehicleFixed(vehicle)