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

Help to this script... boots can only remove after...[TFS 1.2 ]

Wyat

New Member
Joined
Aug 30, 2015
Messages
36
Reaction score
0
Hello!
I need the following:
Equipping an item (boots) the player can only remove it after 5 hours.
One way that it can be removed. If he tries to remove, send msg: You can not remove.
A small bug that can cause: it can "replace" the boot by another just by dragging, as with the rings when we exchange a ring on the other.

I use tfs 1.2
 
I am just generalizing i don't know if this will work
Code:
local xstorage = 19000
local time_ (60 * 60 * 1000) * 5
local boots = 1234

function onEquip(player, item, slot)
    player:setStorageValue(xstorage, 0s.time() + time_)
    return true
end

function onDeEquip(player, item, slot)
    if player:getStorageValue(xstorage) > os.time() and item.itemid == boots then
        return true
    end
    return false
end
 
I am just generalizing i don't know if this will work
Code:
local xstorage = 19000
local time_ (60 * 60 * 1000) * 5
local boots = 1234

function onEquip(player, item, slot)
    player:setStorageValue(xstorage, 0s.time() + time_)
    return true
end

function onDeEquip(player, item, slot)
    if player:getStorageValue(xstorage) > os.time() and item.itemid == boots then
        return true
    end
    return false
end

Nothing happens. :/
 
Back
Top