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

TFS 1.X+ TFS 1.4 help with /save command

VagosClubTM

Active Member
Joined
Aug 16, 2019
Messages
219
Reaction score
32
Location
Chile
hello friends I am using this script for the /save command but it does not work

Lua:
local talk = TalkAction("/save")

function talk.onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    local players = Game.getPlayers()
    for i = 1, #players do
        players[i]:save()
    end
    return true
end

talk:register()
 
Should work directly..

Maybe try recreating the player?

Lua:
local talk = TalkAction("/save")

function talk.onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end
    
    local players = Game.getPlayers()
    for i = 1, #players do
        local player = Player(players[i])
        if player then
            player:save()
        end
    end
    return true
end

talk:register()
 
Back
Top