healer007
New Member
PHP:
function onUse(cid, item, frompos, item2, topos)
if doPlayerRemoveMoney(cid, 10000) == 1 then
doPlayerAddItem(cid, 2173, 1)
doPlayerSendTextMessage(cid,24,'You Bought An Amulet Of Loss For 10K')
else
doPlayerSendCancel(cid, 'You don\'t have enough money.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
This scrpit works like this when you use item (eg switch) with uiq 17001 then you get aol for 10k + msg saying you bought the aol,but also says (you can not use the item) + when you have no money doesnt give error saying no enough money
Fix-
Should work like this Use (switch) get aol + msg saying you get aol, and when you have no money it should give error msg saying no money
Can anyone help me fix this scrpit?