Faraonekkk
New Member
- Joined
- Feb 15, 2010
- Messages
- 686
- Reaction score
- 4
is there any idea to make item not able to trade?
you'd have to modify thecould you please convert this script to tfs 1.x?
if i try to use it in my tfs 1.3 this happens
View attachment 61196
Player:onTrade functions in data/events/scripts/player.luacould you please convert this script to tfs 1.x?
if i try to use it in my tfs 1.3 this happens
View attachment 61196
data/scripts/trade.lualocal untradeItems = {2160}
local ec = EventCallback
function ec.onTradeRequest(player, target, item)
if table.contains(untradeItems, item:getId()) then
player:sendCancelMessage("You cannot trade this.")
return false
end
return true
end
ec:register(1)


Nothing is meant to happen, until you trade something that is on the blocked items list.i go test tks mnas <3
Post automatically merged:
@Sarah Wesker
I put it inside the destination folder, do I need to register it somewhere? because just putting it inside nothing happens
View attachment 61206
Shows that it was loaded and everything!
View attachment 61207
i go test tks mnas <3
Post automatically merged:
@Sarah Wesker
I put it inside the destination folder, do I need to register it somewhere? because just putting it inside nothing happens
View attachment 61206
Shows that it was loaded and everything!
View attachment 61207
data/events/events.xml<event class="Player" method="onTradeRequest" enabled="0" />
<event class="Player" method="onTradeRequest" enabled="1" />