• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Need help with script to buy potion with lever without a bp tfs 8.60

Eternal Life

New Member
Joined
May 15, 2011
Messages
148
Reaction score
1
Location
Aguadilla,Puerto Rico
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!
 
Back
Top