Lava Titan
Developer
Sup guys.
I'm using this script:
for shop levers but the problem is even if the player doesnt have money to buy the item he will get the item anyway ...
Example: You dont got money and you still get the item without paying.
Can some1 help me fixing it?
Thanks for every1 that helps
Rep++ for every1 that helps to.
Regards
Lava Titan
I'm using this script:
Lua:
local cost = 1000000
local newItem = {7388, 1}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveMoney(cid, cost) == FALSE then
doPlayerSendTextMessage(cid, 26, "You need "..cost.." gold coins for "..newItem[2].."x "..getItemNameById(newItem[1])..".")
doSendMagicEffect(getCreaturePosition(cid), 2)
return TRUE
end
if item.itemid == 1945 then
doTransformItem(item.uid, 1946)
else
doTransformItem(item.uid, 1945)
end
doPlayerAddItem(cid, newItem[1], newItem[2])
doPlayerSendTextMessage(cid, 22, "You bought "..newItem[2].."x "..getItemNameById(newItem[1]).." for "..cost..".")
return TRUE
end
for shop levers but the problem is even if the player doesnt have money to buy the item he will get the item anyway ...
Example: You dont got money and you still get the item without paying.
Can some1 help me fixing it?
Thanks for every1 that helps
Rep++ for every1 that helps to.
Regards
Lava Titan