LucasFerraz
Systems Analyst
Is possible to add to this script this?
Code:
1. Player can't kill the same IP more than 3x
[COLOR="red"]You cannot kill the same person three times in a row. Kill another player then you can kill him again. (You didn't received frag/reward)[/COLOR]
2. If he kill a different IP he can kill the old IP
[COLOR="red"]You killed a different IP. Now you can kill <old player> again.[/COLOR]
LUA:
function onKill(cid, target, lastHit)
if cid ~= target and isPlayer(target) then
if getPlayerIp(cid) == getPlayerIp(target) then
doCreatureAddHealth(cid, -200)
doCreatureAddMana(cid, -200)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have been punished for killing a player of the same IP.')
else
doPlayerAddItem(cid, 2152, 1)
setPlayerStorageValue(cid, 6776, getCreatureStorage(cid, 6776) + 1)
end
end
return true
end
Last edited: