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

Lua onDeath

3l0

Banned User
Joined
Sep 9, 2011
Messages
3
Reaction score
0
Hello guys, i have nice problem... i made script which should remove monster corpse after 30 seconds of dead, but "corpse" value in script don't returns into function doRemoveItem in addEvent, i test it in 1 sec and 30 sec and not work.
Can someone help me ?

PHP:
function onDeath(cid, corpse, deathList)
 
	if not(isMonster(cid)) then
		return TRUE
	end
	if(corpse.itemid > 0)then
		addEvent(doRemoveItem, 1000, corpse.uid, 1)
	end
	return true
end

btw. corpse.uid, corpse.itemid in function onDeath works correct, only in addEvent not working...

Thanks in advance.
 
Back
Top