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

Lua New outfits tfs 1.0

Raggaer

Godly Member
Joined
Jul 25, 2012
Messages
1,557
Solutions
8
Reaction score
957
Location
Spain
I was wondering if with this new TFS 1.0 it is possible to make something like...
If player have X storage then on outfit selection he can choose new ones like orc, demon, etc!
If so can someone explain me how can this be made?
Thanks
 
Untested code
Code:
--[[
   NOTE:
     You cannot actually store any strings with this, it just makes so you get the outfit.
     Also it's a pretty dumb way of doing this.

   local player = Player(cid)
   player:setStorageValue("additional outfits", true)
   player:setStorageValue("additional outfits", false)
]]

local oldStorageFunction = Player.setStorageValue
function Player.setStorageValue(self, key, value)
   if type(key) == "number" and type(value) == "number" then
     return oldStorageFunction(self, key, value)
   elseif key == "additional outfits" then
     if value then
       self:addOutfit(lookType)
     else
       self:removeOutfit(lookType)
     end
     return not not value
   end
   return false
end
 
Back
Top