• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua How much oz House

Sigoles

Discord: @sigoles
Joined
Nov 20, 2015
Messages
1,209
Solutions
2
Reaction score
154
is there any function of verifying how much oz of any certain bag inside tile house?

and a way of a house not saving the bag at server save if this bag have more than X oz?

tfs 1.2

thanks


tried:

LUA:
function onSay(player, item, words, param)
    local position = player:getPosition()
    local tile = Tile(position)
    local house = tile and tile:getHouse()
    if house == nil then
        player:sendCancelMessage("You are not inside a house.")
        position:sendMagicEffect(CONST_ME_POFF)
        return false
    end
if item:getId() == 1988 and item:getWeight() > 50000 then
        self:sendCancelMessage('Sorry, you can not leave house, some item is too heavy on the floor of your house.')
        position:sendMagicEffect(CONST_ME_POFF)
        return false
    end
return false
end
 
Last edited by a moderator:
Back
Top