Eternal Life
New Member
Hello... I need help with a script that when a player uses it, it gives you potions without a bp, since is 8.60 there is no bp needed couse they all stack in one.
I have this script:
function getPlayerMoney(cid)
gold = getPlayerItemCount(cid,2148)
plat = getPlayerItemCount(cid,2152)*100
crys = getPlayerItemCount(cid,2160)*10000
money = gold + plat + crys
return money
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerMoney(cid) >= 2160 then
doPlayerRemoveMoney(cid,100)
doPlayerAddItem(cid,2002,1)
doSendMagicEffect(getPlayerPosition(cid), 13)
else
doPlayerSendTextMessage(cid,19,"You dont have enough money.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return TRUE
end
It says there is an error near were it says getplayermoney
Can you guys fix this script?
Thank you for your support!
I have this script:
function getPlayerMoney(cid)
gold = getPlayerItemCount(cid,2148)
plat = getPlayerItemCount(cid,2152)*100
crys = getPlayerItemCount(cid,2160)*10000
money = gold + plat + crys
return money
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerMoney(cid) >= 2160 then
doPlayerRemoveMoney(cid,100)
doPlayerAddItem(cid,2002,1)
doSendMagicEffect(getPlayerPosition(cid), 13)
else
doPlayerSendTextMessage(cid,19,"You dont have enough money.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return TRUE
end
It says there is an error near were it says getplayermoney
Can you guys fix this script?
Thank you for your support!