• 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 PVP Arena - Need Help!

remus934

New Member
Joined
Mar 1, 2014
Messages
13
Reaction score
0
Hello!
I have no idea how to do this kind of arena.
In front of arena's there are two teleports to go inside.
One teleport in arena to go out of pvp zone.
We can't die in arena ,when we will be dying we will be teleported outside of arena.
97423662557923548376.png


Can somebody help me with this kind of arena?
 
Give one storage when enter in arena, and check this when player go die teleport if have this storage.
 
I think ,that would be better when I will use:
local arena = {
frompos = {x=497, y=82, z=7},
topos = {x=521, y=90, z=7},
exit = {x=509, y=80, z=7}
}

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
if doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid), TRUE) == TRUE then
if doTeleportThing(cid, arena.exit) == TRUE then
doSendMagicEffect(arena.exit, 10)
doPlayerSendTextMessage(mostDamageKiller,MESSAGE_STATUS_CONSOLE_BLUE,'[ARENA] You have defeated '..getPlayerName(cid)..'!')
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'[ARENA] You are defeated by '..getPlayerName(mostDamageKiller)..'!')
return FALSE
end
end
end
end
return TRUE
end
 
Back
Top