local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
local objectHash = GetHashKey("v_ret_gc_chair03")
local object = GetClosestObjectOfType(playerCoords, 10.0, objectHash, true, false, false)
if object == 0 then return end
-- If the object is a mission entity, we have to set it to false. Otherwise, it won't be possible to delete the object.
if IsEntityAMissionEntity(object) then
SetEntityAsMissionEntity(object, false, true)
end
DeleteObject(object)