• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua kill same ip 0.4tfs

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
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 :) <3
 
Back
Top