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

Solved addEvent with doRemoveItem(uid)

Jetro

jangeldev
Joined
Aug 1, 2011
Messages
452
Reaction score
68
Location
Venezuela
what's the correct way for remove an item after x seconds? if i use:
LUA:
addEvent(doRemoveItem, 3000, uid, 1)
it prints in console : "Item not found".
Thanks in advance.
 
Last edited:
Do it on the easy way, example:

LUA:
local item = 2160
function onLogin(cid)
local function remItem(cid)
doRemoveItem(item, 1)
return true
end

addEvent(remItem, 3000, cid)
end
return true
end
 
you didn't get my point, here is a piece of my code:

LUA:
local item = getThingFromPos(position)
doRemoveItem(item.uid, 1) --this works, remove the item 
addEvent(doRemoveItem, 3000, item.uid, 1)-- this doesn't work, it shows the error in console
 
LUA:
function remove()
local item = getThingFromPos(position)
doRemoveItem(item.uid, 1) --this works, remove the item 
return true
end
addEvent(remove, 3000)-- this doesn't work, it shows the error in console
 
Back
Top