Its just a function that you can use in your "buy clicking" scripts.. It just return true if the player have enough cap for the item that he will buy and return flase if he have not.
You could use like this:
Instead of:
With this one ^ you have to check the weigh in items.xml.
Lua:
function playerFreeCap(cid, toItem, itemCount)
if getPlayerFreeCap(cid) >= getItemWeightById(toItem, itemCount) then
return TRUE
else
return FALSE
end
end
You could use like this:
Lua:
if playerFreeCap(cid, 2665, 1) == TRUE then
Instead of:
Lua:
if getPlayerFreeCap(cid) >= X then
Last edited: