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

lazarus321

Member
Joined
May 8, 2017
Messages
209
Reaction score
20
Hello guys, I have this script (movements) that when equipping a backpack provides player 6 in the total cap. It works well but whenever I relog add 2 to the total cap because it happens? I simply want to add 6 to the total cap and when I remove the bp, return the normal cap. The numbers "200" and "600" below provide unit "6" in cap. instead of being "600" and "600" I don't know why you do that too ...

HTML:
function onEquip(player, item, slot)
  
  player:setCapacity(player:getCapacity() + 200)

    return true
end
function onDeEquip(player, item, slot)

  player:setCapacity(player:getCapacity() - 600)

    return true
end
 
Capacity is stored in DB. So unless you relog the character and modify the database, that wont work.
 
Back
Top