• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.2 Removing Items even if its in part of the house

Tbol

Well-Known Member
Joined
Apr 7, 2019
Messages
529
Reaction score
56
Hello, got a weird issue that it deletes the furniture that i put on wall of the house even tho the wall is a part of the house, I even duble checked on RME to see if walls really are selected as a part of house, and it is, so i'm not sure why its still disappears on restart. And yes i made sure it saves the map before shuting down. Issue only appears for those walls that im putting furniture on, for other furniture its just fine.
 
Solution
Hello, issue you facing is really easy to fix. The reason why it deletes furniture from you house is because items are marked as not Movable so instead write a lua code to block item movement. So uncheck in objectbuilder the option not movable and inside players.lua in events folder add this.
Lua:
local forbiddenItems = {
    6666, ITEMIDS,
}

Below
Lua:
function Player:onMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
Add
Lua:
    if table.contains(forbiddenItems, item:getId()) then
        return false
    end
goto sql and rest house
Lua:
DELETE FROM `house_lists`;
DELETE FROM `houses`;
DELETE FROM `tile_store`;
Anything you add to house should do that
Nonono i dont want to delete those items i add, i want them to stay.

Another think i noticed created a tile as a furniture basically its just not movable object like the stuff i add on walls that disappears aswell, and after reset it deletes it aswell. Could it be that it deletes anything that is not movable?
 
Last edited:
Hello, issue you facing is really easy to fix. The reason why it deletes furniture from you house is because items are marked as not Movable so instead write a lua code to block item movement. So uncheck in objectbuilder the option not movable and inside players.lua in events folder add this.
Lua:
local forbiddenItems = {
    6666, ITEMIDS,
}

Below
Lua:
function Player:onMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
Add
Lua:
    if table.contains(forbiddenItems, item:getId()) then
        return false
    end
 
Solution
Hello, issue you facing is really easy to fix. The reason why it deletes furniture from you house is because items are marked as not Movable so instead write a lua code to block item movement. So uncheck in objectbuilder the option not movable and inside players.lua in events folder add this.
Lua:
local forbiddenItems = {
    6666, ITEMIDS,
}

Below
Lua:
function Player:onMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
Add
Lua:
    if table.contains(forbiddenItems, item:getId()) then
        return false
    end
Thank you works perfect 🥰
 
Back
Top