-- Retrieve the vehicle the player is currently in.
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
-- Check if the vehicle exists in the game world.
if not DoesEntityExist(vehicle) then
-- If the vehicle does not exist, end the execution of the code here.
return
end
-- If the vehicle does exist, delete the vehicle entity from the game world.
DeleteEntity(vehicle)