CesarZ
Well-Known Member
- Joined
- Sep 20, 2012
- Messages
- 272
- Solutions
- 4
- Reaction score
- 66
I go this Function im trying to add when they die from The Arena They also Take off the PZLock and skulls if they Have
LUA:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
local player = Player(cid)
if player:isPlayer() then
local ppos = player:getPosition()
if isInRange(ppos, arena.frompos, arena.topos) then
local maxhp = player:getMaxHealth()
player:addHealth(maxhp)
---I know it goes somewhere around here---
addEvent(doCreatureAddHealth, 100, player:getId(), maxhp)
player:sendTextMessage(MESSAGE_STATUS_WARNING,"[Arena]: You lost the duel.")
end
if isInRange(ppos, arena.frompos, arena.topos) then
player:teleportTo(arena.exitpos)
return true
end
end
return true
end
function onLogin(cid)
local player = Player(cid)
player:registerEvent("pvparena")
return true
end