• 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!

/save for tfs 1.2

undead mage

Active Member
Joined
Mar 25, 2012
Messages
364
Solutions
2
Reaction score
47
Location
Amsterdam
Does anyone have this command? It's useful for testing something when you need to restart fast instead of the global save
 
Here is what i use on my test server.

data/talkactions/talkactions.xml
Code:
<talkaction words="/save" script="serversave.lua" />

data/talkactions/scripts/serversave.lua
Code:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    if player:getAccountType() < ACCOUNT_TYPE_GOD then
        return false
    end
    saveData()
    doPlayerSendTextMessage(cid, 24, "Server saved.")
    return false
end
 
Here is what i use on my test server.

data/talkactions/talkactions.xml
Code:
<talkaction words="/save" script="serversave.lua" />

data/talkactions/scripts/serversave.lua
Code:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    if player:getAccountType() < ACCOUNT_TYPE_GOD then
        return false
    end
    saveData()
    doPlayerSendTextMessage(cid, 24, "Server saved.")
    return false
end

Thanks I can use both!
 
Back
Top