mmheo
New Member
- Joined
- Sep 14, 2017
- Messages
- 157
- Reaction score
- 1
when player kill player in pk i get this error and no dead human just tp to temple
im use 0.4
f5
im use 0.4
Code:
local config = {
['hero'] = {storage = 19524, message = 'the second addon of ... Demonhunter', outfit = {6, 2}},
['dwarf'] = {storage = 19724, message = 'the first addon of Demonhunter', outfit = {6, 1}},
['dragon'] = {storage = 19447, outfit = {20, 1}}
}
function onKill(cid, target)
local monster = config[getCreatureName(target):lower()]
if isPlayer(target) or not monster or isSummon(target) then
return true
end
if getPlayerStorageValue(cid, monster.storage) == 0 then
doPlayerAddOutfitId(cid, monster.outfit[1], monster.outfit[2])
setPlayerStorageValue(cid, monster.storage, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations, you have killed a '..getCreatureName(target)..' and received '..monster.message..'.')
end
return true
end
f5
Last edited by a moderator: