I have a problem with this script, I think the problem depends on hp/mana gain on level up since I use PVP-Enforced.
mcfrag.lua
Is there anyway to get around it, because I get the text, but my character wont die.
Thanks in advance.
/Zeeb
SOLVED
Here is the code:
mcfrag.lua
Code:
function onKill(cid, target, lastHit) if 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.')
doCreatureAddHealth(cid, -getCreatureMaxHealth(cid) - getCreatureHealth(cid))
else
doPlayerAddItem(cid, 2152, 1)
end
end
return true
end
Is there anyway to get around it, because I get the text, but my character wont die.
Thanks in advance.
/Zeeb
SOLVED
Here is the code:
Code:
function onKill(cid, target, lastHit)
if cid ~= target and isPlayer(target) then
if getPlayerIp(cid) == getPlayerIp(target) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You will be punished for killing a player of the same IP.')
addEvent(doCreatureAddHealth, 1000, cid, -(2*getCreatureMaxHealth(cid)))
else
doPlayerAddItem(cid, 2152, 1)
end
end
return true
end
Last edited: