Jordan_August
New Member
- Joined
- Jul 24, 2012
- Messages
- 122
- Reaction score
- 4
I came across this kill reward script that works almost perfectly but there is one thing stopping me. I need this script to not give exp at all to the person that kills an individual on the same IP. If someone could help me out or point me in the right direction that would be great.
Code:
function onKill(cid, target, lastHit)
if isPlayer(target) then
if getPlayerParty(cid) == getPlayerParty(target) or getPlayerIp(cid) == getPlayerIp(target) then
doPlayerAddExp(cid, -0)
doPlayerSendTextMessage(cid, 20, "You have been punished for killing a player of the same IP.")
setPlayerStorageValue(cid, 3000, getPlayerStorageValue(cid, 3000)+1)
else
doPlayerAddItem(cid, 2152, 1)
end
end
return true
end