Lbtg
Advanced OT User
- Joined
- Nov 22, 2008
- Messages
- 2,398
- Reaction score
- 165
Hello i have some problem with script , if player A make demage on player B , later even if played B died in 1 minute by monster player A gets punished.. Can someone please fix this script , so if only Player A did last hit on player B to kill him ? 
script kill same ip punishment
Thanks in advance
<3
script kill same ip punishment
LUA:
function onKill(cid, target, lastHit)
if cid ~= target and isPlayer(target) then
if getPlayerIp(cid) == getPlayerIp(target) then
doPlayerAddLevel(cid, -5, 1)
for i = 1,7 do
doPlayerAddSkill(cid,i, -50)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have been punished for killing a player of the same IP.')
else
doPlayerAddItem(cid, 2152, 1)
end
end
return true
end
Thanks in advance