Siemano.
Mam pewien problem, od kilku dni się z nim borykam, już Wam mówię o co chodzi...
Jeśli koleś wejdzie sobie na mojego OTS'a i da exita to serwer go nie wywala... Na pewno problem jest w anti idle. Wie ktoś jak to naprawić?
Chcę to naprawić, ponieważ nie chce aby gracze wchodzili sobie na trainy, dawali exita i siedzieli godzinami na nich.
Mam tfsa 0.4_svn
Mój config.lua z anti idle:
creaturescripts/scripts/idle.lua
Prosze, niech ktoś pomoże!
Mam pewien problem, od kilku dni się z nim borykam, już Wam mówię o co chodzi...
Jeśli koleś wejdzie sobie na mojego OTS'a i da exita to serwer go nie wywala... Na pewno problem jest w anti idle. Wie ktoś jak to naprawić?
Chcę to naprawić, ponieważ nie chce aby gracze wchodzili sobie na trainy, dawali exita i siedzieli godzinami na nich.
Mam tfsa 0.4_svn
Mój config.lua z anti idle:
Code:
idleWarningTime = 10 * 60 * 1000
idleKickTime = 15 * 60 * 1000
creaturescripts/scripts/idle.lua
Code:
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
Prosze, niech ktoś pomoże!