Code:
function onPrepareDeath (cid, deathList)
lastHitKiller = deathList[1]
mostDamageKiller = deathList[2]
if cid ~= target and isPlayer(cid) then
if getPlayerIp(mostDamageKiller) == getPlayerIp(cid) then
doPlayerSendTextMessage(mostDamageKiller, MESSAGE_STATUS_CONSOLE_BLUE, 'You dont receive scores by killing the same ip.')
for _, tid in ipairs(getPlayersOnline()) do
doPlayerSendChannelMessage(tid, "", "".. getCreatureName(cid) .." (".. getPlayerKillAll(cid) .."/".. getPlayerDeathAll(cid) ..") was killed by ".. getCreatureName(mostDamageKiller).." (".. getPlayerKillAll(mostDamageKiller) .."/".. getPlayerDeathAll(mostDamageKiller) ..").", TALKTYPE_CHANNEL_Y, 99)
end
else
if(lastHit == true) then
doPlayerSendTextMessage(mostDamageKiller, MESSAGE_STATUS_CONSOLE_BLUE,"You have killed " .. getCreatureName(cid) .. ".")
end
end
end
return true
end
console error
Code:
[17:25:53.037] Sercc has logged in.
[17:26:14.118] [Error - CreatureScript Interface]
[17:26:14.119] data/creaturescripts/scripts/death.lua:onPrepareDeath
[17:26:14.121] Description:
[17:26:14.121] (internalGetPlayerInfo) Player not found when requesting player i
nfo #29
[17:26:14.138] Sercc has logged out.
can someone try to help me solve my problem? I'm getting bald already aahuahuauh