try now
function onKill(cid, target, lastHit)
if isPlayer(cid) and cid ~= target and isPlayer(target) then
if getPlayerIp(cid) == getPlayerIp(target) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have been slain for killing a player of the same IP.')...