• 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!

trashholder tile script tfs 1.2

Larb

New Member
Joined
Nov 26, 2016
Messages
85
Reaction score
1
Hello,
Can someone help me with a script,
So that if the player drops any item in xtile it is removed in X time? TFS 1.2
 
Last edited:
Solution
events/player.lua
Lua:
    local cls = Tile(toPosition)
    if cls and not cls:getHouse() then
    if  cls:hasFlag(TILESTATE_PROTECTIONZONE) then
    item:remove()
    end
    return false
    end
movements
<movevent event="AddItem" actionid="xx" script=tileclean.lua" /> or
<movevent event="AddItem" pos="xx;yy;z" script=tileclean.lua" />
Lua:
local item_exceptions = {} -- exclude items for not clean

function onAddItem(item, tile, pos)
if not isInArray(item_exceptions, item.itemid) then
item:remove()
end
return true
end

but i dont know where i can add time for clean

I asked you to read the rules;
Ref:

1. Invalid Title:
- Describe your problem in the title. A title that doesn’t describe the content of the thread is seen as an invalid title.
Examples of invalid titles:
- Help please
- I need help
- Problem
- Error
- A few questions
- Help with this bug

- Best titles are what you typed in search to find a solution for your problem, but anything related to the problem already makes it a valid title.
- Also addressing specific users in the thread title, eg "Limos help please", is not allowed.


5. Incomplete Problem Description:
- Post as much useful information as possible. If the problem is about something on your server, post the server version and client version. Also always post the errors you get and the scripts with the problems.
 
sorry for my ignorance tfs 1.2

I asked you to read the rules;
Ref:

1. Invalid Title:
- Describe your problem in the title. A title that doesn’t describe the content of the thread is seen as an invalid title.

Examples of invalid titles:
- Help please
- I need help
- Problem
- Error
- A few questions
- Help with this bug

- Best titles are what you typed in search to find a solution for your problem, but anything related to the problem already makes it a valid title.
- Also addressing specific users in the thread title, eg "Limos help please", is not allowed.


5. Incomplete Problem Description:
- Post as much useful information as possible. If the problem is about something on your server, post the server version and client version. Also always post the errors you get and the scripts with the problems.
Why did my post move?
Request for Suport board ?
 
Last edited by a moderator:
sorry for my ignorance tfs 1.2


Why did my post move?
Request for Suport board ?

Once again ... read the rules;
Rules for the Support board
#2

If it has been under 24h you have to edit your last post, not post another one aka double posting - read the rest of them aswell, not just the ones I told you about, otherwise you risk getting your thread deleted.

Because requests is a forum where you are asking someone to write to a code, support is where you ask questions or have a script you want modified or that has errors you want fixed.
If you didn't write it correctly edit the first post and PM me to move it back to requests.
 
events/player.lua
Lua:
    local cls = Tile(toPosition)
    if cls and not cls:getHouse() then
    if  cls:hasFlag(TILESTATE_PROTECTIONZONE) then
    item:remove()
    end
    return false
    end
movements
<movevent event="AddItem" actionid="xx" script=tileclean.lua" /> or
<movevent event="AddItem" pos="xx;yy;z" script=tileclean.lua" />
Lua:
local item_exceptions = {} -- exclude items for not clean

function onAddItem(item, tile, pos)
if not isInArray(item_exceptions, item.itemid) then
item:remove()
end
return true
end

but i dont know where i can add time for clean
 
Last edited:
Solution
Back
Top