• 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 Need Example: Creature(cid):getDamageMap() - OnDeath Function TFS 1.0

Mikii

Active Member
Joined
Mar 28, 2013
Messages
197
Reaction score
46
How To Use this function??? Creature(cid):getDamageMap()

OBS: THIS USED ON MONTERS

NOW GETING RESULT:
table: 0x73671c28
Code:
function onDeath(cid, corpse, killer)
    deathList =  tostring(Creature(cid):getDamageMap())

    if deathList == nil or deathList == "" then
          print(" debugging: NIL VALUE ")
    else

        print(" debugging: " .. deathList .. " ...")

    end
    return true

end
 
Last edited:
Remove the tostring and iterate through the map.

for creatureId, damageInfo in pairs(deathList) do
-- stuff
end
 
Back
Top