Postado Março 21, 2015 10 anos Ja vi varios topicos sobre o Kick-Time e nem 1 funcionou eu quero Que dps de 15 minutos o char n se movementar Ele sera desconnectado Se for possivel por isso em treiners obg
Postado Março 21, 2015 10 anos Vá no seu creaturescripts/script, Crie um .lua chamado idle, Cole isso dentro. local config = { idleWarning = getConfigValue('idleWarningTime'), idleKick = getConfigValue('idleKickTime') } function onThink(cid, interval) if(getTileInfo(getCreaturePosition(cid)).nologout or getCreatureNoMove(cid) or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE)) then return true end local idleTime = getPlayerIdleTime(cid) + interval doPlayerSetIdleTime(cid, idleTime) if(config.idleKick > 0 and idleTime > config.idleKick) then doRemoveCreature(cid) elseif(config.idleWarning > 0 and idleTime == config.idleWarning) then local message = "You have been idle for " .. math.ceil(config.idleWarning / 60000) .. " minutes" if(config.idleKick > 0) then message = message .. ", you will be disconnected in " local diff = math.ceil((config.idleWarning - config.idleKick) / 60000) if(diff > 1) then message = message .. diff .. " minutes" else message = message .. "one minute" end message = message .. " if you are still idle" end doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".") end return true end Depois Vá no seu creaturescripts.xml e cole essa tag. <event type="think" name="Idle" event="script" value="idle.lua"/> Depois creaturescripts/script, Login.lua adicione essa tag. registerCreatureEvent(cid, "Idle") Editado Março 21, 2015 10 anos por Septy (veja o histórico de edições)
Postado Março 21, 2015 10 anos Vou testar espera 15m q ja posto o resultado Esperando, caso acontecer algum erro poste o erro.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.