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

Break items with sword, axe etc.

leozynho123

Member
Joined
Sep 14, 2014
Messages
128
Reaction score
8
Good night, I have a problem, in which I am using tfs 1.1, I can not break items like spider web, pots and such with sword, ax, and etc, what can be ??? Ty
 
I think TFS 1.0+ uses a couple lines like this to determine what can destroy stuff.
Check actions.xml and make sure it's set-up for your weapons and stuff?
XML:
<action fromid="2376" toid="2404" script="other/destroy.lua"/>
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   return destroyItem(cid, itemEx, toPosition)
end
 
I think TFS 1.0+ uses a couple lines like this to determine what can destroy stuff.
Check actions.xml and make sure it's set-up for your weapons and stuff?
XML:
<action fromid="2376" toid="2404" script="other/destroy.lua"/>
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   return destroyItem(cid, itemEx, toPosition)
end


Thanks for the answer, plus the problem was in lib in actions, I changed the function of destroyItem and it worked

function onDestroyItem(player, item, fromPosition, target, toPosition, isHotkey)
if not target or type(target) ~= "userdata" or not target:isItem() then
return false
end
 
Back
Top