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

Limit deaths

_Aion_

Nothing Else
Joined
Jan 19, 2010
Messages
401
Solutions
4
Reaction score
10
Location
Jequie,Bahia,Brazil
Hello, i need some system, that.
after die 30 or more times, the player will banned for one day.
I'm using TFS 0.3.7(8.60)

Thanks for all.
 
Here you go. I didn't test it yet:

Code:
function onDeath(cid, corpse, deathList)
    if getPlayerStorageValue(cid, 348129) == 29 then
        doAddPlayerBanishment(account, PLAYERBAN_BANISHMENT, 24 * 3600, 23, ACTION_BANISHMENT, "You have ben banned for dying 30 times", getPlayerGUID(cid), 1)
        doPlayerSetStorageValue(cid, 348129, 0)
    else
        doPlayerSetStorageValue(cid, 348129, getPlayerStorageValue(cid, 348129)+1)
    end
    return true
end
 
Back
Top