-- Hello friends, i'm return with more action needed fix...
-- In this script, i have a place with a action, and when you pull a lever this sell a item on (price1 or price2),
Price1 = 18k
Price2 = 10k
All items listed on tag price are selling for fixed price, but when you pull lever nothing happen, and don't send error on console, plx someone fix then for me, and explain how to use TAGE like this...
-- Here the script:
-- Many thx for all...
-- In this script, i have a place with a action, and when you pull a lever this sell a item on (price1 or price2),
Price1 = 18k
Price2 = 10k
All items listed on tag price are selling for fixed price, but when you pull lever nothing happen, and don't send error on console, plx someone fix then for me, and explain how to use TAGE like this...
-- Here the script:
PHP:
---- Vendendo items por alavancas by F@bio ----
function onUse(cid, item, frompos, item2, topos)
price1 = {7902,2383,7383,7384,7406,7402,2429,2430,2435,7380,2454,2423,2445,7415,7392,2391,2544,8905}
price2 = {7744,7745,7746,7747,7748,7749,7750,7751,7752,7753,7754,7755,7756,7757,7758,7840,8906}
itempos = {x=527, y=517, z=8, stackpos=255}
getitem = getThingfromPos(itempos)
if item.actionid == 3015 and item.itemid == 1945 and getitem.itemid == price1 then
doRemoveItem(getitem.uid,1) --royal helmet
doSendMagicEffect(itempos, 26)
doSendMagicEffect(getPlayerPosition(cid), 26)
doSendAnimatedText(getPlayerPosition(cid), "$$$", TEXTCOLOR_LIGHTGREEN)
doPlayerAddMoney(cid, 18000)
doTransformItem(item.uid,item.itemid+1)
end
if item.actionid == 3015 and item.itemid == 1945 and getitem.itemid == price2 then
doRemoveItem(getitem.uid,1) --royal helmet
doSendMagicEffect(itempos, 26)
doSendMagicEffect(getPlayerPosition(cid), 26)
doSendAnimatedText(getPlayerPosition(cid), "$$$", TEXTCOLOR_LIGHTGREEN)
doPlayerAddMoney(cid, 20000)
doTransformItem(item.uid,item.itemid+1)
end
if item.actionid == 3015 and item.itemid == 1945 and getitem.itemid == 0 then
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,22,"Coloque o item a ser vendido a sua frente.")
end
if item.actionid == 3015 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
end
return 1
end
-- Many thx for all...