imback1
Unknown member
- Joined
- Jul 11, 2013
- Messages
- 785
- Solutions
- 1
- Reaction score
- 46
Hello, I've got a problem with globalsave script
https://imgur.com/HdaQkcO
and this is my init.lua
Second one with pacman script, i was using with 0.3.6 and was working without any problems but now with 0.4 i found this error when i die from ghost
https://imgur.com/6vu8jzD
TFS 0.4
https://imgur.com/HdaQkcO
and this is my init.lua
Code:
function onGlobalSave()
if(getGameState() ~= GAMESTATE_CLOSING) then
return onStartup()
end
return true
end
Second one with pacman script, i was using with 0.3.6 and was working without any problems but now with 0.4 i found this error when i die from ghost
https://imgur.com/6vu8jzD
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
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
Last edited: