andrew95434
Banned User
I want to do a talkaction to remove an item you have and add another (such as transforming. Help me with that please
local removeItem = 9971 --Item to be removed
local addItem = 2160 --Item to be added
function onSay(cid, words, param)
if getPlayerItemCount(cid, removeItem) >= 1 then
doPlayerRemoveItem(cid, removeItem, 1)
doPlayerAddItem(cid, addItem, 1)
end
end
local items = {9971, 500, 3532}
function onSay(cid, words, param, channel)
local f
for i = 1, #items do
if getPlayerItemCount(cid, items[i]) > 0 then
doPlayerRemoveItem(cid, items[i], 1)
f = true
else
doPlayerSendTextMessage(cid, 27, "You dont have the required items.")
break
end
end
if f == true then doPlayerAddItem(cid, 2160, 1) end
return true
end
local items = {9971, 500, 3532}
function onSay(cid, words, param, channel)
if getPlayerStorageValue(cid,3000) == 1 then
local f
for i = 1, #items do
if getPlayerItemCount(cid, items) > 0 then
doPlayerRemoveItem(cid, items, 1)
f = true
else
doPlayerSendTextMessage(cid, 27, "You dont have the required items.")
break
end
end
if f == true then doPlayerAddItem(cid, 2160, 1) end
return true
end
What do you mean 'irregular items'?i Need do talkaction that remove some irregular items
hmm like bed item id 1755 , 1754What do you mean 'irregular items'?