• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Global Event gamestate_closed

Morcega Negra

Banned User
Joined
Aug 4, 2015
Messages
102
Solutions
1
Reaction score
8
Hello I have a version of TFS that the only way to save the server is to the command / closeserver with GM, other ways to save him from error, I wonder how to make a global event that CloseServer and after five minutes he gives OpenServer.

That's my talkaction of /closeserver / OpenServer:
Code:
function onSay(cid, words, param, channel)
    local state = GAMESTATE_CLOSED
    if(words:sub(2, 2) == "o") then
        state = GAMESTATE_NORMAL
    end

    local str = "Failed to " .. (state == GAMESTATE_CLOSED and "close" or "open") .. " server."
    if(doSetGameState(state) ~= LUA_ERROR) then
        str = "Server has been " .. (state == GAMESTATE_CLOSED and "closed" or "opened") .. " successfully."
    end

    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str)
    return TRUE
end
I want to turn into globalevent that the close and after 5 min open
 
Back
Top