function onDeath(cid, corpse, deathList)
local reward = {
item = 11197,
count = 1
}
for i = 1, #deathList do
if isPlayer(cid) and isPlayer(deathList[i]) then
--[[if getPlayerIp(cid) ~= getPlayerIp(deathList[i]) then ]]--
if getPlayerItemCount(deathList[i], reward.item) > 0 then
local item = getPlayerItemById(deathList[i], true, reward.item)
if item.type >= ITEMCOUNT_MAX then
doPlayerAddItem(deathList[i], reward.item, reward.count)
doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
else
doTransformItem(item.uid, reward.item, item.type + 1)
doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
end
else
doPlayerAddItem(deathList[i], reward.item, reward.count)
doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
end
--[[else
doPlayerSendTextMessage(deathList[i], 18, "You didn't get frag/reward because of killing a player with same ip.")
end ]]--
end
end
return true [code/]
end