• 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.2 Talkaction add storage and remove storage

I did it for him anyway
Lua:
function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    if player:getAccountType() < ACCOUNT_TYPE_GOD then
        return false
    end

    local split = param:split(",")
    if split[2] == nil or split[3] == nil then
        player:sendCancelMessage("Insufficient parameters.")
        return false
    end
   
    local target = Player(split[1])
    if target == nil then
        player:sendCancelMessage("A player with that name is not online.")
        return false
    end   
   
    if split[4] ~= nil then
        player:sendCancelMessage("Too many parameters.")
        return false
    end
  
            target:setStorageValue(split[2], split[3])
    return false
end
 
Back
Top