function onDeath(cid, corpse, deathList)
local day = 24*60*60
setPlayerStorageValue(cid, 98788, os.time()+day)
return true
end
function onLogin(cid)
local function desloga(cid)
if isCreature(cid) then
doRemoveCreature(cid)
end
end
registerCreatureEvent(cid, "24hDeath")
if getPlayerStorageValue(cid, 98788) >= os.time() then
doPlayerSendTextMessage(cid, 20, "You need to wait 24h to login again!")
addEvent(desloga, 5000, cid)
end
return true
end
<event type="death" name="24hDeath" event="script" value="xxxx.lua"/> <event type="login" name="24hLogin" event="script" value="xxxx.lua"/>
testa ae... em xxxx.lua tu coloca o nome do arquivo..



info
Grupo: Barão
Registrado: 05/10/12
Posts: 245
Reputação: +36
eu tentei fazer um sistema de que quando o player morre ele só pode logar dps de 24 horas ai ele loga e aparece uma msg avisando que só pode logar dps de 24horas=configuravel, e dps desloga. porem não deu certo, se alguem poder me ajudar dou rep