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

Delete dead corpse after death at a certain area

mikeware

New Member
Joined
Jul 17, 2007
Messages
338
Reaction score
0
Location
Brazil
Hey
as the title says, im trying to when a player die in a certain area, he's dead body will be removed, any idea would be apreciate.
the idea im thinking is in death.lua in creaturescripts that when u die, he removes the "thing" that was in ur coordinate, obviously, ur body. not tested yet but probaly there are a easier way to do that..

thanks
 
I know setting up an arena in an area will get rid of all the corpses, so a function of some sort must be programed in your sources. Perhaps try to locate it and moddify the code. I'm not a source editor by any means, I'm just tryin to take a stab :S
 
Damn, I can't figure out how to delete the body, I already tried Stackpos 253,254 and 255, the right for me would be the stackpos 255 that its a moveable object (the body) but the console keep giving the error Item not found, any solution people? im using playerdeath.lua in creature scripts to do that here is what I did so far:
Code:
function onDeath(cid, corpse, killer)
if getPlayerStorageValue(cid, 10000) == 1 then
playerdeadpos = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z, stackpos=255}
removebody = getThingfromPos(playerdeadpos)
doRemoveItem(removebody.uid, 1)

****And the rest of the code but its other things****
 
Back
Top