function onKill(cid,target)
if isPlayer(target) then
doPlayerAddItem(cid, 2160, 1)
end
return true
end
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, 2160, 1)
end
end
return true
end
this works perfect
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, 2160, 1) end end return true end
function onKill(cid, target, lastHit)
if cid ~= target and isPlayer(target) then
if getPlayerIp(cid) == getPlayerIp(target) then
doCreatureAddHealth(cid, -200)
doCreatureAddMana(cid, -200)
else
doPlayerAddExp(cid, (getPlayerExperience(target)/95))
doPlayerAddItem(cid, 2160, 1)
end
end
return true
end