Vendeliko
Banned User
- Joined
- Dec 3, 2011
- Messages
- 3,087
- Reaction score
- 93
Hey guys,anyone could please edit this script so that instead of getting one item as a reward you get two? I tried adding another id beside 6571 but it just gave one item :/ Also if its possible,please make it dont give rewards for players who kill someone with same ip as theirs and make em lose 150hp+mana. Also if player X kills player Y 3x times in a row same happens.
heres the script;
Thanks in advance,
Vendeliko.
heres the script;
Code:
function onDeath(cid, corpse, deathList)
local reward = {
item = 6571,
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
end
Thanks in advance,
Vendeliko.
Last edited: