Lbtg
Intermediate OT User
- Joined
- Nov 22, 2008
- Messages
- 2,306
- Reaction score
- 129
Hello i got a working script from otland, but there is one bad thing about it or its something else.
Exacly on save time, it kicks all players who is online... Thats not good, how i can fix it ?
How i can save server/players/houses, without kicking all players out ?
Talkactions save script
Exacly on save time, it kicks all players who is online... Thats not good, how i can fix it ?
How i can save server/players/houses, without kicking all players out ?
Talkactions save script
Lua:
local shutdownAtServerSave = false
local cleanMapAtServerSave = false
local function serverSave()
if shutdownAtServerSave then
Game.setGameState(GAME_STATE_SHUTDOWN)
else
Game.setGameState(GAME_STATE_CLOSED)
if cleanMapAtServerSave then
cleanMap()
end
Game.setGameState(GAME_STATE_NORMAL)
end
end
local function secondServerSaveWarning()
broadcastMessage("Awakening is saving game in one minute.", MESSAGE_STATUS_WARNING)
addEvent(serverSave, 60000)
end
local function firstServerSaveWarning()
broadcastMessage("Awakening is saving game in 3 minutes.", MESSAGE_STATUS_WARNING)
addEvent(secondServerSaveWarning, 120000)
end
function onSay(cid, words)
broadcastMessage("Awakening is saving game in 5 minutes.", MESSAGE_STATUS_WARNING)
Game.setGameState(GAME_STATE_STARTUP)
addEvent(firstServerSaveWarning, 120000)
return not shutdownAtServerSave
end