• 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!

Lua function onPrepareDeath error

-vG

New Member
Joined
Oct 18, 2018
Messages
39
Solutions
1
Reaction score
4
Location
Brazil
Good morning everyone,
the function onPrepareDeath (cid, killer)

Was it to prepare the player before death?
if yes, by putting a false return
the player must not die

how can I put this when the character dies
he comes back with mana and full hp
obs: if it has a storage x
 
Solution
When a player reaches the 'PrepareDeath' stage, the character is already dead.
If you return false, it will keep the character in-game, but the character won't be alive.

If you are wanting to 'revive' the player without killing them, use 'onStatsChange' and check the damage being applied to the character.
If the value is equal to the characters life, this damage is a death blow.
Return false the damage, and heal the character to full hp/mana.
When a player reaches the 'PrepareDeath' stage, the character is already dead.
If you return false, it will keep the character in-game, but the character won't be alive.

If you are wanting to 'revive' the player without killing them, use 'onStatsChange' and check the damage being applied to the character.
If the value is equal to the characters life, this damage is a death blow.
Return false the damage, and heal the character to full hp/mana.
 
Solution
Back
Top